How to do gst-plugin cross-compilation for Windows (dll)?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to do gst-plugin cross-compilation for Windows (dll)?

AurelienV
Hi,

I want to build gst-plugin "MyFilter" from gst-template example for Windows (as a dll library ofc).

I'm on Debian 8.4.0. I have already installed mingw32 and mingw32-binutils packages.

I try to do it with the following commands:
.../gst-template/gst-plugin# ./configure --host=mingw32 --target=x86_64-w64-mingw32
.../gst-template/gst-plugin# ./autogen.sh --host=mingw32 --target=x86_64-w64-mingw32

But when I look in .../gst-template/gst-plugin/src/.libs/ , there is only .so and .la libraries.

Some people use VS to build dll but I think there's a way to do it from linux (?).

Regards
Reply | Threaded
Open this post in threaded view
|

Re: How to do gst-plugin cross-compilation for Windows (dll)?

AurelienV
My bad! I did some mistakes with autogen.sh and configure tools. This works better:

./autogen.sh --build=x86_64-linux-gnu --host=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-shared --disable-static
./configure --build=x86_64-linux-gnu --host=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-shared --disable-static (I'm not sure if it's needed to repeat these parameters ?)

I also did some modifications in gst-template/gst-plugin/configure.ac
> Changing LT_INIT to LT_INIT([win32-dll])
> Adding "-shared -no-undefined" at the end of GST_PLUGIN_LDFLAGS

But, I have new linker mistakes ...

*** Warning: linker path does not have real file for library -lgstcontroller-1.0.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libgstcontroller-1.0 but no candidates were found. (...for file magic test)

[...] And the same for gstaudio-1.0, gstbase-1.0, gstreamer-1.0, gobject-2.0 and glib-2.0

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libgstplugin.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

So, I only have .a and .la libraries.
Reply | Threaded
Open this post in threaded view
|

Re: How to do gst-plugin cross-compilation for Windows (dll)?

Tim Müller
On Fri, 2016-04-29 at 06:33 -0700, AurelienV wrote:

Hi,

> My bad! I did some mistakes with autogen.sh and configure tools. This
> works
> better:
>
> ./autogen.sh --build=x86_64-linux-gnu --host=i686-w64-mingw32
> --target=i686-w64-mingw32 --enable-shared --disable-static
> ./configure --build=x86_64-linux-gnu --host=i686-w64-mingw32
> --target=i686-w64-mingw32 --enable-shared --disable-static (I'm not
> sure if
> it's needed to repeat these parameters ?)
>
> I also did some modifications in gst-template/gst-plugin/configure.ac
> >
> > Changing LT_INIT to LT_INIT([win32-dll])
> > Adding "-shared -no-undefined" at the end of GST_PLUGIN_LDFLAGS
> But, I have new linker mistakes ... 
>
> *** Warning: linker path does not have real file for library
> -lgstcontroller-1.0.
> *** I have the capability to make that library automatically link in
> when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have
> *** because I did check the linker path looking for a file starting
> *** with libgstcontroller-1.0 but no candidates were found. (...for
> file
> magic test)
>
> [...] *And the same for gstaudio-1.0, gstbase-1.0, gstreamer-1.0,
> gobject-2.0 and glib-2.0*
>
> *** Warning: libtool could not satisfy all declared inter-library
> *** dependencies of module libgstplugin.  Therefore, libtool will
> create
> *** a static module, that should work as long as the dlopening
> *** application is linked with the -dlopen flag.
>
> So, I only have .a and .la libraries.

Are you using our cerbero tool for cross-compilation? If not, you
should use it!

$ git clone https://anongit.freedesktop.org/git/gstreamer/cerbero.git

$ cd cerbero

$ ./cerbero-uninstalled bootstrap

$ ./cerbero-uninstalled -c config/cross-win32.cbc bootstrap

$ ./cerbero-uninstalled -c config/cross-win32.cbc build gstreamer-1.0
gst-plugins-base-1.0 gst-plugins-good-1.0 gst-plugins-ugly-1.0 gst-
plugins-bad-1.0 gst-libav-1.0

or similar.

Cheers
 -Tim


--
Tim Müller, Centricular Ltd - http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to do gst-plugin cross-compilation for Windows (dll)?

AurelienV
Thanks for your advice about Cerbero.

However, I have two questions/problems about Cross-Env:

1) On Debian 8.4 jessie, I'm not able to complete "./cerbero-uninstalled bootstrap". I have an error with the app-image-kit recipe:

##################
[(9/10) app-image-kit -> fetch ]
-----> Step done
[(9/10) app-image-kit -> extract ]
-----> Step done
[(9/10) app-image-kit -> configure ]
-----> Step done
[(9/10) app-image-kit -> compile ]
[ 25%] Built target fuseiso
[ 50%] Built target isofs
[ 75%] Built target runtime
cp: impossible d'évaluer « /cerbero/build/sources/build-tools/app-image-kit-0.9.3/binary-dependencies/x86_64/libjte* »: Aucun fichier ou dossier de ce type
Creating /cerbero/build/sources/build-tools/app-image-kit-0.9.3/AppImageAssistant...
Destination path already exists, exiting
CMakeFiles/AppImageAssistant.dir/build.make:52: recipe for target 'AppImageAssistant' failed
make[2]: *** [AppImageAssistant] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/AppImageAssistant.dir/all' failed
make[1]: *** [CMakeFiles/AppImageAssistant.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
Running command 'make'

Recipe 'app-image-kit' failed at the build step 'compile'
##################

I already try to do this:
> ./cerbero-uninstalled shell
> apt-get install libjte1 libjte-dev
But it's not better :/

2) How I can build a custom gst-plugin with Cerbero?
In fact, I want to build this plugin as a DLL and SO library, to build a Qt app (which includes GStreamer Framework and custom plugins) from Linux (Debian 7.8) for Debian/Ubuntu and also Windows 7/8+ (this is why I need DLL file).
Reply | Threaded
Open this post in threaded view
|

Re: How to do gst-plugin cross-compilation for Windows (dll)?

Sebastian Dröge-3
On Di, 2016-05-03 at 06:49 -0700, AurelienV wrote:
> Thanks for your advice about Cerbero.
>
> However, I have two questions/problems about Cross-Env:
>
> *1)* On Debian 8.4 jessie, I'm not able to complete "./cerbero-uninstalled
> bootstrap". I have an error with the app-image-kit recipe:

See:
https://bugzilla.gnome.org/show_bug.cgi?id=765185

>
> *2)* How I can build a custom gst-plugin *with* Cerbero? 
> In fact, I want to build this plugin as a DLL and SO library, to build a *Qt
> app* (which includes GStreamer Framework and custom plugins) *from Linux*
> (Debian 7.8) for Debian/Ubuntu and also Windows 7/8+ (this is why I need DLL
> file).

The build instructions of everything are in the recipes directory,
check one of the existing ones for an example.

Additional to that you also need to place the relevant files into one
of the .package files in the packages directory, otherwise it does not
end up in the generated packages.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment