LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.2 - Chapter 6.7 - make headers_check fails (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-2-chapter-6-7-make-headers_check-fails-4175446008/)

anjohn 01-17-2013 07:02 AM

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. :cry:

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.

druuna 01-17-2013 09:37 AM

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.

celticdevildog 01-17-2013 01:22 PM

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.

anjohn 01-18-2013 05:51 AM

Quote:

Originally Posted by druuna (Post 4872237)
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. ;)

druuna 01-18-2013 06:28 AM

Quote:

Originally Posted by anjohn (Post 4872795)
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.

celticdevildog 01-18-2013 06:29 AM

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 (Post 4872795)
@ 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.

anjohn 01-24-2013 12:57 AM

Hm okay.
From the beginning for the second time.:banghead:

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

celticdevildog 01-24-2013 08:31 AM

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.

druuna 01-24-2013 08:45 AM

Quote:

Originally Posted by anjohn (Post 4876600)
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.

pr0tokol 02-10-2013 05:32 PM

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

stoat 02-11-2013 05:24 PM

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.

pr0tokol 02-11-2013 09:11 PM

Thanks for the response.. I'll try and retrace my steps and see what gives.

anjohn 02-12-2013 08:04 AM

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...

aashish_delhi 09-16-2013 11:05 AM

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

druuna 09-16-2013 11:37 AM

Quote:

Originally Posted by aashish_delhi (Post 5028595)
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.

aashish_delhi 09-16-2013 11:41 AM

Post #5 here saved the day for me!
http://www.linuxquestions.org/questi...-fails-708371/

Many Thanks!! :-)

Regards,
Aashish

aashish_delhi 09-16-2013 11:45 AM

Quote:

Originally Posted by druuna (Post 5028617)
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.

Sorry about that Druuna. Just got tempted.
Its just that I couldn't wait after having slogged thru the book for 2 days straight and getting stuck here. Besides, I felt that the basic problem was the same, so...

Anyway, won't hijack a thread again.

Regards,
Aashish


All times are GMT -5. The time now is 08:22 AM.