[SOLVED] LFS 7.2 - Chapter 6.7 - make headers_check fails
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.
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.
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.
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.
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.
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.
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
@ 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.
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.
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.
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.
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.