Re: circular dependency between glib and pkg-config



Thanks Ryan,

For those who want to read quickly, the last paragraph mentions what might be a bug in the glib make install, forgotten in my first post.

Looking into glib more in response to replies from the list, the dependence of pkg-config on glib seems less like buying a car in order to listen to its radio, and more like buying a fancy stereo system to listen to a few favorite radio stations. The file size of the libglib dylibs at about 2.8 MB isn't too excessive on the Mac OS X system that got me into this. Glib now seems me like a reasonable possibility for C programs in some common environments to extend the standard C library, done enough that it's mentioned in http://en.wikipedia.org/wiki/C_standard_library. The main event loop might not be needed by most command line tools, but might be useful even to some of them. Thanks for your patience.

However, is there something easy to find (maybe it should go in the tarballs for both packages) that says clearly how to build glib and pkg-config when neither are present to start with?

It seems that the pkg-config README in your message tried to address that, but sorry, I didn't see what zlib had to do with the dependency of glib on pkg-config. ("To build pkg-config, you need glib installed already. Note that glib build-depends on pkg-config, but you can just set the corresponding environment variables (ZLIB_LIBS, ZLIB_CFLAGS are the only needed ones when this is written) to build it.")

Actually, though, my notes for the glib build from tarball don't say that the glib configure, make, or make install complained about lack of pkg-config; so maybe pkg-config is only needed if running autoconf?

Also, http://developer.gnome.org/glib/2.28/glib-building.html refers the reader to ftp://ftp.gtk.org/pub/gtk/v2.2/dependencies for the version of pkg-config needed to build glib, version 0.14 available for download. I gather that this version of pkg-config didn't depend on glib. Can it be used to satisfy glib's dependency on pkg-config?

After apparently successfully building glib 2.28.7, I built pkg-config. In addition to setting the GLIB_* environment variables mentioned in the README, apparently I needed manually to copy glib/glibconfig.h from the glib build directory to its install directory; it wasn't there where the rest of the glib header files were, as I recall copied by glib make install. After that, but not before, the pkg-config make worked.

Thanks again.

On 9/27/2011 1:35 PM, Ryan Lortie wrote:
hi Stuart,

On Sun, 2011-09-25 at 13:45 -0600, Stuart Ambler wrote:
Apparently pkg-config used to contain within it an old version of
glib, used mostly for strings, lists, hash tables, and a few other
things, that the new version has removed and instead made itself
depend on glib.  glib documentation, on the other hand, says that
glib is dependent on pkg-config.

See the pkg-config README about this:

   http://cgit.freedesktop.org/pkg-config/tree/README#n33

Cheers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]