I am trying to get LFS 7.9 on a machine with an arm processor (armv5). Recently I have tried building this natively, but it seems that gcc cannot currently be built that way on arm due to some linking problem with in-tree gmp builds. Perhaps this is fixed with newer versions of gcc and gmp, but on this particular machine 1 SBU is about 43 minutes so I didn't hang around to verify. This led me to try cross-compiling (from BLFS 7.9 x86_64) in the sense of the book "Cross Compiled Linux From Scratch", Version 3.0.0-SYSVINIT. There is no arm book so I roughly referred to
this and
this for arm-specific things but tried to follow the syntax as close to the letter as possible as
http://www.clfs.org/view/CLFS-3.0.0-...-64/index.html but using the versions found in LFS 7.9 (which were usually only marginally newer).
Once in Chapter 6, there are two ways to proceed to building the final system, either to boot or to chroot. Of course chrooting from an x86_64 to arm is out of the question. So I made a tar archive "cd /media/clfs && tar cvfp archive.tar ./*" etc., extracted it on another drive, and mounted it on the arm machine to the same mount point as was built on my build machine.
However I cannot chroot. I have also replicated all of the environment variables from the build laptop onto the arm machine Is this to be expected?
Code:
root@arm-server:~# ldd /tools/bin/env
libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6d88000)
/lib/ld-linux.so.3 (0xb6ed1000)
Code:
root@arm-server:~# chroot $CLFS /tools/bin/env -i /bin/bash
chroot: failed to run command '/tools/bin/env': No such file or directory
I have seen other similar problems when gcc spec adjustments were not made. I did do this part in Chapter 6 gcc. I am using gcc 5.3 if that matters. Any suggestions?