On Sun, Mar 07, 2010 at 03:48:45PM +0100, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Package: libc-bin
> Version: 2.10.2-6
> 
> I would like to override the "standard" libGL.so files by a "private"
> library installed in a special directory. Problem: It seems that
> the libraries in in /lib and /usr/lib have a higher priority than any
> other directory. This is a severe restriction. Looking at ld.so(8)
> I had the impression that /lib and /usr/lib are supposed to provide a
> _default_ set of libraries to be overridden by ld.so.conf and
> $LD_LIBRARY_PATH as needed;
> 
> :
> :
> The necessary shared libraries needed by the program are searched for in the 
> following order
> 
> o      Using  the  environment  variable LD_LIBRARY_PATH 
> (LD_AOUT_LIBRARY_PATH for a.out programs).  Except if
>        the executable is a setuid/setgid binary, in which case it is ignored.
> o      From the cache file /etc/ld.so.cache which contains a compiled list of 
> candidate  libraries  previously
>        found in the augmented library path.
> o      In the default path /lib, and then /usr/lib.
> :
> :
> 
> 
> Here is my setup:
> 
>       % cat /etc/ld.so.conf
>       include /etc/ld.so.conf.d/*.conf
> 
>       % cat /etc/ld.so.conf.d/*.conf
>       /usr/lib/nvidia-current
>       /usr/lib32/nvidia-current
>       # libc default configuration
>       /usr/local/lib
>       # Multiarch support
>       /lib/x86_64-linux-gnu
>       /usr/lib/x86_64-linux-gnu
> 
> AFAICS this is Debian's default, except for the nvidia libs. Please note
> that there is neither /usr/lib nor /lib included in this list.
> 
> ldd and strace show that the library is taken from the wrong directory.
> Sample session:
> 
> % cat <<EOF >/tmp/conftest.cpp
> > #include <GL/gl.h>
> > int main () { glBegin(GL_POINTS); return 0; }
> > EOF
> % g++ /tmp/conftest.cpp -I/usr/include/nvidia-current 
> -L/usr/lib/nvidia-current -lGL -o /tmp/conftest
> % ldd /tmp/conftest
>         linux-vdso.so.1 =>  (0x00007fff217ff000)
>         libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f4673b5f000)
>         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f467384b000)
>         :
>         :
> %
> % file -L /usr/lib/libGL.so.1 /usr/lib/nvidia-current/libGL.so.1
> /usr/lib/libGL.so.1:                ELF 64-bit LSB shared object, x86-64, 
> version 1 (SYSV), dynamically linked, for GNU/Linux 2.4.20, stripped
> /usr/lib/nvidia-current/libGL.so.1: ELF 64-bit LSB shared object, x86-64, 
> version 1 (SYSV), dynamically linked, stripped
> 

Have you run "ldconfig" after doing the change? What's the output of
"ldconfig -p | grep libGL.so.1"?

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to