This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]