Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280212 - app-admin/eselect-opengl does not respect ROOT
Summary: app-admin/eselect-opengl does not respect ROOT
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-08-03 20:43 UTC by Christopher Friedt
Modified: 2009-09-15 10:05 UTC (History)
2 users (show)

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


Attachments
Patch to opengl.eselect (eselect-opengl-1.0.6-r1.patch,1.46 KB, text/plain)
2009-09-12 16:07 UTC, Mandeep Singh Baines
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Friedt 2009-08-03 20:43:31 UTC
I was cross-compiling x11-aps/xdriinfo-1.0.2, and it failed saying

=
checking for library containing glXGetProcAddressARB... no
configure: error: cannot find GL library - make sure Mesa or other OpenGL package is installed
=

$ROOT/usr/lib/libGL.so contains glXGetProcAddressARB, which was odd... however, $ROOT/usr/lib/libGL.so was a symbolic link to a file of x86 architecture! Booo!

I found that very odd, because I just installed x11-libs/mesa and had to manually correct the symbolic link layout that eselect-opengl messed up too, then I noticed that eselect opengl was called during the xdriinfo-1.0.2 ebuild, which explains why it was messed up again. 

The pattern is this:

/usr/armv5tel-softfloat-linux-gnueabi/usr/lib/libGL.so -> /usr/lib/opengl/xorg-x11/lib/libGL.so

should be (relative to /usr/armv5tel-softfloat-linux-gnueabi/usr/lib)

libGL.so -> opengl/xorg-x11/lib/libGL.so

Yes, that's right, eselect-opengl will try to create a symbolic link from the libGL.so in / (of CBUILD architecture) to $ROOT/usr/lib, which is of $CHOST architecture. 

Instead, it should properly detect the $ROOT environment variable, which is set for cross-compilation, and make the symbolic link relative instead of absolute.

Please make eselect-opengl respect the ROOT env variable and change libGL.so accordingly (i.e. relatively, not absolutely).

Reproducible: Always
Comment 1 Maurice van der Pot (RETIRED) gentoo-dev 2009-08-05 09:07:43 UTC
I noticed a similar issue when using something like ROOT=/myrootfs emerge -K <package>.

The symlinks I ended up having looked like this:
libdri.so -> /myrootfs/usr/lib/opengl/xorg-x11/extensions/libdri.so
Comment 2 Mandeep Singh Baines 2009-09-12 16:07:20 UTC
Created attachment 203868 [details]
Patch to opengl.eselect

Use a relative path when creating symlinks
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2009-09-15 10:05:19 UTC
Fixed in 1.0.8.

Thanks for report and for patch.