[lfs-support] chrooting to LFS env.
kb0iic at berzerkula.org
Wed Aug 3 06:12:57 PDT 2016
On Tue, August 2, 2016 21:17, Ray McCaffity wrote:
> OK. Everything works great, until step 6.7.1
> root:/source/linux-4.4.2# make mrpropermake: gcc: Command not foundmake:
> gcc: Command not found
> root:/source/linux-4.7# whereis gccgcc: /tools/bin/gcc
> echo $PATH/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
> Every non-compiler command works. For example /tools/bin/ls, make, cat,
> But when I try to use cc, gcc g++ I get...
> root:/source/linux-4.7# cd /tools/binroot:/tools/bin# ./gcc -vbash: ./gcc:
> No such file or directoryroot:/tools/bin# ls -l gcc-rwxr-xr-x 3 root root
> 866464 Aug 2 19:24 gcc
> file /tools/bin/gcc/tools/bin/gcc: ELF 64-bit LSB executable, x86-64,
> version 1 (SYSV), dynamically linked, interpreter
> /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32,
> BuildID[sha1]=b1d44ad02e31e83ce9afbe23a8d374f14857424b, stripped
> Also, if I leave the chrooted environment, and go back to (main host)
> root. I notice, the gcc and c++commands in $LFS/tools/bin work fine.
> If I run...
> CC=$LFS_TGT-gcc \AR=$LFS_TGT-ar \RANLIB=$LFS_TGT-ranlib
> and compile something, everything seems to work.
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
> Do not top post on this list.
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
file /tools/bin/gcc/tools/bin/gcc: ELF 64-bit LSB executable, x86-64,
(SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
Your interpreter was wrong. Chris previously asked for the interpeter, but
we can already tell that it is not /tools/lib64/ld-linux-x86-64.so.2. So
this means GCC source and build directories were not removed between GCC
instructions, or the specs wasn't updated. Seeing how you were able to
chroot, it is more likely the GCC source and build directories were not
removed between passes.
More information about the lfs-support