On Tue, 19 Feb 2002, Malte Cornils wrote:
> Jose Fonseca wrote:
> >>mthaler:~# ldd /usr/X11R6/bin/glxinfo
> >> libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x4009c000)
> >>where quake3 probably uses the libGL from /usr/lib/
> >>lrwxrwxrwx 1 root root 31 19. Feb 12:11 /usr/lib/libGL.so.1.2 ->
>/usr/X11R6-DRI/lib/libGL.so.1.2
>
>
> > No, there's no need. You probably just have to change the order on which
> > /usr/lib/ and /usr/X11R6/lib/ directories appear on /etc/ld.so.conf and
> > run '/sbin/ldconfig'
>
> Unfortunately, /usr/lib is *always* the first directory to get
> parsed no matter what /etc/ld.so.conf says - due to security reasons
> (man ldconfig and experiment!)
>
> The only halfway "easy" (but ugly) solution was indeed to
> copy/symlink the DRI-enabled libGL to /usr/lib.
I thought this was done by "make install", I have:
% ls -l /usr/lib/libGL*
lrwxrwxrwx 1 root root 27 Feb 18 19:34 /usr/lib/libGL.so
-> /usr/X11R6-DRI/lib/libGL.so
lrwxrwxrwx 1 root root 29 Feb 18 19:34
/usr/lib/libGL.so.1 -> /usr/X11R6-DRI/lib/libGL.so.1
When I'm running the X server w/o DRI, the libGL from DRI still works
using software. I have a shell script to switch between servers with DRI
enabled/disabled. That script adds "/usr/X11R6-DRI/lib" above
"/usr/X11R6/lib" in ld.so.conf and runs ldconfig (among other things).
I'm attaching the script if anyone wants to use or modify it.
--
Leif Delgass
http://www.retinalburn.net
#!/bin/sh
if [ $UID -ne 0 ]; then
echo "You must be root to run this utility."
exit
fi
SERVER=$1
if [ "$SERVER" == "dri" ]; then
cd /etc/X11
rm X
ln -s ../../usr/X11R6-DRI/bin/XFree86 X
cat XF86Config | sed -e 's/ModulePath "\/usr\/X11R6\//ModulePath
"\/usr\/X11R6-DRI\//' > XF86Config.tmp
rm XF86Config
mv XF86Config.tmp XF86Config
grep -q DRI /etc/ld.so.conf
if [ $? -ne 0 ]; then
cat /etc/ld.so.conf | sed -e
's/\/usr\/X11R6\/lib/\/usr\/X11R6-DRI\/lib\
\/usr\/X11R6\/lib/' > /etc/ld.so.conf.tmp
rm /etc/ld.so.conf
mv /etc/ld.so.conf.tmp /etc/ld.so.conf
ldconfig
fi
echo "DRI enabled X server configured"
else
cd /etc/X11
rm X
ln -s ../../usr/X11R6/bin/XFree86 X
cat XF86Config | sed -e 's/ModulePath "\/usr\/X11R6-DRI\//ModulePath
"\/usr\/X11R6\//' > XF86Config.tmp
rm XF86Config
mv XF86Config.tmp XF86Config
cat /etc/ld.so.conf | sed -e 's/\/usr\/X11R6-DRI\/lib//' | egrep '.+' >
/etc/ld.so.conf.tmp
rm /etc/ld.so.conf
mv /etc/ld.so.conf.tmp /etc/ld.so.conf
ldconfig
echo "Standard X server configured"
fi