LFS 5.1-pre1 Chapter6: Re-adjusting the toolchain - testcompile problem

Méher Khiari meher.khiari at netwaybsb.com
Thu Feb 12 23:39:59 PST 2004


> On Thu, 2004-02-12 at 15:36, Ben Bryant wrote:
> > Having followed the 're-adjusting the toolchain'
> > instructions I ran the test compile (cc dummy.c) and
> > got different results depending on which directory I
> > ran it from:
> >
> > If I run the test in the / directory, the compile goes
> > fine and the readelf gives me:
> >
> > [Requesting program interpreter: /lib/ld-linux.so.2]
> >
> > as expected.
> >
> > *But* if I run the same test in other directories
> > (I've tried /bin, /usr, /root) I get this error
> > message on compile:
> >
> >
> /tools/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc
> -linux-gnu/bin/ld:
> > warning: ld-linux.so.2, needed by
> > /tools/lib/libc.so.6, not found (try using -rpath or
> > -rpath-link)
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_lookup_versioned_symbol_skip at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_rtld_global at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_lookup_versioned_symbol at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_start_profile at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_check_map_versions at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_mcount at GLIBC_2.1'
> > /tools/lib/libc.so.6: undefined reference to
> > `__libc_enable_secure at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_get_origin at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_dst_substitute at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_debug_state at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_init at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `__libc_stack_end at GLIBC_2.1'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_dst_count at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_out_of_memory at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_signal_error at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_debug_printf at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_r_debug at GLIBC_2.0'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_map_object_deps at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_unload_cache at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_relocate_object at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_argv at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_catch_error at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_lookup_symbol_skip at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_lookup_symbol at GLIBC_PRIVATE'
> > /tools/lib/libc.so.6: undefined reference to
> > `_dl_map_object at GLIBC_PRIVATE'
> > collect2: ld returned 1 exit status
> >
> > I'm stumped.  I can't understand why cc would care
> > which directory I'm in..
>
> I, too, am really curious why that "sanity check" done from
> /root gives
> the above result. How can one best troubleshoot for the source of this
> error?

The probable for this is that you missed the beginning "/" on your specfile.
Can you mail it with your post ?




More information about the lfs-support mailing list