LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 06-30-2017, 09:40 AM   #1
liuxu1005
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 06-30-2017, 02:25 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,877

Rep: Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426
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>
 
Old 06-30-2017, 02:34 PM   #3
liuxu1005
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 06-30-2017, 02:36 PM   #4
liuxu1005
LQ Newbie
 
Registered: Jun 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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?
 
Old 07-01-2017, 03:39 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,877

Rep: Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426
Why not try
Code:
cd /mnt/lfs/tools
find -name 'as'
 
Old 07-01-2017, 11:12 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,869
Blog Entries: 19

Rep: Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551
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.
 
Old 07-01-2017, 12:48 PM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,877

Rep: Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426
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.
 
Old 07-01-2017, 02:17 PM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,869
Blog Entries: 19

Rep: Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551Reputation: 4551
Quote:
Originally Posted by business_kid View Post
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.
 
Old 07-27-2017, 09:23 PM   #9
jsmnsr
LQ Newbie
 
Registered: Jul 2017
Posts: 1

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stuck in 6.7.*Linux-4.9.9 API of Linux from scratch liuxu1005 Linux - Kernel 1 07-05-2017 09:05 AM
stuck at ch6.7.1 linux api headers LFS6.3 dushyant88 Linux From Scratch 7 06-06-2010 04:14 AM
Stuck at 5.5. Linux-2.6.22.5 API Headers ERROR no space left on device bucovaina78 Linux From Scratch 2 11-30-2008 04:26 PM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM
Another LFS newb is stuck: Linux API headers won't install smoochie Linux From Scratch 19 06-13-2008 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration