problems in chapter 6

Barius Drubeck barius.drubeck at gmail.com
Sun Oct 15 10:06:28 PDT 2006


On Sunday 15 October 2006 17:13, Gijo wrote:
> Hi,
>
> I had some problems in chapter 6 (lfs6.2) and maybe someone can help
> me out, before i chroot, i did:
>
> echo 'main(){}' > dummy.c
> cc dummy.c
> readelf -l a.out | grep ': /tools'
>
> and got:
>
> [Requesting program interpreter: /tools/lib/ld-linux.so.2]
>
> but after entering the chrooted environment i could not use gcc or
> readelf, which i fixed by linking /lib/ld-linux.so.2 to
> /tools/lib/ld-linux.so.2 but now when i redo the dummy.c check i get:
>
> [Requesting program interpreter: /lib/ld-linux.so.2]
>
>
> is this ok or am i doing something wrong?I's not normal to end up
> with a broken gcc after chp5 right?

No it's definitely not normal.  You've got somewhere a gcc whose specs 
link the compiled programs to the glibc in /tools but it seems to not 
be the gcc in /tools.  It sounds almost like you didn't have /tools/bin 
first in your PATH at some point and managed to apply some of the 
toolchain manipulations of early ch 5 on your host toolchain and built 
the rest of ch 5 with that???

Firstly, let's see how deep this problem goes.  Try the readelf command 
on a handful of the later binaries installed in ch5 instead of a.out, 
e.g. readelf -l /tools/bin/sed | grep interp
and see whether these are linked against /lib/ld-linux.so.2 or 
/tools/lib/ld-linux.so.2.

Secondly, let's try to find the gcc problem.  What is the output of
  gcc -print-libgcc-file-name
before and after you enter the chroot.

B.



More information about the lfs-support mailing list