Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78937 - ATI: Celestia insists on using xorg-x11 libGL.so rather than the ATI libGL.so
Summary: ATI: Celestia insists on using xorg-x11 libGL.so rather than the ATI libGL.so
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-21 04:47 UTC by Wedge_
Modified: 2005-01-23 13:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (emergeinfo,1.80 KB, text/plain)
2005-01-21 04:48 UTC, Wedge_
Details
another kind of workaround (libdir.patch,641 bytes, patch)
2005-01-23 07:16 UTC, Luca Barbato
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wedge_ 2005-01-21 04:47:49 UTC
Celestia always tries to use the libGL.so.1.2 in /usr/lib/opengl/xorg-x11/lib rather than the corresponding file in /usr/lib/opengl/ati/lib. Running "opengl-update ati" before or after emerging has no impact. Running "ldd /usr/bin/celestia | grep libGL.so" always results in "libGL.so.1 => /usr/lib/opengl/xorg-x11/lib/libGL.so.1 (0xb7dc7000)", and the path "/usr/lib/opengl/xorg-x11/lib" appears in the Celestia binary. If I copy /usr/lib/opengl/xorg-x11/lib/libGL.la to /usr/lib/opengl/ati/lib and edit the last line to read "libdir='/usr/lib/opengl/ati/lib'", Celestia does exactly the same but against the ATI libGL, although I'm not sure this is a good idea. I have another system with an nVidia card, and on that Celestia gets correctly linked against the libs in /usr/lib/opengl/nvidia/lib without any trouble. The nVidia driver has it's own libGL.la, while the ATI driver does not (is that significant?). I don't know exactly how all the various libraries are supposed to be set up, so I'm kind of lost at this point. 

One other thing - all the ati-drivers ebuilds _except_ 8.8.25-r1 create a symlink from the xorg-x11 libGL.la to the ati/lib dir. If I try to emerge celestia after emerging the 8.8.25-r1 ebuild, it fails with this message "libtool: link: cannot find the library `/usr/lib/libGL.la'"

Reproducible: Always
Steps to Reproduce:
1. emerge ati-drivers
2. opengl-update ati
3. emerge celestia
4. celestia
Actual Results:  
Celestia starts up, but performs really badly, and looks like software
rendering. Render path 1 is used. Running "LIBGL_DEBUG=1 celestia" displays the
following message: "fglrx: libGL version undetermined - OpenGL module is using
glapi fallback", which I guess is caused because the driver expects its own GL
library. 

Expected Results:  
Celestia normally uses render path 3, and should load a series of ARB vertex
programs on startup. This behaviour can be forced by running
"LD_LIBRARY_PATH=/usr/lib/opengl/ati/lib celestia" or
"LD_LIBRARY_PATH=/usr/lib", and results in much better performance.
Comment 1 Wedge_ 2005-01-21 04:48:27 UTC
Created attachment 49101 [details]
emerge info
Comment 2 Luca Barbato gentoo-dev 2005-01-21 09:03:38 UTC
I'll try to address that issue, sadly enough I'm about to have an heavy exam session and I have less time to use for fixing that problem
Comment 3 Wedge_ 2005-01-21 09:36:41 UTC
No rush, prepending LD_LIBRARY_PATH to the command is an easy workaround for now. 
Comment 4 Luca Barbato gentoo-dev 2005-01-21 09:47:35 UTC
usually opengl-update just seds the libGL.la to put the right path, either that is broken or there is something wrong somewhere else.

I'll add back the symlink once at home if libdir got correctly replaced, if isn't I'll produce one
Comment 5 Luca Barbato gentoo-dev 2005-01-21 12:50:59 UTC
looks like I was wrong about that. In the mean time you could edit the path in the .la file

A better fix will appear in the next opengl-update
Comment 6 Luca Barbato gentoo-dev 2005-01-23 07:16:58 UTC
Created attachment 49284 [details, diff]
another kind of workaround

That is another way to fix it, please test and tell me if works ok.
Comment 7 Wedge_ 2005-01-23 07:50:53 UTC
That seems to work :) I changed the ebuild, emerged it, ran opengl-update, emerged celestia, and it's now using the ATI GL library as it should.  
Comment 8 Luca Barbato gentoo-dev 2005-01-23 13:17:27 UTC
Committed