Revision of Bootstrapping GLIB with MinGW from 2011, September 28 - 12:33

Printer-friendly version


There is a circular dependency between GLIB and the pkg_config packages. In order to overcome the lack of the dependencies you must do a bootstrap method. This requires some basic knowledge of how to overcome the requirement of pkg_config within the GLIB configure process by telling the configure script where to find some things that pkg_config would have given it.


  • Using mingw-get install
    • gcc
    • g++
    • libiconv
    • zlib
    • libz
    • msys
    • msys-perl
    • msys-m4
  • Install python-2.7 and point your PATH to the installation directory e.g. /c/python as well as /c/python/DLLs.
  • Download the source, build and install libffi
    • cd /path/to/libffi/source
    • mkdir bld
    • cd bld
    • ../configure --prefix=/mingw
    • make && make install

Building GLIB without PKG_CONFIG:

  • cd /path/to/glib/source
  • mkdir bld
  • cd bld
  • export LIBFFI_CFLAGS='-I /mingw/lib/libffi-VERSION/include'
    • VERSION is to be replaced with whatever version you built above.
    • For me VERSION is 3.0.10.
  • export LIBFFI_LIBS=-lffi
  • ../configure --prefix=/mingw --with-pcre=internal
  • lengthy amount of time later
  • make
  • lengthy amount of time later
  • make install


If all goes well you should now be able to build pkg_config and install it. Then come back to GLIB and rebuild it.

  • cd /path/to/glib/source/bld
  • make clean
  • ../configure --prefix=/mingw
  • make
  • make install
This wiki is not a forum for discussion of usage issues. Please use the list instead. We do not allow creation of comments by anonymous or untrusted users, on any page.
Site Status

Site maintenance performed successfully, site online Dec 13th 12:00 AM Eastern.