LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 03-01-2009, 09:33 AM   #1
ice13berg
LQ Newbie
 
Registered: Mar 2009
Distribution: Still Shopping
Posts: 5

Rep: Reputation: 0
LFS Step 6.7 - make headers_check fails


I'm having problems with step 6.7 - Installation of Linux API headers. My output is:

root:/sources/linux-2.6.27.4# make mrproper
CLEAN include/linux/version.h
root:/sources/linux-2.6.27.4# make headers_check
CHK include/linux/version.h
UPD include/linux/version.h
HOSTCC scripts/basic/fixdep
gcc: error trying to exec '/tools/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/as': execv: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

I had this problem once, started a new build, and I'm seeing this error again. When I leave the chroot envrionment, and run

user@user-desktop:/mnt/lfs/tools/i686-pc-linux-gnu/bin$ readelf -l $LFS/tools/i686-pc-linux-gnu/bin/as | grep interpreter
[Requesting program interpreter: /lib/ld-linux.so.2]

BUT

user@user-desktop:/mnt/lfs/tools$ readelf -l /tools/bin/make | grep interpreter
[Requesting program interpreter: /tools/lib/ld-linux.so.2]

This shouldn't be any surprise, since "make mrproper" worked, but why would one set of links be appropriately modified, and the other not? I plan on rebuilding [again], but I would like to be able to take extra precautions to not do this again.



To point to my own "newbism," the LFS has very discrete directions regarding line-by-line instructions, with particular emphasis on formatting. I believe I have followed everything step-by-step (truly, I wouldn't know how else to do it). For Step 5.28, installing perl, the line:

sh Configure -des -Dprefix=/tools \
-Dstatic_ext='Data/Dumper Fcntl IO POSIX'

I am not certain how to get the -Dstatic indented quite so far, so I just typed it on the following line, without the indentation. Could that be part of my problem? How is this format produced?

Thanks for any advice.
 
Old 03-01-2009, 07:15 PM   #2
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
Though I could be wrong about the source of the problem, something seems to have gone wrong with your Pass 2 of Binutils in Chapter 5. That might explain why make is showing the correct interpreter but as is not. Have you tried that readelf command on any other binaries in /tools to see what you get? And you did do the test in 5.8 and didn't see any unexpected results?

As for your question about the Perl installation, the indentation doesn't actually matter, and is there in the book mainly to increase legibility and to help show (to the reader) that the -Dstatic_ext configure option is part of the command on the preceding line and not somehow a new command of its own. As long as there's at least one space (in this case, it's enough to have it before the \ on the first line), then bash should interpret everything correctly.

That being said, however, are you typing all the commands in the book in by hand? If so, when you rebuild might I recommend using copy & paste? It's much easier that way to avoid small typos and other errors that are easy to miss but that could wind up breaking things in ways that can be very difficult to diagnose.
 
Old 03-01-2009, 09:26 PM   #3
ice13berg
LQ Newbie
 
Registered: Mar 2009
Distribution: Still Shopping
Posts: 5

Original Poster
Rep: Reputation: 0
I have tried readelf on other commands, and it does appear that most all binaries, except gcc, provides the "no such file..." output.

Thanks for the comment on the perl install. That's kinda what I figured, but I thought I would ask.

I don't recall what the output from 5.8 was, but I'm guessing I would if there had been errors.

And yes, I'm typing in everything by hand. I was trying to avoid this simply becoming a "cut and paste" exercise, as I have found this experience to be very educational, but at a minimum, I will cut and paste all the binutils (pass 2) instructions.

Thanks for the thoughts.
 
Old 03-01-2009, 10:26 PM   #4
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
I understand how you feel; when I tried building my first LFS system (many years ago in the days of 4.x), I typed everything in because I thought I would somehow get much more out of it that way than if I just copy & pasted. In retrospect, though, I don't really think pasting the commands in actually detracts from the educational experience.

No matter how you do it, you still have to read all the material & instructions before and after each command, or at least you should - and it's quite possible to type something in straight from the book while giving it no more thought or reflection than if you had copied it over. Honestly, I think you get as much or as little out of LFS as you choose and as you have the patience for, and taking the time to try to understand what each command is doing doesn't necessarily mean you have to type it by hand.

In any case, it's your choice - which of course is one of the great things about LFS. Just remember that, as I mentioned, copy & pasting helps eliminate one potential source of errors, so if you do still run into problems during the rebuild you can at least feel more comfortable about narrowing down the cause.
 
Old 01-06-2011, 02:48 PM   #5
Erebus Bat
LQ Newbie
 
Registered: Jul 2004
Distribution: Ubuntu 10.04 (Lucid)
Posts: 25

Rep: Reputation: 15
I realize I am resurrecting an old thread; however for the benefit of others (and google):
- There was an error (or missed step) on 5.9. Binutils-2.20.1 - Pass 2
This was fixed (without having to start over), by:
-- Exiting the chroot
-- (as root): chown lfs:lfs $LFS/tools $LFS/sources
-- (as lfs) Redoing the Binutils - Pass 2 step (including cleanup)
-- (as root) chown root:root $LFS/tools $LFS/sources
-- re-entering the chroot (follow book instructions)


Also for others: I didn't realize that there was an xserver with a webbrowser on the LFS LiveCD so I was doing a lot of hand typing commands at first, which is what probably lead to my mistake. A simple 'startx' and copy and paste works wonders

Last edited by Erebus Bat; 01-07-2011 at 12:50 PM. Reason: Clarified which users the steps should be ran as.
 
Old 01-07-2011, 02:35 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi Erebus Bat,
Quote:
Originally Posted by Erebus Bat View Post
I realize I am resurrecting an old thread; however for the benefit of others (and google):
- There was an error (or missed step) on 5.9. Binutils-2.20.1 - Pass 2
This was fixed (without having to start over), by:
-- Exiting the chroot
-- (as root): chown lfs:lfs $LFS/tools $LFS/sources
-- Redoing the Binutils - Pass 2 step (including cleanup)
-- chown root:root $LFS/tools $LFS/sources
-- re-entering the chroot (follow book instructions)
I do wonder if the above is correct. It seems not/partially related to the original question, which talks about a failing make headers_check in chapter 6. Your reply seems to be focused on binutils in chapter 5. I do realize that one of the answers mentions a possible problem with binutils pass 2, but it isn't clear if that was the actual problem (it also isn't clear if this was ever resolved).

The steps you describe to change the owner and group of the sources and tools directories should have been done in chapter 3 and 4 (only the owner, not the group).

The correct settings are:
- $LFS/sources -> sticky bit is set (Chap. 3.1)
- $LFS/sources -> owner: lfs and group: root (Chap. 4.3)
- $LFS/tools -> owner: lfs and group: root

At the end of chapter 5 both owner and group of the $LFS/tools directory is set to root:root (Chap. 5.33)

Also: If you do need to revisit chapter 5 the commands need to be executed as user lfs and not root (chapter 5 is done as user lfs, chapter 6 as root).

PS: The provided links are for LFS version 6.7 and the chapter numbers might be different for other LFS versions (I do believe this thread originally talks about LFS version 6.4). The way the linux headers are installed also differ from version to version, be aware of that as well.
 
Old 01-07-2011, 08:51 AM   #7
Erebus Bat
LQ Newbie
 
Registered: Jul 2004
Distribution: Ubuntu 10.04 (Lucid)
Posts: 25

Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
I do wonder if the above is correct. It seems not/partially related to the original question, which talks about a failing make headers_check in chapter 6. Your reply seems to be focused on binutils in chapter 5. I do realize that one of the answers mentions a possible problem with binutils pass 2, but it isn't clear if that was the actual problem (it also isn't clear if this was ever resolved).
I realize this, I also realize that I was unclear and did not state that I was running into the exact same issue. Because I resolved it, I do know that the problem was with a binutils in pass 2.

