Bootstrapping GLIB with MinGW

  • strict warning: Non-static method Text_Wiki::singleton() should not be called statically in /var/www/drupal/6.x/sites/www.mingw.org/modules/pearwiki_filter/pearwiki_filter.module on line 475.
  • strict warning: Non-static method Text_Wiki::factory() should not be called statically in /usr/share/php/Text/Wiki.php on line 448.
  • strict warning: Non-static method Text_Wiki::isError() should not be called statically in /usr/share/php/Text/Wiki.php on line 449.
  • strict warning: Declaration of Text_Wiki_Parse_Emphasis::process() should be compatible with Text_Wiki_Parse::process(&$matches) in /usr/share/php/Text/Wiki/Parse/Mediawiki/Emphasis.php on line 0.

Reason:

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.

Alternatives:

One can also use the pkg-config alternatives listed under Build Utilities on the Community_Supplied_Links page.

Requirements:

  • 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
  • export lt_cv_deplibs_check_method="pass_all"
  • export CFLAGS=”O0 -g -pipe -Wall -march=i486 -mms-bitfields -mthreads”
  • export CPPFLAGS=”-DG_ATOMIC_OP_USE_GCC_BUILTINS=1”
  • export LDFLAGS=”-Wl,--enable-auto-image-base”
  • ../configure --prefix=/mingw --with-pcre=internal --disable-static --disable-gtk-doc --enable-silent-rules
  • lengthy amount of time later
  • make
  • lengthy amount of time later
  • make install

Hopefully

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 mingw-users@lists.osdn.me 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.