Linker fails to link dumm.c

Felix Brack fb at ltec.ch
Wed Oct 12 10:20:21 PDT 2005


Hello,

I am using LFS 6.1 on a Debian Sarge host with Kernel 2.6.8.1.
Everything went fine until chapter 6.12, "re-adjusting the toolchain".

When I try to compile and link 'dummy.c' I get:

root:/sources/tmp# cc dummy.c
/tools/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/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 `_rtld_global at GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_enable_secure at GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_stack_end at GLIBC_2.1'
/lib/libc.so.6: undefined reference to `_rtld_global_ro at GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_out_of_memory at GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `___tls_get_addr at GLIBC_2.3'
/lib/libc.so.6: undefined reference to `_r_debug at GLIBC_2.0'
/lib/libc.so.6: undefined reference to `_dl_argv at GLIBC_PRIVATE'
collect2: ld returned 1 exit status
root:/sources/tmp#

Apparently the linker does not find ld-linux.so.2. However this file
(more precisely a link named ld-linux.so.2) is available and valid in
the directories '/tools/lib/' and '/lib'. Looking at the gcc specs
file located in '/tools/lib/gcc/i686-pc-linux-gnu/3.4.3' I find
references to '/lib/ld-linux.so.2' (no others) which is I think
correct.

Looking in the archive of the mailing list I found
http://linuxfromscratch.org/pipermail/lfs-chat/2004-November/025495.html
which comes closest to my problem but it contains no hint I could use.

As I have no idea what is wrong or went wrong, could anybody tell me
where to restart or is it possible to fix this problem?


Many thanks, Felix







More information about the lfs-support mailing list