PDA

View Full Version : Compiling with libGL.la and libGL.so


Aglanor
04-21-03, 03:56 AM
Hi there!

I have successfully installed the new nvidia drivers, and I shall also congrat the devs for making it such an easy process. I had no problem with previous drivers either, but I can see how this new system can help people who is new to linux and don't have a clue.

My main problem is that when compiling other applications, they keep looking for libGL.la and libGL.so under /usr/X11R6/lib, instead of using nvidia's libGL.so* under /usr/lib.

It seems that there is a flag somewhere that is need to be re-set, so the new nvidia flags can be used.

This problem has happened to me when building the OGRE 3d engine, and the OGRE developer said it might be something related to SDL not finding the nvidia libs. The whole thread is here on the OGRE forums:
http://ogre.sourceforge.net/phpBB2/viewtopic.php?t=1211

I shall note that this didn't happen with the previous drivers (installing from source). After reading the main nvidia drivers thread (and finding out we still have the source), I'll try uninstalling and reinstalling the new drivers from source too, but in any case it might be useful to note this problem.

Anyone can shed a little light upon this issue?

Thanks in advance,

Aglanor

bwkaz
04-21-03, 08:06 AM
Do you have a libSDL.la file anywhere? It'll probably be in /usr/lib.

See if that file has an explicit dependency on /usr/X11R6/lib/libGL.la (.la files are just plain text), and also see if you can rewrite it so that it brings in /usr/lib/libGL.so instead.

The problem seems like it's SDL's fault, along with libtool's. SDL was compiled with a libtool library for libGL, in /usr/X11R6/lib, so it recorded that filename and location in the libSDL.la file. Then, when the nVidia drivers got installed, they deleted those files (which is the Right Thing to do; if you have those files laying around, then programs linking against them won't get hardware 3D), but the .la file hardcoded path is screwing things up...

Though I don't have any mention of -lGL in my libSDL.la file...

Aglanor
04-21-03, 02:29 PM
Gotcha!

Tried /usr/lib/libSDL.la, it made references to /usr/X11R6/lib, removing that dependency didn't work, it kept complaining about libGL.la not being there.

Then I grep'ed for libGL.la under /usr/lib, no luck. Then I grep'ed for libGL.la under /usr, and voilá!, here's the one to blame:

X11R6/lib/libGLU.la:dependency_libs=' /usr/X11R6/lib/libGL.la -L/usr/X11R6/lib -lSM -lICE -lXmu -lXext -lXi -lX11 -lpthread -lsupc++ -lgcc_s'

Just removed the /usr/X11R6/lib/libGL.la from that, and it seems the app is building good. It segfauls when executing, but perhaps this is an OGRE thing because this time it's not accessing the old libGL in any place.

I wonder if this is a problem of mine (perhaps the order in which I installed Nvidia and GLU?) or if it is a wider problem (like a mandrake 9.1 release problem).

bwkaz, thanks a lot for your help!

Aglanor