= MinGW build environment =9 note: NOT FOR THE FAINT OF HEART
Installing MinGW
From http://www.mingw.org/download.shtml, download and install MSYS (MSYS-1.0.10.exe) and msys-DTK ( msysDTK-1.0.1.exe).
Build dependencies
After installing MinGW, we'll build all the dependencies of FreeMix from source. The MSYS binaries and libraries are installed in the default / path (on my machine, c:\msys\1.0). All the things we'll build from source will be installed to /c/devel (from the Windows point of view, c:\devel). I prefer to keep them separate from MinGW/MSYS to be able to delete them and restart from a clean state without reinstalling MinGW.
Before starting, set up the environment with
export PATH=$PATH:/c/devel/bin export CFLAGS="-I/c/devel/include -L/c/devel/lib" export PKG_CONFIG_PATH=/c/devel/lib/pkgconfig
Note: setting the include and the library path in CFLAGS is discouraged. Setting them in CPPFLAGS and LDFLAGS would be a cleaner solution, but unluckly autoconf ignores them. If all the world simply used pkg-config, we wouldn't need these hacks...
Most libraries (unless noted otherwise) should build and install with a simple
./configure --prefix=/c/devel make make install
Things to build:
Base libraries
- GNU libiconv (1.11) http://mirrors.kernel.org/gnu/libiconv/
- use ./configure --prefix=/c/devel --enable-relocatable --disable-rpath
- GNU gettext (0.16.1) http://mirrors.kernel.org/gnu/gettext/
- use ./configure --prefix=/c/devel --with-libiconv-prefix=/c/devel
- pkg-config (0.21) http://pkgconfig.freedesktop.org/releases/
- it needs an already installed GLib 2. Get a Win32 binary at http://www.gimp.org/~tml/gimp/win32/downloads.html and extract it in /local. You can safely delete it after calling "make install".
- GLib (2.12.6) http://ftp.acc.umu.se/pub/GNOME/sources/glib/
- libxml2 (2.6.27) ftp://xmlsoft.org/libxml2/
- GNU Bison
- I wasn't able to build it from source (it needs to be patched, as it's dependent on fork() and pipe()). Get a binary from http://gnuwin32.sourceforge.net/packages/bison.htm
- it needs libintl3.dll from http://gnuwin32.sourceforge.net/packages/libintl.htm
- it needs libiconv2.dll from http://gnuwin32.sourceforge.net/packages/libiconv.htm
- I wasn't able to build it from source (it needs to be patched, as it's dependent on fork() and pipe()). Get a binary from http://gnuwin32.sourceforge.net/packages/bison.htm
- GNU Flex
- same as above, http://gnuwin32.sourceforge.net/packages/flex.htm
- Expat (2.0.0) http://sourceforge.net/project/showfiles.php?group_id=10127&package_id=10780
- liboil (0.3.9) http://liboil.freedesktop.org/download/
- 0.3.10 doesn't build correctly, a fix is in CVS.
- libsamplerate (TO BE WRITTEN)
- jackdmp (TO BE WRITTEN)
GStreamer
You don't need to build every plugin, just the ones you need.
- GStreamer (0.10.9) http://gstreamer.freedesktop.org/src/gstreamer/
- in gst/gst_private.h delete the "__declspec(dllimport)" at line 52. Don't ask me why it works.
- gst-plugins-base (0.10.9) http://gstreamer.freedesktop.org/src/gst-plugins-base/
- libogg (1.1.3) http://www.xiph.org/downloads/
- libvorbis (1.1.2) http://www.xiph.org/downloads/
- use "CFLAGS="$CFLAGS -logg" ./configure --prefix=/c/devel", it won't link correctly otherwise
- libflac (1.1.2) http://www.xiph.org/downloads/
- MinGW's sed coredumps (!). You'll need make -i to go ahead (and forget about FLAC-in-Ogg support)
- gst-plugins-good (0.10.4) http://gstreamer.freedesktop.org/src/gst-plugins-good/
- use "CFLAGS="$CFLAGS -lgstbase-0.10" ./configure --prefix=/c/devel"
- gst-plugins-ugly (0.10.4) http://gstreamer.freedesktop.org/src/gst-plugins-ugly/
- some of these plugins won't build. Go ahead with make -i
- libmad (0.15.1b) ftp://ftp.mars.org/pub/mpeg/
- after installing, remove or rename c:\devel\lib\libmad.la, or the "mad" plugin in gst-plugins-ugly will fail to link
- libid3tag (0.15.1b) ftp://ftp.mars.org/pub/mpeg/
- after the installation, remove or rename c:\devel\lib\libid3tag.la or the "id3tag" plugin in gst-plugins-ugly will fail to link
GTK+
- tiff (3.7.4) ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies/
- JPEG (v6b) ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies/
- use "./configure --prefix=/c/devel --enable-shared --enable-static"
- libpng (1.2.8) - get the ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.12.tar.bz2 tarball
- install with "make install -i", or it will fail while creating a symlink
- FreeType (2.1.10) http://download.savannah.gnu.org/releases/freetype/
- don't use the 2.2 series, you won't be able to build fontconfig
- delete or rename /c/devel/lib/libfreetype.la, or fontconfig won't link
- fontconfig (2.3.2) http://fontconfig.org/release/
- in fc-cache/fc-cache.c change the line 309 from "sleep (2)" to "_sleep (2000)"
- cairo (1.2.4) from
- note: the cairo tarball from the GTK+ dependencies page ( ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies/) is too old to work with GTK...
- when it stops building, copy the src/pango.def from a built copy of 1.2.0
- pango (1.14.1) http://ftp.gnome.org/pub/GNOME/sources/pango/1.14/
- run "pango-querymodules.exe > /c/devel/etc/pango/pango.modules" after installing
- atk (1.9.1) ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies/
- NOTE: it will try to find "../glib/build/win32/lt-compile-resource", and obviously GLib 2.12 doesn't ship it. I've copied it from an old GLib 2.8 tarball, and it was enough to make atk happy.
- GTK+ (2.10.2) ftp://ftp.gtk.org/pub/gtk/v2.10/
- it won't find the header files for jpeglib. Copy c:\devel\include\jpeglib.h, jconfig.h and jmorecfg.h to c:\MinGW\include
- it won't find the header files for libtiff. Copy c:\devel\include\tiff.h, tiffconf.h, tiffio.h and tiffver.h to c:\MinGW\include
- a bug in MSYS's shell ate countless hours of my time. Get the attached pkg-config.sh, put it in /c/devel/bin, make it executable, do an export PKG_CONFIG=/c/devel/bin/pkg-config.sh before running ./configure, and thank Owen Taylor.
- libglade (2.0.1) http://ftp.gnome.org/pub/GNOME/sources/libglade/2.0/
Attachments
-
pkg-config.sh
(124 bytes) - added by ath
4 years ago.
Workaround for a MSYS command substitution bug
