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
gives me the following error:
Code:
make: gcc: Command not found
./scripts/gcc-version.sh: line 25: /tools/bin/gcc: No such file or directory
I do not understand why this error occurs. /tools/bin/gcc -does- exist. Outside of the chroot environment, I -can- use the command. But inside of it, when I try to execute gcc, it insists that it does not exist even when ls reports that it does. In both environments of the lfs user and the root (when using chroot), I have /tools/bin as part of my PATH.
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
cc dummy.c
readelf -l a.out | grep ': /tools'
and it returns the proper output:
Code:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
From reading this forum and other places like Stack Overflow, I understand the standard advice here is to burn it with fire and do the entire thing over again. Except that I have done so.. 4 times already. I'm not sure how to remedy the situation.
Will someone please help me or at least point me in the right direction?