pkg-config incorrect about libglib2 version when compiling gtkglext. but correct .pc file is there

mitchell phillip Laks mlaks2000 at yahoo.com
Mon Dec 11 17:33:20 PST 2006


Tom Parker wrote:
> 
> Several things to try
> 1) Double-check the configure result - try running "pkg-config 
> --modversion glib-2.0" directly. If that works, have a look at the 
> config.log. Look just before the running of pkg-config, and see if 
> configure is doing something odd.
> 3) If 1) doesn't work, check you've got the latest version of pkg-config 
> installed. Latest version in sid is 0.21-1.
> 4) Check if you've got a glib-2.0.pc in /usr/local/pkgconfig. That would 
> only be there if you've manually installed a version earlier. If it's 
> there, delete it.
> 5) If you've installed the newest pkg-config, you can't find anything 
> odd in the config.log, and you're sure that your environment is clean, 
> install strace and run "strace pkg-config --modversion glib-2.0 
> 2>strace.log", then send the strace.log to this mailing list.

thank you Tom!

mlaks at radperfect1:~/gtkglext-1.2.0$ dpkg -l|grep pkg-config
ii  pkg-config                       0.21-1                              manage
compile and link flags for libraries
thus i have the latest version of pkg-config in sid

moreover i get a bad output from  
 
radperfect1:~# pkg-config --modversion glib-2.0
2.8.6

radperfect1:~# ls /usr/local
Adobe  bin  dicom  etc  games  include  kde  lib  man  sbin  share  src
thus there is no /usr/local/pkgconfig

but wait!

there IS a /usr/local/lib/pkgconfig and 

you are right! 
the evil thing  in there: the bad glib-2.0.pc

mlaks at radperfect1:~$ cat /usr/local/lib/pkgconfig/glib-2.0.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.8.6
Libs: -L${libdir} -lglib-2.0
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include


OK: so if I delete this guy I should be ok.

OK - so i must have been playing with installing all these libraries from source
some time in the past (I forgot! that i used this machine for this - but now i
learn what happens..)

1) When I went in to the man page for pkg-config, i read
By default, pkg-config looks in the directory prefix/lib/pkgconfig  for
       these  files;
i interpreted this to mean it looked in /usr/lib/pkgconfig. It never occured to
me that there is also /usr/local/lib/pkgconfig to check.

2) OK now that I know how to get the compilation beyond that point. I first
removed the bad glib-2.0.pc which solved that problem - but then the compilation
still stopped again at the point and said i dont have gtk-2.0, which i have (but
in the usual debian location,  NOT in /usr/local/lib ....

So at this point I just moved /usr/local/lib/pkgconfig to
/usr/local/lib/pkgconfig.old and then ran ./configure and then it compiled to
the point of demanding opengl libraries (WHICH IS NOT A PCG_CONFIG issue :))

So my question is now, 
once i satisfy the opengl stuff, (which is MY problem) 
I will like to install the second package gtkglextmm 
which depends upon gtkglext. 

When I tried to do the gtkglextmm compilation on a separate machine, 
with the 'same' sid setup as this one -just not messed up by no prior
compilations of atk pango and glib 
(that i must have been playing with here on this machine when it was running
sarge a while ago) 
the other machine ./configure could not find the information on gtkglext even
though I had just make installed gtkglext.

So my question is what exactly is the "best" way to configure the machine to
find the newly compiled gtkglext. I need info both from the native debian .pc
files ie: /usr/lib/pkgconfig as well about this.

Exactly what to put in PKG_CONFIG_PATH or can i simply get a .pc file for
gtkglext and put it somewhere ...

thank you so much!
Mitchell
This occurs because debian sid does not have gtkglext-1.2 and does not even have
 gtkglextmm at all. I wanted them to be in sync, i figure they should work well
with the sid versions of gtk and gtkmmm.
 






More information about the pkg-config mailing list