Using the following scripts you can cross compile gstreamer on Linux host machine (tested on Ubuntu and Debian).
If you don't have a Debian/Ubuntu host and/or you don't want to modify your host, you can try creating a chroot environment, as describrd in GStreamer_Cross_Compile_With_MinGW_In_Chroot_Environment. The following steps should work equally well inside the chroot environment
Contents
1. Pre-requisites
1.1. Install required packages
- Modify /etc/apt/source.list (if necessary):
Ubuntu hardy:
# Binary deb hardy main restricted universe multiverse deb hardy-updates main restricted universe multiverse deb hardy-security main restricted universe multiverse
Debian etch:
deb http://ftp.us.debian.org/debian etch main contrib non-free deb http://ftp.us.debian.org/debian etch-proposed-updates main contrib non-free
root@linux# apt-get update
- Install packages
Ubuntu hardy:
root@linux# apt-get install mingw32 dpkg-dev pkg-config wget libglib2.0-dev unzip libtool automake autoconf m4 gettext cvs flex bison wine git-core subversion
Debian etch:
root@linux# apt-get install mingw32 mingw32-binutils dpkg-dev pkg-config wget libglib2.0-dev bzip2 less unzip libtool automake autoconf m4 gettext cvs flex bison wine git-core subversion
1.2. Make 'bash' your default shell (optional - Ubuntu)
On Ubuntu it might be necessary to force bash as default shell, else some configure scripts might fail (on Debian, bash is already the default shell). However, latest build script patches build infrastructure to arrange for bash where needed, so the following is optional:
root@linux# mv /bin/sh /bin/sh.orig ln -s bash /bin/sh
2. Setup cross-compile root
- Create a directory where all cross compilation will take place:
mnauw@linux> mkdir -p ~/src/win
Obtain cross-env.sh and build_win32_sdk.sh scripts provided below, place them in the build directory and adjust settings in cross-env.sh as appropriate, e.g. according to the build root and the particular naming of the cross compiler in your distro.
3. Build
mnauw@linux> cd ~/src/win bash ./build_win32_sdk.sh preqs deps gst
Arguments given above to the build script direct it to build all basic requirements (e.g. glib), as well as as some ext/ dependency libraries (e.g. lame) and finally various GStreamer releases. Other arguments allow building only a specific package. Details on this, as well as many other comments are provided in the scripts.
4. Miscellaneous
- David Schleef's scripts (local copy):
- Modified version of build_win32_sdk and config.site:
build_win32_sdk_tshalif (with some tweaks to force libtool to create shared DLLs)
- An example forcing gstreamer's configure script to ignore host-installed 'libcdaudio-dev':
echo ac_cv_path_CDAUDIO_CONFIG=no >> ~/src/gstreamer-mingw-cross/config.site
- Latest version of build scripts:
cross-env.sh allows adjusting settings to particular situation

