This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Ron Arts <ron dot arts at neonova dot nl>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 26 Apr 2003 18:33:14 -0400
- Subject: Re: ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found
- References: <3EAA9A03.1060503@neonova.nl>
On Sat, Apr 26, 2003 at 04:38:59PM +0200, Ron Arts wrote:
> 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?
Probably ld doesn't think it's a native linker. If it thinks it's a
cross linker it will default tonot searching host directories, of
course.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer