[SOLVED] Failed on chapter 6.7.1. Installation of Linux API Headers, make headers_check
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Failed on chapter 6.7.1. Installation of Linux API Headers, make headers_check
Hello to all from Siberia!
I am strictrly following the LFS book v7.0.
I have failed on step 6.7.1. "Installation of Linux API Headers" with a message:
root:/sources/linux-3.1# make mrproper
CLEAN include/linux/version.h
root:/sources/linux-3.1# make headers_check
CHK include/linux/version.h
UPD include/linux/version.h
HOSTCC scripts/basic/fixdep
gcc: error trying to exec 'as': execvp: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
I found that many people asked for the resolution of this problem but I have not found a solution. There is an advise to execute version-check.sh script from the chapter "vii. Host System Requirements" which checks a host system. I am not sure if the result of the verification should be the same after we change the root (/) directory on step "6.4. Entering the Chroot Environment", but here it is:
root:/# bash version-check.sh
bash, version 4.2.10(1)-release
/bin/sh -> /tools/bin/bash
Binutils: version-check.sh: line 8: ld: command not found
version-check.sh: line 9: bison: command not found
yacc not found
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.14
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.0.0
awk not found
gcc (GCC) 4.6.1
version-check.sh: line 22: /lib/libc.so.6: No such file or directory
grep (GNU grep) 2.9
gzip 1.4
Linux version 3.0.0-14-generic (buildd@palmer) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #23-Ubuntu SMP Mon Nov 21 20:34:47 UTC 2011
m4 (GNU M4) 1.4.16
GNU Make 3.82
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.3
gcc: error trying to exec 'as': execvp: No such file or directory
Compilation failed
I would like to note that the test succeed on the host system:
bash, version 4.2.10(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.21.53.20110810
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 8.5
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
GNU C Library (Ubuntu EGLIBC 2.13-20ubuntu5) stable release version 2.13
grep (GNU grep) 2.9
gzip 1.3.12
Linux version 3.0.0-14-generic (buildd@palmer) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #23-Ubuntu SMP Mon Nov 21 20:34:47 UTC 2011
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.12.4';
GNU sed version 4.2.1
tar (GNU tar) 1.25
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.0
Compilation OK
There are opinions the test should pass always. So, I decided to find why it does not.
"ld" command cannot be found in the set of directories:
root:/# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
I found that file "ld" is located at "/tools/i686-lfs-linux-gnu/bin/" which is not in the $PATH value. I am sure about the file has been found, but the following comman fails:
root:/# /tools/i686-lfs-linux-gnu/bin/ld --version
bash: /tools/i686-lfs-linux-gnu/bin/ld: No such file or directory
Can anybody clarify the situation, and help me (and us) to pass chapter 6.7.1? :)
Did you logout /reboot etc before this, if so did you mount the virtual files, Chapter 6.2, before chroot? You should be building on the lfs you have built so far
I have made corrections in the code suggested there according to the version 7.0. In fact, after rebooting next commands were executed (partition is correct to my system) :
Code:
export LFS=/mnt/lfs
mount /dev/sda7 $LFS
# Changes root directory for use in LFS 7.0 Chapter 6
# Mounting and Populating /dev
mount -v --bind /dev $LFS/dev
# Mounting Virtual Kernel File Systems
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
# Entering the Chroot Environment
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h
Then, I repeated all the steps of Chapter 6. Commands like "mkdir" and "ln" failed that time for the reason the directories existed already, but I did all the steps to be sure nothing is missing.
You might want to have another look at chapter 5, section 5.2 and make sure your toolchain is correct. In that section there is a highlighted area labeled "important" which contains some tests. One test is to unpack Binutils and run the "./config/guess" script. Have you run that? The next paragraph also points out a "sure-fire" way of determining the name of your dynamic linker. I'm guessing that section 5.2 may help find the problem for you.
You might want to have another look at chapter 5, section 5.2...
run the "./config/guess" script. Have you run that?
Thank you for pointing out this part. No, I did not do it. In the beginning of Chapter "5.2. Toolchain Technical Notes" says that "Most of this information will be clearer after performing an actual build. This section can be referred to at any time during the process". So I counted on the coming sections.
I have done the tests mentioned in the chapter now, and the result is following.
Checking for target platform:
root@VPCW21S1E:/bin# readelf -l mount | grep interpreter
[Requesting program interpreter: /lib/ld-linux.so.2]
So, everything seems fine.
The following advice from Chapter 5.2 did not have sense to me, because at that point I could not even figure out what a "gcc's specs file" means. "After the Glibc installation, change gcc's specs file to point to the new dynamic linker in /tools/lib. This last step is vital..."
As I understand, later in the Chapter "5.7. Glibc-2.14.1" the books gives the explicit command to do what was mentioned before:
I am wondering about what I should do now. As to me, I have provided all the information which can be used to make a conclusion about the problem. If there is not a clear way to determine a reason of it, can be just a few steps repeated with an additional checking, or I have to start from the very beginning? It would be discouraging...
I found that file "ld" is located at "/tools/i686-lfs-linux-gnu/bin/" which is not in the $PATH value. I am sure about the file has been found, but the following comman fails:
By the time you get to 6.7.1 "ld" should be in your /tools/bin directory. "ld" is part of the binutils package so again I'm drawn back to chapter 5. Since 5.9 actually builds the binutils I would back up at least to tests in 5.8. If those tests pass then I would re-do 5.9 (the environment will have to be set up for the "lfs" user as stated earlier in chapter 5.) 5.9 will build ld and prepare it for use.
error trying to exec 'as': execvp: No such file or directory
I have been working with LFS(v7.0) from the last month and i have struck in this 6.7 installation of Linux api headers and i have been getting the error :
gcc: error trying to exec 'as': execvp: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
Binutils installs its assembler and linker in two locations, /tools/bin and /tools/$LFS_TGT/bin. The tools in one location are hard linked to the other.
In my installation process I found that the assembler as is missing in /tools/bin location. So I have had to go back, and started from the very beginning.
Probably, you missed an command in one section like I did (no idea where).
But be careful! Some versions of tools have been changed in the current version in LFS book! So, you have to verify all the options of .conifg before you execute it.
thanx sunmoon and dauuna....my friend has been stuck with another error in the chroot environment during the installation of linux api headers and the error is as follows:
/bin/sh: perl: command not found
make[2]: *** [/sources/linux-3.1/usr/include/asm-generic/.install] Error 127
make[1]: *** [asm-generic] Error 2
make: *** [headers_install] Error 2
can you suggest me where the error is...by the way he too has got some error while entering the chroot envi and so he reinstalled the complete toolchain carefully...despite doing that he still got the above error......so can you suggest me an answer....
thanx sunmoon and dauuna....my friend has been stuck with another error in the chroot environment during the installation of linux api headers and the error is as follows:
/bin/sh: perl: command not found
make[2]: *** [/sources/linux-3.1/usr/include/asm-generic/.install] Error 127
make[1]: *** [asm-generic] Error 2
make: *** [headers_install] Error 2
can you suggest me where the error is...by the way he too has got some error while entering the chroot envi and so he reinstalled the complete toolchain carefully...despite doing that he still got the above error......so can you suggest me an answer....
As stated by the error: Perl is not (correctly) installed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.