This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found
- From: Ron Arts <ron dot arts at neonova dot nl>
- To: binutils at sources dot redhat dot com
- Date: Sat, 26 Apr 2003 16:38:59 +0200
- Subject: ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found
- Organization: NeoNova BV
Hello,
We are creating a chrooted development environment, and
have the above error report when issuing the following command:
# cc -o nbs-bbnet nbs-bbnet.c
ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found (try
using -rpath or -rpath-link)
/lib/libc.so.6: undefined reference to
`_dl_lookup_versioned_symbol_skip at GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_rtld_global at GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to
(etc)
Now, ld is called as follows by `cc`:
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o nbs-bbnet
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../.. /tmp/gASdsdfggS
-lgcc -lc -lgcc /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtend.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crtn.o
The funny thing is, when I add -rpath-link /lib to the above
statement, the linking succeeds. I guess something is wrong
in our setup, but how do I go about finding it?
strace'ing does not give me any clues. It looks as if `ld` is
only looking for ld-linux.so in the directory
/usr/i386-redhat-linux/lib/. According to the documentation
ld should always look in /lib and /usr/lib, but for some
reason it doesn't.
Anyone can think of a reason for this strange behaviour?
Ron
--
NeoNova BV
bedrijfsmatige internetoplossingen
http://www.neonova.nl Kruislaan 419 1098 VA Amsterdam
info: 020-5628292 servicedesk: 020-5628292 fax: 020-5628291