Question about dynamic link
Tung-Han Hsieh
thhsieh@twcpro.phys.ntu.edu.tw
Thu Apr 1 00:00:00 GMT 1999
Dear All,
I want to test glibc-2.1, but I also want to preserve my stable glibc-2.0.7.
I use Debian-2.1, with glibc-2.0.7 installed in the standard path (/lib,
/usr/lib). And the glibc-2.1 is installed with prefix /usr/local/gnu. Now
I want to have program to use the shared lib in /usr/local/gnu/lib. I
followed the instruction of FAQ:
LD_LIBRARY_PATH=/usr/local/gnu/lib /usr/local/gnu/lib/ld-linux.so.2 prog
But I get the message:
prog: error in loading shared libraries: prog: cannot open shared
object file: No such file or directory
What should I do? To recompile prog with "-L", "-rpath", "-dynamic-linker"
linker options?
Another question: I wrote a program which use setlocale() of libc and
XSupportLocale() of Xlib. In glibc-2.0.7 it works fine, but if I recompile
the program with the above linker options and run the program, the
XSupportLocale() returns False (but setlocale() returns OK). Both glibc-2.1
and Xlib has the localedata installed I specified (our zh_TW.Big5 locale).
I guess that this might be:
THH:thhpc $ ldd /usr/X11R6/lib/libX11.so.6.1
libc.so.6 => /lib/libc.so.6 (0x400a6000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
i.e., libX11 dynamically links to /lib/.... Is that true? How do I solve
this problem?
I use "glibc-2.1.1pre1" for test.
Thank you very much for your attention on this question.
Sincerely yours,
T.H.Hsieh
More information about the Libc-alpha
mailing list