GNOME Bugzilla – Bug 165499
Once installed pkgconfig gives wrong results
Last modified: 2005-02-01 10:22:14 UTC
Steps to reproduce: 1. configure 2. make 3. Stack trace: Other information: Solaris Express comes with gtk+-1.2. By default the dependencies listed in gtk+-2.0.pc says : Requires: gdk-${target}-2.0 atk pkgconfig incorrectly build CFLAGS with includes relative to glib-1.2. By providing explicit dependency to glib-2.x, CFLAGS is built correctly : Requires: glib-2.0 gdk-${target}-2.0 atk
Created attachment 36643 [details] [review] Patch gtk+-2.0.pc.in to explicit glib-2.0 dependency.
Oops, wrong description: Steps to reproduce: 1. configure 2. make 3. make install 4. pkg-config --cflags gtk+-2.0 When issued on a Solaris 10 system with glib-1.2 installed give incoorect results because Sun have installed glib with other needed libraries. Without prepending glib-2.0 dependancy, glib-1.2 headers comes before glib-2.0 headers in include path. So when installing software depending on gtk+-2.0 compilations errors occur.
If your glib-1.2 headers are directly in your include path, you have serious breakage on your system... they were moved in one if the 1.2.x update releases to a subdirectory (so 4 years ago or so). and GLib-2.0 will warn on installation if they are found in the old location. I can't imagine Sun ships this way. Trying to reorder your include lines to work around this will not provide a reliable fix.
:-( So sorry, I encounter the bug in October and didn't report it when I had the exact informations available. Bad Vincent, no sugar. Looking at it again, this have nothing to do with 1.2 but with a 2.x.x version (and yes the subdirs are used, there is even two sets of headers, one under /usr/include and the other under /usr/local/include). I don't have the ressources right now to reproduce it, but hope to be able to track it down in the coming weeks. I will come back whith accurate description then (if the official release of Solaris 10 does not already solve the problem). I couldn't believe neither that Sun ships that way, but the fact is, I encounter a problem with the installation schema they choosed when trying to install a newer version, not on top of the existing one, but in parallel. I hated the fix I provided until I realised that a underlying library was bringing glib-2.0.0 includes in the path when in fact gtk+-2.4.x needed glib-2.4.x headers. Please accept my apologies for this buggy bug report. If can reproduce this bug with accurate description, should I create a new bug or add a comment on this one ?