LFS 7.9 - Environment not working properly after chroot
I am using the LFS 7.9-systemd book, attempting to create LFS using a Centos 7 host under an x86_64 architecture.
I believe that I have followed the instructions to a T. I have the same user environment as specified in the book. I've copied and pasted everything, and haven't omitted anything, yet I still cannot get the temporary environment in chapter 6 to work properly. I keep on running into the following error when I attempt to execute the first command in section 6.7. "Linux-4.4.2 API Headers". Attempting to execute Code:
make mrproper Code:
make: gcc: Command not found I am assuming that I have done everything right. I have, as the lfs user, run the code used to check the second pass: Code:
echo 'int main(){}' > dummy.c Code:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2] Will someone please help me or at least point me in the right direction? |
Hi
when chrooting in did you make sure lfs was in roots path? did you mount everything properly ch 6.2.2 mount -v --bind /dev $LFS/dev ch 6.2.3 mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620 mount -vt proc proc $LFS/proc mount -vt sysfs sysfs $LFS/sys mount -vt tmpfs tmpfs $LFS/run |
Yes, $LFS was set in root's path. Otherwise the command to chroot
Code:
chroot "$LFS" /tools/bin/env -i \ I also have mounted all of the specified filesystems successfully: Code:
mount | grep /lfs | column -t |
Quote:
|
What happens if you run
Code:
/tools/bin/make mrproper Code:
/usr/bin/make mrproper You also say Quote:
Quote:
whats the output of ls /lfs |
Ok.. so I fixed it. I'm not exactly sure -how-, but for the benefit of everyone else trying LFS who has had the same problem (I know there are quite a few of you, as I've read all your posts on various places like SO and mailing lists), I'll go through the process that somehow solved it.
I did another clean run, but before that, I did a couple of things: I ran the version-check.sh (found in the preface), and found that /usr/bin/yacc -wasn't- a symlink to /usr/bin/bison, even after bison was already installed. I proceeded made sure that that symlink existed. This might have been what I had missed. I ran the library-check.sh (also found in the preface). I had already installed the respective gmp, mpfrc, and mpc packages corresponding to my distribution.. but they -still- didn't show up when the script ran. I installed the respective devel packages, but the script -still- didn't find anything. Since it said that either none or all files indicated should be present, I assumed that I was good to go. And after that, I just followed every single command and I was able to get past section 6.7. Stoat - you're right - it seems truly bizarre what happened. I would have expected something to have give off an error somewhere long before entering the temporary chroot in Chapter 6.. but doing the above solved it. |
All times are GMT -5. The time now is 06:20 AM. |