Quote:
Originally Posted by druuna View Post
The steps you describe to change the owner and group of the sources and tools directories should have been done in chapter 3 and 4 (only the owner, not the group).
Correct, they were done in chapter 3+4; however as the last step in chapter 5 the ownership was changed to root. The error I was encountering was with the make headers_check step in chapter 6 so I needed to revert to the permissions that were in effect in chapter 5 (otherwise the make install will fail).

Quote:
Originally Posted by druuna View Post
The correct settings are:
- $LFS/sources -> sticky bit is set (Chap. 3.1)
- $LFS/sources -> owner: lfs and group: root (Chap. 4.3)
- $LFS/tools -> owner: lfs and group: root
You are correct, the book does not have you change the group and I did not reference the book when I did my 'fix'. At any rate it is a moot point because you do a chown -R root:root at the end of chapter 5 (and my instructions) anyway as you pointed out. So in the end you still end up with the same permissions.


Quote:
Originally Posted by druuna View Post
Also: If you do need to revisit chapter 5 the commands need to be executed as user lfs and not root (chapter 5 is done as user lfs, chapter 6 as root).
This is correct, and not clear in my original post.

Quote:
Originally Posted by druuna View Post
PS: The provided links are for LFS version 6.7 and the chapter numbers might be different for other LFS versions (I do believe this thread originally talks about LFS version 6.4). The way the linux headers are installed also differ from version to version, be aware of that as well.
This is correct as well, I am using 6.7. Also I really wasn't attempting to solve the original posters problem given their whopping 5 posts they are long gone by now. I was more providing a guidance to anyone doing LFS and help them in the right direction as I had to google some to find even this thread (with no solution).

I do not intend to come across as 'snappy' to you druuna, in fact I am glad you chimed in. I just wanted to clarify your points for others that may be in the same situation and not have the same knowledge that I do. It would be a shame to have to restart that whole process for something that could (probably) be easily fixed.
 
Old 01-07-2011, 09:05 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,
Quote:
Originally Posted by Erebus Bat View Post
I do not intend to come across as 'snappy' to you druuna, in fact I am glad you chimed in. I just wanted to clarify your points for others that may be in the same situation and not have the same knowledge that I do. It would be a shame to have to restart that whole process for something that could (probably) be easily fixed.
I don't find your reply snappy in any way, so don't worry about that

I replied to make sure that others don't blindly apply a solution that worked for you in a (possibly) similar situation and to give a bit more background information. The steps you mention can be useful in certain situations (although re-doing steps from chap. 5 won't be an option once one get further into chap. 6).

PS: You might consider editing your post (#5) and adding the part about executing as lfs user.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS 6.7 Linux API Headers - make headers_check fails gmontjr Linux - Newbie 4 01-26-2009 01:56 AM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM
problem with 5.51 make headers_check rodrigomeira Linux From Scratch 6 07-11-2008 01:49 PM
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
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM


All times are GMT -5. The time now is 03:12 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration