pkgconfig vs glib-config

Jim Osborn jimo at eskimo.com
Tue Dec 6 14:14:52 PST 2005


In the NEWS file in the glib-2.8.3 tarball (the latest as of a month ago)
it says:
   Overview of Changes in GLib 1.3.7:
   ==================================
   ...
   * Removed glib-config-2.0 in favour of pkgconfig [Sebastian]

I've been building the components of the GIMP, and all was going
well until oaf-0.6.10 (the latest on the gnome site, circa 2002)
when configure complained about all things GLIB (I'll include some
examples below).  It seems oaf expects to find a glib-config script,
and the only one I seem to have is part of the pkg-config-0.20 build,
in the glib-1.2.8 subdirectory.

Pkgconfig does not install a glib-config script, nor does glib >=1.3.7
apparently, but I understand that NEWS item above to mean that pkgconfig
can be used for the same purpose.

I've tried linking /usr/local/bin/pkg-config to /usr/local/bin/glib-config
and tried copying <build>/pkg-config-0.20/glib-1.2.8/glib-config
to /usr/local/bin, with no success (the error messages change slightly).

So I'm wondering what it takes to use pkgconfig in place of
glib-config-2.0 as [Sebastian] says above?  Is there a reason that
pkg-config-0.20 includes its own copy of glib-1.2.8 with its 
glib-config file (is glib >1.2.8 deprecated?).

I could perhaps hack the glib-config shell script from pkg-config-0.20
to function like pkg-config, but that seems silly; why not use
pkg-config itself?

Rather than thrash randomly on this issue, I thought I'd ask.

TIA,

Jim


Here's a typical log of the output of oaf's configure process:
With pkgconfig's glib-1.2.8/glib-config script in /usr/local/bin:
checking for glib-config... /usr/local/bin/glib-config
checking for GLIB - version >= 1.2.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB was incorrectly installed
*** or that you have moved GLIB since it was installed. In the latter case, you
*** may want to edit the glib-config script: /usr/local/bin/glib-config
configure: error:
*** GLIB 1.2.0 or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org/.
------------------------------------------------

With ln -s /usr/local/bin/pkg-config /usr/local/bin/glib-config:
checking for glib-config... /usr/local/bin/glib-config
checking for GLIB - version >= 1.2.0... Package gmodule was not found in the pkg-config search path.
Perhaps you should add the directory containing `gmodule.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gmodule' found
Package gmodule was not found in the pkg-config search path.
Perhaps you should add the directory containing `gmodule.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gmodule' found
no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB was incorrectly installed
*** or that you have moved GLIB since it was installed. In the latter case, you
*** may want to edit the glib-config script: /usr/local/bin/glib-config
configure: error:
*** GLIB 1.2.0 or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org/.
------------------------------------------------

[Yes, all the .pc files "not found" above are in /usr/local/lib/pkgconfig/]


More information about the pkg-config mailing list