Problem building Tcl-8.4.7 in chapter 5 (Again (2))

zoltan 6zoltan8 at comcast.net
Mon Nov 22 23:08:42 PST 2004


dienadel wrote:
> I can't read my original post in the news server. As my problem can happen
> to you, i re-post it. (my apoligize if this message is sended a few times)
> 
> 
> ********************************************************************
> Hello,
> 
> Here is the error. After the error, i say a little things:
> 
> ----------------------------------------------------------------------
> gcc -pipe   -Wl,--export-dynamic tclAppInit.o
> -L/home/iban/sources/lfs-6.0/tcl8.4.7/unix -ltcl8.4 -ldl  -lieee -lm \
>         -Wl,-rpath,/tools/lib -o tclsh
> /lib/libc.so.6: undefined reference to
> `_dl_lookup_versioned_symbol_skip at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to
> `_dl_lookup_versioned_symbol at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_start_profile at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to
> `_dl_check_map_versions at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_get_origin at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to
> `_dl_dst_substitute at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_debug_state at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_init at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_dst_count at GLIBC_PRIVATE'
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../libdl.so: undefined
> reference to `_dl_signal_error at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_debug_printf at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to
> `_dl_map_object_deps at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_unload_cache at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to
> `_dl_relocate_object at GLIBC_PRIVATE'
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../libdl.so: undefined
> reference to `_dl_catch_error at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to
> `_dl_lookup_symbol_skip at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_lookup_symbol at GLIBC_PRIVATE'
> /lib/libc.so.6: undefined reference to `_dl_map_object at GLIBC_PRIVATE'
> collect2: ld returned 1 exit status
> make: *** [tclsh] Error 1
> -----------------------------------------------------------------------
> 
> I'm building from LFS-5.1.1, but with kernel 2.6.9 as is explained in the
> hint. (compiled with gcc-3.3.3)
> 
> The "sanity test" result of the chapter 5.9. "Adjusting the Toolchain", is
> perfect.
> 
> I'm building the "Linux From Scratch - Version 6.0-testing-20041010".
> 
> I had no errors in the previous chapters.
> 
> Any idea?
> 
> A lot of thanks
> 
> dienadel

I've gotten this behavior many times...if I recall, the temporary fix is 
to to 'export LD_LIBRARY_PATH=/tools/lib'.

The root cause seems to be that you are trying to compile things in ch. 
6 (or even ch 5) after you've the re-adjusting toolchain 'make -C ld 
install' of the ch. 5 build of binutils-build (in ch. 6).  This results 
in binaries  looking for shared libraries in the standard /lib and 
/usr/lib places, but if you've not installed glibc in ch. 6, or it got 
messed up in the chroot environment, you need to go back to the 
binutils/ld directory the  way it was before you did the re-adjusting 
toolchain thing, which you can't, without starting over.  The 
LD_LIBRARY_PATH variable alleviates this...

At any rate, if none of this makes sense, go back to the beginning and 
start over.  Keep in mind that the instructions for building a toolchain 
are not re-entrant, and if something goes wrong along the way, you're 
best off starting over, unless you want the learning experience, which 
is actually a good thing.

Also, keep in mind that you'll want to unset the LD_LIBRARY_PATH 
variable once you've installed the real glibc in ch. 6 if you did try 
this method, else that will mess things up.

Good luck...




More information about the lfs-support mailing list