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

mitchell phillip Laks mlaks2000 at yahoo.com
Tue Dec 12 09:05:03 PST 2006


Tollef Fog Heen <tfheen at ...> writes:


> You're saying that you have a locally-compiled gtkglext installed to
> /usr/local?  And you have an /usr/local/lib/pkgconfig/gtkglext.pc?
> And the gtkglextmm configure fails to find gtkglext?
> 

Dear Tom and Tollef:

thank you both for all your help!

I think I now understand what the problem is/was.

In fact I just did the recompilation here at work and at home.

I have decided that all the errors
probably reflects some prior existing files in
/usr/local/lib from prior compilations from source of various parts
of gtk, gtkmm components that are interfering for instance by having odd .
pc
files lying around in /usr/local/lib/pkgconfig.

Once I got rid of /usr/local/lib/ by moving it out of the way completely
then all works. I will try it again at home tonight.

Earlier I had problems that:

Even though the .pc files are in /usr/local/lib/pkgconfig/ 
ie: here at work:

radperfect1:/home/mlaks/gtkglextmm-1.2.0# ls /usr/local/lib/pkgconfig -ltr
total 16
-rw-r--r-- 1 root root 383 2006-12-12 11:24 gtkglext-x11-1.0.pc
-rw-r--r-- 1 root root 383 2006-12-12 11:24 gtkglext-1.0.pc
-rw-r--r-- 1 root root 479 2006-12-12 11:24 gdkglext-x11-1.0.pc
-rw-r--r-- 1 root root 479 2006-12-12 11:24 gdkglext-1.0.pc


I still get the ./configure error below:

checking for GtkGLExt - version >= 1.0.0... no
*** Could not run GtkGLExt 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 GtkGLExt is incorrectly 
installed.
configure: error: GtkGLExt not found

I now can compile stuff based upon gtkglext-1.2 and gtkglextmm-1.2
but I currently need to first do
export LD_LIBRARY_PATH=/usr/local/lib first -
before compiling anything (gtkglextmm or examples) using the gtkglext
libraries.
However what can I do to avoid having to do this, or putting it in 
the .profile file?  Shouldnt it just work?

Note:

> cat /usr/local/lib/pkgconfig/gtkglext-1.0.pc

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

target=x11
api_version=1.0

multihead=yes

Name: GtkGLExt
Description: OpenGL Extension to GTK+ (${target} target)
Version: 1.2.0
Requires: gdkglext-${target}-${api_version} gtk+-2.0
Libs: -L${libdir} -lgtkglext-${target}-${api_version}
Cflags: -I${includedir}/gtkglext-${api_version}


****************************

Below are the steps I took last night (and today) to 
compile gtkglext and gtkglextmm on
a debian sid system with atk, gtk2, gtkmm etc, using the 
Nvidia proprietary drivers.


documentation of steps:

Here are the steps I took
 


1)Q.  	where did the nvidia drivers put the gl components?

  A.	from th output of ./NVIDIA-Linux-x86_64-1.0-9631-pkg2.run -A|less

/usr seems to be the default prefix
/usr/include/GL
/usr/lib

Thus:

2) 
mlaks at Rashi:~/gtkglext-1.2.0$ ./configure --with-gl-prefix=/usr 
--with-gl-includedir=/usr/include/GL --with-gl-libdir=/usr/lib   

works!

final output was

configuration:
        OpenGL CFLAGS:          -I/usr/include/GL
        OpenGL LIBS:            -L/usr/lib -lGLU -lGL
        multihead support:      yes
        debug:                  minimum
        extra defs:

3)

then as root 
i did make
make install

4) 
output included the following stanzas:

ranlib /usr/local/lib/libgdkglext-x11-1.0.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib

_______________________________
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
______________________________

chmod 644 /usr/local/lib/libgtkglext-x11-1.0.a
ranlib /usr/local/lib/libgtkglext-x11-1.0.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

____________________

ls -l /usr/local/lib|grep glext 

-rwxr-xr-x 1 root staff 1065607 2006-12-12 00:11 
libgdkglext-x11-1.0.so.0.0.0
lrwxrwxrwx 1 root staff      28 2006-12-12 00:11 
libgdkglext-x11-1.0.so.0 -> libgdkglext-x11-1.0.so.0.0.0
lrwxrwxrwx 1 root staff      28 2006-12-12 00:11 libgdkglext-x11-1.0.so 
-> libgdkglext-x11-1.0.so.0.0.0
-rwxr-xr-x 1 root staff    1323 2006-12-12 00:11 libgdkglext-x11-1.0.la
-rw-r--r-- 1 root staff 1807414 2006-12-12 00:11 libgdkglext-x11-1.0.a
drwxr-sr-x 2 root staff    4096 2006-12-12 00:11 pkgconfig
-rwxr-xr-x 1 root staff   39849 2006-12-12 00:11 
libgtkglext-x11-1.0.so.0.0.0
lrwxrwxrwx 1 root staff      28 2006-12-12 00:11 
libgtkglext-x11-1.0.so.0 -> libgtkglext-x11-1.0.so.0.0.0
lrwxrwxrwx 1 root staff      28 2006-12-12 00:11 libgtkglext-x11-1.0.so 
-> libgtkglext-x11-1.0.so.0.0.0
-rwxr-xr-x 1 root staff    1411 2006-12-12 00:11 libgtkglext-x11-1.0.la
-rw-r--r-- 1 root staff   55740 2006-12-12 00:11 libgtkglext-x11-1.0.a


5) 

then i did
cd gtkglextmm

apt-get install  doxygen doxygen-gui and goxygen-doc
apt-get install  graphviz graphviz-dev graphviz-doc

and to check

pkg-config --variable=multihead gtkglext-1.0
yes

6) 

then i tried to configure and it failed 
error output was


checking for GtkGLExt - version >= 1.0.0... no
*** Could not run GtkGLExt test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding GtkGLExt or finding the 
wrong
*** version of GtkGLExt. If it is not finding GtkGLExt, you'll need to 
set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to 
point
*** to the installed location  Also, make sure you have run ldconfig if 
that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, 
although
*** you may also be able to get things to work by modifying 
LD_LIBRARY_PATH
configure: error: GtkGLExt not found

7)

so i did
ls  

then i did

make
make install
make examples

Thank you






More information about the pkg-config mailing list