/usr/bin/gcc -o test test.c -Wl,-dynamic-linker,/lib/ld-linux.so.2,-rpath,/lib
But why would gcc be confused about which loader to use? How do I tell gcc which loader and library path to use as a default, without having to specify explicitly each time I compile? The loader and libraries for glibc 2.3.2 are in the standard location: /lib.
Thanks again for your help.
At 03:27 AM 4/4/2003 -0500, you wrote:
This just means you are using dynamic loader and libc.so
from different builds. Don't do that.
E.g. if you have some version of glibc installed in /lib and another
in /usr/local/foo/lib, the ways to run programs against the libc in
/usr/local/foo/lib is certainly not LD_LIBRARY_PATH=/usr/local/foo/lib.
Either you need to invoke them through the dynamic linker, ie.
/usr/local/foo/lib/ld-linux.so.2 --library-path /usr/local/foo/lib /some/path/prog
or link the programs directly against that dynamic linker and library path:
gcc .... -Wl,-dynamic-linker,/usr/local/foo/lib/ld-linux.so.2,-rpath,/usr/local/foo/lib
Jakub
John Ketchum Qualcomm Inc.
-- Psyche-list mailing list Psyche-list@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/psyche-list