Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140982 - libGL.la points to /usr/lib/opengl/*, makes some apps link to that path and probably run with sw-rendering on bin-drivers
Summary: libGL.la points to /usr/lib/opengl/*, makes some apps link to that path and p...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-18 16:10 UTC by Hanno Böck
Modified: 2006-08-31 10:18 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Böck gentoo-dev 2006-07-18 16:10:21 UTC
libGL.la from mesa has the following line in it:
libdir='/usr/lib/opengl/xorg-x11/lib'

The same file from bin-drivers have similar lines.

This causes the following problem: If an app links with rpath against libGL using libtool, it'll hard-code the path into the binary.
If this app was compiled when eselect was on xorg-x11 and then the user switched to a bin-driver, the app will use (slow) software rendering mesa.
If it's the other way round (user compiled on bin-driver, switched to mesa-driver), it'll just fail.

Apps that rpath-link are e.g. amarok, glmovie (part of smpeg), metacity and others, check with grep /usr/lib/opengl /usr/bin/*

My proposed solution at the moment would be putting the /usr/lib-path in all libGL.la-files.
As suggested by dberkolz, I'll try that out, rebuild everything that links against libGL and see if anything breaks.

libtool-experts are welcome to propose solutions.
Comment 1 Joshua Baergen (RETIRED) gentoo-dev 2006-07-23 11:28:41 UTC
(In reply to comment #0)
> As suggested by dberkolz, I'll try that out, rebuild everything that links
> against libGL and see if anything breaks.

Have you tried this?
Comment 2 Hanno Böck gentoo-dev 2006-07-27 14:16:37 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > As suggested by dberkolz, I'll try that out, rebuild everything that links
> > against libGL and see if anything breaks.
> 
> Have you tried this?

Yes, couldn't find any problems due to this, so I'd suggest to change it.
Comment 3 Tupone Alfredo gentoo-dev 2006-07-28 14:01:07 UTC
I had a very similar problem, I switched to nvidia with eselect, and some library, like libglut had still the old GL library in the dependency

This is the line I found in libglut.la
# Libraries that this one depends upon.
dependency_libs=' -lm /usr/lib/opengl/xorg-x11/lib/libGL.la -L/usr/lib /usr/lib/libGLU.la -lGL -lSM -lICE -lXmu -lXt -lXi -ldl -lpthread -lXext -lX11 -lXxf86vm'

some ebuild that include GL, and glu will then link with both, nvidia and xorg lib, causing unresolved.

The fix was to rebuild freeglut
Comment 4 Joshua Baergen (RETIRED) gentoo-dev 2006-07-29 11:09:33 UTC
Hanno, what exactly did you change (and how)?
Comment 5 Hanno Böck gentoo-dev 2006-08-01 05:19:32 UTC
joshua: In the libGL.la (located in the portage-tree under media-libs/mesa/files/lib/libGL.la), I changed
libdir='/usr/lib/opengl/xorg-x11/lib'
to
libdir=`/usr/lib`
Comment 6 Hanno Böck gentoo-dev 2006-08-24 11:34:04 UTC
I'd like to get this in before we bump to 6.5.1 (which is to be released within the next days). Anyone objections if I go ahead and commit the fixes? Had no problems so far with my proposed changes, so if noone cries "stop" I'll commit them.

I'd change the libGL.la installed by ati/nvidia-drivers and mesa. Any other package that provides a libGL.la? (I assume not)
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2006-08-24 13:20:10 UTC
Fine by me, might like to ensure it's ok with ati/nvidia maintainers as well.
Comment 8 Hanno Böck gentoo-dev 2006-08-25 13:56:30 UTC
I've committed it to mesa and will commit to ati/nvidia-drivers in about 1-2 days if noone from x11-drivers objects. Am I correct that nvidia-glx is deprecated and soon to be removed, so no need to fix there?

For the long term, we could also think about completely removing libGL.la provided by bin-drivers, they shouldn't be needed. Comparing them, nvidia has a smaller linker-flags-line (probably enough) and some version-info, but I assume that's just for info and has no real purpose.

After that being done, we could remove the switch-forth-and-back in xorg-server, which would avoid further problems (I had users crying that their x-server couldn't be restarted while compiling xorg-server).
Comment 9 Alex 2006-08-25 17:24:00 UTC
To my knowledge nvidia-glx and nvidia-kernel are deprecated. nvidia-drivers is what would need to be updated.
Comment 10 Hanno Böck gentoo-dev 2006-08-27 12:15:04 UTC
ati-drivers uses mesas libGL.la and I've committed the changes to nvidia-drivers/nvidia-legacy-drivers.
Comment 11 Joshua Baergen (RETIRED) gentoo-dev 2006-08-31 10:18:49 UTC
Awesome, thanks Hanno.  I believe this if fixed now.