I am (again) trying LFS. The version is 7.4
I am stuck at chapter 6.7, where I must run: make mrproper
and I get this error: make: gcc: Command not found
. But the gcc
is there. I also cannot run readelf
or ld
, I get the same error.
After some search on the web I found out that this is something done wrong and that I should start all over again. Well, I started all over and got the same error at the same point. I made more searching and I tried starting from the beginning again, but still I got the same error.
How can I solve this problem?
$PATH
? Where aregcc
,readelf
,ld
, etc installed to?/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
Gcc, readelf and ld are in/tools/bin/
and if I use the full path/tools/bin/gcc
I getbash: /tools/bin/gcc: No such file or directory
. g++ gives the same error. But outside the chroot environment, on the host if I run /tools/bin/gcc I can compile a dummy file.ldd /tools/bin/gcc
(in or out of the chroot). If it references anything outside the root you missed a step somewhere.gcc
.ldd
shows this:linux-vdso.so.1 (0x00007fff011fe000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f237da6f000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f237d6c5000) /lib64/ld-linux-x86-64.so.2 (0x00007f237dd72000)
. I guess that this is wrong. But when I run the sanity check om the Page 50 using readelf after compiling a dummy file i get[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
, that is the expected.