broken: pkg-config and $includedir/gnome-2.0
- From: jacob berkman <jacob ximian com>
- To: Havoc Pennington <hp redhat com>
- Cc: gnome-2-0 <gnome-2-0-list gnome org>, gtk-devel-list gnome org
- Subject: broken: pkg-config and $includedir/gnome-2.0
- Date: 27 Oct 2001 21:41:04 -0400
i've found some brokenness in how pkg-config handles having multiple
versions of packages in $PKG_CONFIG_PATH. i apologize for the lack of
brevity in this mail, but the problem is a little complex.
i have libgnomecanvas-2.0 and libgnome-2.0 (packages which aren't
dependant on each other, and only actually both depend on glib2-2.0)
installed from packages in /usr. i also have a /gnome2 where i can work
on things without trashing my system. i have libgnomecanvas-2.0
installed there, also.
some environment flags i have set:
declare -x GNOME_PATH="/gnome2:/usr"
declare -x LD_LIBRARY_PATH="/gnome2/lib"
declare -x PKG_CONFIG_PATH="/gnome2/lib/pkgconfig:/usr/lib/pkgconfig"
from these things, everything should be looking in /gnome2 first.
so, with pkg-config each package should be putting its include files in
a subdirectory of a unique-per-package-"platform"-version directory
(glib uses $includedir/glib-2.0). however, gnome sublibraries are all
sharing $includedir/gnome-2.0. this breaks in my above scenario.
if i do "pkg-config --cflags libgnome-2.0 libgnomecanvas-2.0", libgnome
will add -I/usr/include/gnome-2.0 before the canvas adds
-I/gnome2/include/gnome-2.0. this results in the canvas headers from
/usr/include/gnome-2.0 being used.
however, if i do "pkg-config --cflags libgnomecanvas-2.0 libgnome-2.0",
it will work how i expect. this might be easier to understand with:
jacob wet-pants:jacob G2$ pkg-config --libs-only-L libgnomecanvas-2.0 libgnome-2.0
-L/gnome/lib -L/usr/lib -L/usr/X11R6/lib
jacob wet-pants:jacob G2$ pkg-config --libs-only-L libgnome-2.0 libgnomecanvas-2.0
-L/usr/lib -L/gnome/lib -L/usr/X11R6/lib
at link time, libgnomecanvas would get pulled from /usr/lib but at run
time (due to LD_LIBRARY_PATH) it will link against the one in
/gnome2/lib!
the problem is that pkg-config is doing:
for directory in searchpath:
for file in directory:
add_to_hash
for pkg in pkglist:
if pkg is in hash
load_flags
else
error
while i think it should be doing something more like:
for pkg in pkglist:
add_to_hash
for directory in searchpath:
for file in directory:
if file is in hash
load flags
mark pkg as found
for pkg in pkglist
if pkg isn't found
error
so gnome maintainers, anyone have a problem with me fixing the include
dirs not to be $includedir/gnome-2.0, but use $includedir/$PACKAGE-2.0 ?
pkg-config guys, thoughts?
hopefully this was somewhat understandable.
jacob
--
"Beat mixing is 10000 times more fun than even video games."
-- bt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]