LinuxQuestions.org
Review your favorite Linux distribution.
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 01-17-2013, 07:02 AM   #1
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Rep: Reputation: Disabled
LFS 7.2 - Chapter 6.7 - make headers_check fails


Hello,

I use the LFS book 7.2 and I just finished the temporary system.
Now I want to use my tools for the first time, but it just doesn't work from the beginning.

After make headers_check in chapter 6.7 I get
Code:
root:/sources/7.2/linux-3.5.2# 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.7.1/../../../../i686-pc-linux-gnu/bin/as': execv: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
The path looks very strange and there is no /tools/lib/gcc but /tools/lib/traceevent!

What could I do now? I hope it isn't necessary to start with LFS again.
 
Old 01-17-2013, 09:37 AM   #2
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
as is part of binutils (installed in chapter 5.8). Have you checked /tools for its presence? The above error merssage looks in /tools/i686-pc-linux-gnu/bin/, but do check all the dirs in /tools.

If it isn't present you made a mistake in chapter 5 (probably chapter 5.8). I'm not sure if you can fix this without starting from scratch.
 
Old 01-17-2013, 01:22 PM   #3
celticdevildog
LQ Newbie
 
Registered: Jan 2013
Location: New Mexico
Distribution: RHEL, SuSE, CentOS, bt, LFS
Posts: 21

Rep: Reputation: Disabled
In chapter 5.33 did you do the following commands

