Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
06-30-2017, 09:40 AM
|
#1
|
LQ Newbie
Registered: Jun 2017
Posts: 4
Rep:
|
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.
|
|
|
06-30-2017, 02:25 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,877
|
Code:
"tools//lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/as"
tools//lib<blah> looks wrong. 2 backslashes? Is tools in the kernel directory? Is your system 32 bit? Maybe
Code:
/tools/lib64/<blah>
|
|
|
06-30-2017, 02:34 PM
|
#3
|
LQ Newbie
Registered: Jun 2017
Posts: 4
Original Poster
Rep:
|
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
|
|
|
06-30-2017, 02:36 PM
|
#4
|
LQ Newbie
Registered: Jun 2017
Posts: 4
Original Poster
Rep:
|
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?
|
|
|
07-01-2017, 03:39 AM
|
#5
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,877
|
Why not try
Code:
cd /mnt/lfs/tools
find -name 'as'
|
|
|
07-01-2017, 11:12 AM
|
#6
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,869
|
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.
Last edited by hazel; 07-01-2017 at 11:25 AM.
|
|
|
07-01-2017, 12:48 PM
|
#7
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,877
|
Code:
make INSTALL_HDR_PATH=dest headers_install
The "dest" in that line also looks like a typo. My lfs days were a long time ago.
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.
|
|
|
07-01-2017, 02:17 PM
|
#8
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,869
|
Quote:
Originally Posted by business_kid
Code:
make INSTALL_HDR_PATH=dest headers_install
The "dest" in that line also looks like a typo. My lfs days were a long time ago.
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.
|
No, whatever else is wrong, the "dest" is correct. Installing the kernel headers deletes everything in the destination directory, so a temporary one is used for safety. Then a sanitised set of headers (not the full set) is copied to /usr/include. You can check the instructions here.
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.
|
|
|
07-27-2017, 09:23 PM
|
#9
|
LQ Newbie
Registered: Jul 2017
Posts: 1
Rep:
|
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 09:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|