LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 02-07-2012, 10:05 AM   #1
sunmoon
LQ Newbie
 
Registered: Feb 2012
Location: Italy
Distribution: Debian 9
Posts: 13

Rep: Reputation: Disabled
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? :)

Thank you in advance.
 
Old 02-07-2012, 11:35 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

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
 
Old 02-07-2012, 12:11 PM   #3
sunmoon
LQ Newbie
 
Registered: Feb 2012
Location: Italy
Distribution: Debian 9
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Did you logout /reboot etc before this, if so did you mount the virtual files, Chapter 6.2, before chroot?
Yes, it happened I rebooted after I started Chapter 6. I lost $LFS variable and etc. Then I recovered following the advice:
http://www.linuxquestions.org/questi...lation-377597/

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.
 
Old 02-07-2012, 04:03 PM   #4
dllobach
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
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.
 
Old 02-07-2012, 05:42 PM   #5
sunmoon
LQ Newbie
 
Registered: Feb 2012
Location: Italy
Distribution: Debian 9
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dllobach View Post
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:
Code:
root@VPCW21S1E:/mnt/lfs/sources/binutils-2.21.1# ./config.guess 
i686-pc-linux-gnu
Determining the name of the dynamic linker:
Code:
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:
Code:
../glibc-2.14.1/configure --prefix=/tools \
    --host=$LFS_TGT --build=$(../glibc-2.14.1/scripts/config.guess) \
    --disable-profile --enable-add-ons \
    --enable-kernel=2.6.25 --with-headers=/tools/include \
    libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
Are the chapters 5.2 and 5.7 saying the same?

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...
 
Old 02-07-2012, 08:20 PM   #6
dllobach
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
Quote:
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.
 
Old 02-12-2012, 01:45 AM   #7
kedar kapil
LQ Newbie
 
Registered: Feb 2012
Posts: 3

Rep: Reputation: Disabled
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

can anybody help me with this.....
 
Old 02-12-2012, 04:18 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Both ld and as are part of binutils. Something must have gone wrong during the install in chapter 5 (or possibly a PATH issue).

Quote:
Originally Posted by sunmoon
I would like to note that the test succeed on the host system:

bash, version 4.2.10(1)-release
/bin/sh -> /bin/dash
The test did not succeed, see the red part. That should read bash, not dash.

Hope this helps.
 
1 members found this post helpful.
Old 02-12-2012, 04:21 AM   #9
sunmoon
LQ Newbie
 
Registered: Feb 2012
Location: Italy
Distribution: Debian 9
Posts: 13

Original Poster
Rep: Reputation: Disabled
I had the same. Have started from the beginning

Hi kedar kapil!
Chapter 5.2 says that
Quote:
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).

Now I use the LFS chapter-by-chapter complete commands from that thread:
http://www.linuxquestions.org/questi...-notes-927674/
It is very helpful.

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.

Last edited by sunmoon; 02-12-2012 at 04:25 AM.
 
Old 02-14-2012, 04:25 AM   #10
kedar kapil
LQ Newbie
 
Registered: Feb 2012
Posts: 3

Rep: Reputation: Disabled
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....
 
Old 02-14-2012, 04:29 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by kedar kapil View Post
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.

Hope this helps.
 
Old 02-16-2012, 12:51 PM   #12
sunmoon
LQ Newbie
 
Registered: Feb 2012
Location: Italy
Distribution: Debian 9
Posts: 13

Original Poster
Rep: Reputation: Disabled
I started the building process from the beginning of the Chapter 5, and have passed the Chapter 6.7.1 with no errors. The problem is solved then.

So I think I made a mistake in the first pass wich was not found.

Again, I would like to mention that this thread can be usefull http://www.linuxquestions.org/questi...-notes-927674/.

Thanks to everybody who tried to help me.

Last edited by sunmoon; 02-16-2012 at 12:53 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS 6.5 : Step 6.7 Installing Linux API headers : make headers_check/install error tsong99 Linux From Scratch 12 12-25-2012 04:26 PM
[SOLVED] Section 6.7. Linux-2.6.37 API Headers make error steviebob Linux From Scratch 7 09-30-2011 01:46 PM
LFS 6.7 Linux API Headers - make headers_check fails gmontjr Linux - Newbie 4 01-26-2009 01:56 AM
make headers_check errors [LFS V6.3, Sect 6.7 Linux-2.6.22.5 API Headers] michealoc Linux From Scratch 1 10-11-2007 09:03 AM
"make headers_check" gives errors during "5.5.1 Installation of Linux API headers " void_man() Linux From Scratch 3 09-26-2007 09:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration