Re: Repost: error--/lib/libc.so.6: undefined reference to '__libc_stack_end@GLIBC_2.1'

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

 



Thank you, Jakub. That was indeed the problem. The following command line does the trick:
/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

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux