[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Library search path



On Tue, Nov 25, 2003 at 06:18:04PM +0100, Juergen Kreileder wrote:
> Hi,
> 
> this is kind of a followup to a recent nvidia-glx bug which has been
> fixed by not installing TLS libs on systems without TLS support.  That
> probably just hides the real problem:
> 
> Doing 'ldd /usr/X11R6/bin/glxinfo' on linux-2.4 system or on a
> linux-2.6 system with LD_ASSUME_KERNEL=2.4.1 lists the TLS versions
> of the GL libraries:
> 
> % uname -r ; LD_ASSUME_KERNEL=2.4.1 ldd /usr/X11R6/bin/glxinfo 
> 2.6.0-test9-mm5
>                 libGLU.so.1 => /usr/X11R6/lib/libGLU.so.1 (0x410ac000)
>         libGL.so.1 => /usr/lib/tls/libGL.so.1 (0x41408000)
>         libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x413dc000)
>         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x42211000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x40010000)
>         libm.so.6 => /lib/libm.so.6 (0x40061000)
>         libc.so.6 => /lib/libc.so.6 (0x40083000)
>         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x41851000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x41809000)
>         libGLcore.so.1 => /usr/lib/tls/libGLcore.so.1 (0x42835000)
>         libdl.so.2 => /lib/libdl.so.2 (0x401b6000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4fcd3000)
> 
> Debian's glibc only supports TLS with 2.6 kernels, so why does it pick
> up the TLS versions with older kernels?  Shouldn't it omit looking for
> libraries in tls directories with pre 2.6 kernels.

Oh-oh.  Here's the scoop.  The way we currently manage /lib/tls is by
always searching it but tagging the NPTL libraries as requiring kernel
2.6.0; so it's always searched but they may be ignored.  The "tls"
subdir means "things which require thread-local-storage", which does
not correspond directly to NPTL; NPTL happens to require thread local
storage _and_ a 2.6.0 kernel.  TLS works on older kernels.

If the TLS versions of the GLX libraries require NPTL, as seems likely,
then either they need to be tagged as requiring 2.6.0 or we need to
think of a better way to do this.  If you want to tag them as a
short-term solution, compare the ".note.ABI-tag" section in
/lib/libc.so.6 and /lib/tls/libc.so.6 (using objdump).

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: