[clug] using LD_LIBRARY_PATH to load different glibc

Simon Burton simon at arrowtheory.com
Tue May 2 02:22:59 GMT 2006


Hi,

I've compiled a different glibc (2.3.6) to the one I have installed (2.3.2),
and I'm trying to use LD_LIBRARY_PATH so that my programs
are run with this alternate glibc. Here is the trouble:

$  env LD_LIBRARY_PATH=/home/users/simonb/lib ls
ls: relocation error: /home/users/simonb/lib/libpthread.so.0: symbol _rtld_global_ro, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference

This is probably because the other glibc is still being loaded.
>From strace:

execve("/usr/bin/env", ["env", "LD_LIBRARY_PATH=/home/users/simonb/lib", "ls"], [/* 33 vars */]) = 0
uname({sys="Linux", node="himalia", ...}) = 0
brk(0)                                  = 0x804c000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe9000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3 # <----------- no!
fstat64(3, {st_mode=S_IFREG|0644, st_size=114916, ...}) = 0
old_mmap(NULL, 114916, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fcc000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY)    = 3 # <----------- bummer
...
open("/home/users/simonb/lib/libc.so.6", O_RDONLY) = 3
...
open("/home/users/simonb/lib/libpthread.so.0", O_RDONLY) = 3


So, my first question is, is this possible at all (without using chroot) ?

thanks,

Simon.


-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 


More information about the linux mailing list