Code:
strip --strip-debug /tools/lib/*
strip --strip-unneeded /tools/{,s}bin/*
if so are you sure you DIDN't run

Code:
Take care not to use --strip-unneeded on the libraries. The static ones would be destroyed and the toolchain packages would need to be built all over again.
 
Old 01-18-2013, 05:51 AM   #4
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
as is part of binutils (installed in chapter 5.8). Have you checked /tools for its presence? The above error merssage looks in /tools/i686-pc-linux-gnu/bin/, but do check all the dirs in /tools.

If it isn't present you made a mistake in chapter 5 (probably chapter 5.8). I'm not sure if you can fix this without starting from scratch.
Well, I cannot find it. What is about the "i686-pc-linux-gnu" and "i686-lfs-linux-gnu" folders? This looks strange, too. Have I done a mistake somewhere? I would say that I either need to have the pc folder, or the lfs folder, but not both of them!

@ celticdevildog
Yes, I did the stripping. How can I be sure that I didn't kill any libraries? I just copied the commands into my console.

So there is no way just to build the binutils again without starting from the beginning, right? xD Desperating, this LFS stuff.

I think there are some examples missing in the book which tell you how it should look like at a certain point.
 
Old 01-18-2013, 06:28 AM   #5
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
Quote:
Originally Posted by anjohn View Post
Well, I cannot find it.
If as is nowhere to be found then something went wrong somewhere during the build.

Quote:
What is about the "i686-pc-linux-gnu" and "i686-lfs-linux-gnu" folders? This looks strange, too. Have I done a mistake somewhere? I would say that I either need to have the pc folder, or the lfs folder, but not both of them!
i686-lfs-linux-gnu is what LFS_TGT is set to (see lfs users .bashrc. The LFS_TGT=$(uname -m)-lfs-linux-gnu part).

The (binutils) assembler and linker should be installed in /tools/bin and /tools/$LFS_TGT/bin

Quote:
Yes, I did the stripping. How can I be sure that I didn't kill any libraries? I just copied the commands into my console.
If you only used the commands in the book then you are ok. The warning in the book is there in case one thinks that libs can also be stripped using --strip-unneeded.

Quote:
So there is no way just to build the binutils again without starting from the beginning, right?
Binutils is an essential part of the build, starting from scratch would be the wise thing to do.
 
Old 01-18-2013, 06:29 AM   #6
celticdevildog
LQ Newbie
 
Registered: Jan 2013
Location: New Mexico
Distribution: RHEL, SuSE, CentOS, bt, LFS
Posts: 21

Rep: Reputation: Disabled
Before you stripped out the debugging files did you exit chroot and re-enter again with the chroot command given at the beginning of the chapter?

I ask because I didn't do that and had major problems after stripping the files to where I ended up building from scratch again. A decision that made me want to pull my hair out for sure.

Quote:
Originally Posted by anjohn View Post
@ celticdevildog
Yes, I did the stripping. How can I be sure that I didn't kill any libraries? I just copied the commands into my console.
If you are still in the same window you could use the up arrow until you come to the stripping commands. I don't remember if the history command works in the chroot environment but you could try that too.
 
Old 01-24-2013, 12:57 AM   #7
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hm okay.
From the beginning for the second time.

Am I allowed to do the strip command later? I first try to execute the make_headers command before that and see what happens...

Last edited by anjohn; 01-24-2013 at 02:03 AM.
 
Old 01-24-2013, 08:31 AM   #8
celticdevildog
LQ Newbie
 
Registered: Jan 2013
Location: New Mexico
Distribution: RHEL, SuSE, CentOS, bt, LFS
Posts: 21

Rep: Reputation: Disabled
I didn't strip them the second time since I didn't need to keep a small system. But I believe you can strip the binaries later. I'm sure someone more knowledgeable than me can give you a better answer.
 
Old 01-24-2013, 08:45 AM   #9
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
Quote:
Originally Posted by anjohn View Post
Am I allowed to do the strip command later?
The chapters about stripping (chap 5 and 6) aren't needed if you have enough space.

As long as you use the commands that are in the book you are safe. Do mind that you should not use the strip command from chapter 5 once you start working on chapter 6!

Just build and decide if you need the extra space, if not don't strip.
 
Old 02-10-2013, 05:32 PM   #10
pr0tokol
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Question same but different

I seem to be having this same issue as the op with the "make headers_check" command..

Although, I was able to locate the "as" command located at "/tools/i686-pc-linux-gnu/bin/as".

I have followed every command in the book with no issues until now. I have also tried googling and haven't found any solutions.

It seems I have the appropriate executable in what seems to be the appropriate directory, but I still can't seem to figure this one out.

Anyone?..


Quote:
root:/sources/linux-3.5.2# make headers_check
CHK include/linux/version.h
HOSTCC scripts/basic/fixdep
gcc: error trying to exec '/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../i686-pc-linux-gnu/bin/as': execv: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
 
Old 02-11-2013, 05:24 PM   #11
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by pr0tokol

I have also tried googling and haven't found any solutions.
I don't think there is a solution. At least not in the way you may be thinking. Maybe you just botched one those steps leading up to entering the chroot environment. I mean, after all, you made it this far okay. And the v7.2 book is very mature now with only two trivial and unrelated errata published in almost six months. I have built v7.2 twice with zero issues. So I am at a loss to think of what else can explain your predicament.

I would say try backing completely out of the current environment and then re-enter it. I would log out of chroot, unmount the virtual filesystems, and do again the steps to mount the virtual filesystems and re-enter the chroot environment. Along the way while doing that, double-check or redo the various steps that create directories and links. Try moving ahead again. Skip over that entire 6.3 section on package management.

Last edited by stoat; 02-11-2013 at 05:36 PM.
 
Old 02-11-2013, 09:11 PM   #12
pr0tokol
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Thanks for the response.. I'll try and retrace my steps and see what gives.
 
Old 02-12-2013, 08:04 AM   #13
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
For me restarting helped. I did a very very veeery stupid mistake.
I didn't delete the compiled sources. After installing you need to delete them and extract them again when they are needed. Because there are first and second passes of important system tools, I couldn't expect them to work at all! You always need to read and follow the book carefully...
 
Old 09-16-2013, 11:05 AM   #14
aashish_delhi
LQ Newbie
 
Registered: Aug 2012
Location: India
Distribution: Ubuntu 11.10
Posts: 12

Rep: Reputation: Disabled
May I reopen the question here, please!? :-)

I am stuck in a similar situation on LFS version 7.4.
Unlike the OP here, I am able to see the path /tools/i686-pc-linux-gnu/xxxxx path in my chroot environment. But I am getting the error on running make headers_check. Here is the output:

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

When I cd to this path manually I can see 'as' there: /tools/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../../i686-pc-linux-gnu/bin/as

I have been diligently following the book so far.
Any ideas/help is much appreciated.

Thanks,
Aashish
 
Old 09-16-2013, 11:37 AM   #15
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
Quote:
Originally Posted by aashish_delhi View Post
May I reopen the question here, please!? :-)
Actually, that's a very bad idea and might even be considered as being rude

- You are not the OP of this thread,
- This thread deals with LFS 7.2 and not 7.4

Open a new thread instead.
 
  


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
[SOLVED] LFS 6.7 Chapter 6.16 GCC-4.5.1 make fails ianll Linux From Scratch 14 08-12-2012 12:27 AM
[SOLVED] Failed on chapter 6.7.1. Installation of Linux API Headers, make headers_check sunmoon Linux From Scratch 11 02-16-2012 12:51 PM
[SOLVED] LFS 6.7 Chapter 6.59 Udev-161 make check fails ianll Linux From Scratch 3 02-12-2011 04:34 AM
LFS Step 6.7 - make headers_check fails ice13berg Linux From Scratch 7 01-07-2011 09:05 AM
LFS 6.7 Linux API Headers - make headers_check fails gmontjr Linux - Newbie 4 01-26-2009 01:56 AM

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

All times are GMT -5. The time now is 01:29 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