Chapter 6.7. Linux-3.16.2 API Headers , errors on installation of API headers
Hello all, I am working on LFS 7.6 and I have made it to chapter 6. I am following the same procedure as in chapter 5. That is; extracting the tar from the /mnt/lfs/sources directory, cd(ing) to the extracted directory and following the instructions from the book. When trying to compile the Linux API headers (chapter 6.7), I am getting the following error messages:
root:/sources/linux-3.16.2# make mrproper CLEAN include/generated CLEAN include/generated/uapi/linux/version.h root:/sources/linux-3.16.2# make INSTALL_HDR_PATH=dest headers_install CHK include/generated/uapi/linux/version.h UPD include/generated/uapi/linux/version.h HOSTCC scripts/basic/fixdep gcc: error trying to exec '/tools/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../x86_64-unknown-linux-gnu/bin/as': execv: No such file or directory scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed make[1]: *** [scripts/basic/fixdep] Error 1 Makefile:454: recipe for target 'scripts_basic' failed make: *** [scripts_basic] Error 2 <find dest/include \( -name .install -o -name ..install.cmd \) -delete find: `dest/include': No such file or directory root:/sources/linux-3.16.2# cp -rv dest/include/* /usr/include cp: cannot stat 'dest/include/*': No such file or directory root:/sources/linux-3.16.2# My host system is Slackware 14.1, cpu is x86_64 Intel core I3. All of the tests from chapter 5 passed with no errors. Can someone please tell me where my problem may be. I have searched online and found nothing. Thanks in advance! |
In chapter 6 you have to chroot into the temp system have you done that?
|
Given that it says that /tools/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../x86_64-unknown-linux-gnu/bin/as is "missing", I'd try looking if it's there first. If you do find out the file exist, run the following command from your host to verify if your toolchain has been linked to your host: "readelf -e /tools/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../x86_64-unknown-linux-gnu/bin/as | grep interpreter". If it doesn't include /tools/lib64/ld-linux-x86-64.so.2, then I'm afraid your toolchain is broken and you have to rebuild it from scratch.
|
Yes, I was chrooted into the temp system. Also, I have started over at the beginning of chapter 6 several times, but still same result.
In response to Krejzi: the "as" file is there, in the bin directory, although I don't understand the "/../../../.." part of the path, it seems to me it goes down a few levels and then backs out, in the same command. I ran the "readelf -e /tools/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../x86_64-unknown-linux-gnu/bin/as | grep interpreter" command from the / directory on the host system, it returned "[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]" but not "/tools/lib64/ld-linux-x86-64.so.2". Not knowing if it would make any difference I ran the same command with "mnt/lfs/" at the beginning of the path, it returned the same result. Does this mean I have a broken tool chain? Thanks for the quick response guys and any other suggestions would be greatly appreciated. |
Quote:
Instructions which make GCC use /tools/lib* instead of /lib* are part of GCC Pass 1 and GCC Pass 2 in chapter 5 - the big, complicated box starting with "for". People try and type that and usually end up typing something wrong (and I don't blame them) resulting in a broken toolchain like yours. If you are building in a VM, install openssh on your guest os and ssh from your host's X terminal emulator so you can easily copy/paste the commands from the html version of the book. |
Okay, so my backup of the tools folder after chapter 5 is no good? I need to rebuild all of the packages in chapter 5?
|
Quote:
|
Often you end up with a carot symbol being misplaced by an apostrophe symbol, and it screws everything up.
I've typed the book out myself, but you have to take extreme care in doing so. |
Okay, thanks for the help everyone. One last question: can I start over at the beginning of chapter 5, or should I go all the way back to the beginning of the book?
|
Quote:
|
All times are GMT -5. The time now is 10:34 AM. |