Stuck in 6.7.*Linux-4.9.9 API of Linux from scratch
Hi folks,
I am following LFS - Version 8.0-rc1-systemd to build my linux. I am currently stuck on 6.7.*Linux-4.9.9 API: after I chroot make mrproper make INSTALL_HDR_PATH=dest headers_install I got error: cannot exec "tools//lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/as" no such file or directory. Where I went wrong? Thanks a lot. |
Code:
"tools//lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/as" Code:
/tools/lib64/<blah> |
Thanks for comment.
Double slash is typo. I manually type in the error instead of copying it. I just follow the instructions from http://www.linuxfromscratch.org/lfs/...-NOCHUNKS.html first, create the cross-compile tools and put them in /mnt/lfs/tools; then chroot with /mnt/lfs/tools as / ; use the tool chain in /mnt/lfs/tools to install all required software for my linux system. When I try to install linux API headers from /mnt/lfs/resources/linux-4.4.9, I got the error. There should be /mnt/lfs/tools/lib/gcc/x86_64-pc-linux-gnu/6.3.0 if everything goes well. I don't know why I don't have directory of /mnt/lfs/tools/lib/gcc/x86_64-pc-linux-gnu while I only have an executable /mnt/lfs/tools/lib/gcc/x86_64-pc-linux-gnu |
Usually if I install gcc correctly, there should be /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/....
Here I install gcc in /mnt/lfs/tools, and there should be /mnt/lfs/tools/lib/gcc/x86_64-pc-linux-gnu/6.3.0/.... , correct? |
Why not try
Code:
cd /mnt/lfs/tools |
Your makefile shouldn't be using the as program at all because you are not compiling here, just copying headers to their final location.
Are you sure that you deleted the kernel source tree created in 5.6 and unpacked a fresh one from the source tarball? And please don't create duplicate posts. It's against forum rules. |
Code:
make INSTALL_HDR_PATH=dest headers_install Relying on memory, The destination is usually /usr/include/ ? It looks like you should have /mnt/lfs/<something> in there. The 'dest' is a tmpdir. At this stage, path errors are common. You're still using the static toolchain in ~/tools to build the system in /mnt/lfs, and /tools will be removed in time. |
Quote:
The OP's problem is that his makefile is trying to access binutils and it shouldn't be doing so for the headers_install target. |
I'm having the same issue, could it have something to do with building on a 64-bit system? I have noted a couple of things:
1. ls will find this binary: root:/sources/linux-4.9.9# ls -alh /tools/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/> -rwxr-xr-x 2 root root 1.8M Jul 23 18:48 /tools/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/as 2. Running it outputs an error saying it can't find it: root:/sources/linux-4.9.9# /tools/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/../../..> bash: /tools/lib64/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/as: No such file or directory 3. readelf (from the lfs user shell) reports /lib64/ld-linux-x86-64.so.2: lfs@ubuntu:~$ readelf -l /tools/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/as | grep interpreter [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] This is symlinked to /lib/x86_64-linux-gnu/ld-2.23.so in the lfs user shell lfs@ubuntu:~$ ls -alh /lib64/ld-linux-x86-64.so.2 lrwxrwxrwx 1 root root 32 Jun 16 20:57 /lib64/ld-linux-x86-64.so.2 -> /lib/x86_64-linux-gnu/ld-2.23.so but is not found in the chroot shell I don't think I missed a step, but it is possible that the 64-bit ld is not being properly referenced. |
All times are GMT -5. The time now is 11:24 AM. |