LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 12-07-2018, 03:47 AM   #1
mag911
LQ Newbie
 
Registered: Dec 2018
Posts: 7

Rep: Reputation: Disabled
LFS 8.3 Chpt. 5.2 toolchain issue


This is at least my third go at compiling the binaries using 8.3 instructions, but I'm having an issue with the toolchain.

My first ever go at compiling with LFS 8.3 and Ubuntu 18.10 (server ISO, Live CD) on a VM ran into problems at "6.7.1. Installation of Linux API Headers" make mrproper. I got an error message stating - "arch/x86/Makefile:184: *** Compiler lacks asm-goto support.. Stop.". I assumed it was because the VM crashed during compilation and it didn't like my restart of the process.

Back to the start, delete everything, and yet the same issue occured.

On my third go, I ditched Ubuntu 18.10 and went for 18.04.1 LTS. I've also scripted all the commands as presented in the LFS 8.3 book, so that everything is recorded and issued the same every time. To my frustration, I find the following:

In the tools folder, during glibc (Chpt. 5.7), I get 'x86_64-pc-linux-gnu' being created.
Additionally, if I check the dynamic linker information in those binaries, I get /lib64/.. rather than /tools/lib64.

Below are all the files that carry this error:

/mnt/lfs/tools/bin/addr2line has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/ar has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/as has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/c++ has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/c++filt has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/cc has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/cpp has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/elfedit has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/g++ has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gcc has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gcc-ar has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gcc-nm has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gcc-ranlib has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gcov has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gcov-dump has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gcov-tool has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/gprof has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/ld has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/ld-new has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/ld.bfd has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/nm has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/objcopy has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/objdump has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/ranlib has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/readelf has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/size has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/strings has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/mnt/lfs/tools/bin/strip has - [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

What am I doing wrong, because I can't spot the obvious error?

As I say, my first few go were issuing the commands by hand with Ubuntu 18.10, and now I'm running a script with Ubuntu 18.04 with commands straight out of the LFS 8.3 pages.

Cheers for any useful insight you could share with me.
 
Old 12-07-2018, 08:42 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,153

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
To start can you please post the output of the version-check.sh script here:
http://www.linuxfromscratch.org/lfs/.../hostreqs.html

Ubuntu is not LFS compliant out of the box and needs some tweaks.
 
Old 12-07-2018, 05:35 PM   #3
mag911
LQ Newbie
 
Registered: Dec 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
My mistake, should've done that in the first post.

VirtualBox:~$ ./version-check.sh

bash, version 4.4.19(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.30
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.28
diff (GNU diffutils) 3.6
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
(Ubuntu GLIBC 2.27-3ubuntu1) 2.27
grep (GNU grep) 3.1
gzip 1.6
Linux version 4.15.0-42-generic (buildd@lgw01-amd64-023) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018
m4 (GNU M4) 1.4.18
GNU Make 4.1
GNU patch 2.7.6
Perl version='5.26.1';
sed (GNU sed) 4.4
tar (GNU tar) 1.29
texi2any (GNU texinfo) 6.5
xz (XZ Utils) 5.2.2
g++ compilation OK
 
Old 12-07-2018, 06:42 PM   #4
mag911
LQ Newbie
 
Registered: Dec 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
Well I got to the same place ("6.7.1. Installation of Linux API Headers" make mrproper) and got the same error message. arch/x86/Makefile:184: *** Compiler lacks asm-goto support.. Stop.

Time to delete it all again and try Debian 9 ..
 
Old 12-08-2018, 03:55 AM   #5
mag911
LQ Newbie
 
Registered: Dec 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
I dunno. Is everyone else getting thru LFS8.3 ok??

I had to resort to the following, after trying my fourth attempt under Debian and still failing ...

At the end of Chapter 6.6, before starting work on Linux-4.18.5 API Headers :

ln -sv /tools/lib64/ld-linux-x86-64.so.2 /lib64

Seriously, I think the book is missing something.
 
Old 12-08-2018, 06:51 AM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
No it dose build by the book I have not had a problem. Is everything mounted correctly in ch 6.2?
is LFS ste for root?
 
Old 12-08-2018, 07:40 AM   #7
mag911
LQ Newbie
 
Registered: Dec 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
Maybe it's just me, but I found some more dramas.

In 6.9.1. Installation of Glibc, in theory you'd be in the following directory when issuing the commands:

[/mnt/lfs]/sources/glibc-2.28, or as the chroot environment sees it, /sources/glibc-2.28/

This block of code doesn't work right for me, as the ln statements don't refer to the right directory .....

case $(uname -m) in
i?86) GCC_INCDIR=/usr/lib/gcc/$(uname -m)-pc-linux-gnu/8.2.0/include
ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3
;;
x86_64) GCC_INCDIR=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
;;
esac

To get 6.9.1 working, I did a find for the "real" ld-linux-x86-64.so.2 and then symlinked those into lib64 and everything worked.
 
Old 12-08-2018, 07:42 AM   #8
mag911
LQ Newbie
 
Registered: Dec 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
Sorry for the out of sequence reply spiky0011, and yep, everything mounted and as it should be.
$LFS set for root yes.
 
Old 12-08-2018, 05:18 PM   #9
mag911
LQ Newbie
 
Registered: Dec 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
I must be on the right track despite some hiccups, as glibc compiled with only two of the expected fails.

misc/tst-ttyname is known to fail in the LFS chroot environment.
inet/tst-idna_name_classify is known to fail in the LFS chroot environment.
 
  


Reply



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
5.7. Adjusting the Toolchain LFS.6.3 need help foi Linux From Scratch 3 07-05-2008 07:30 PM
Adjusting the Toolchain in lfs 6.3 saritha Linux From Scratch 3 02-15-2008 01:31 AM
Chpt 6.14 GCC no such file creznedmick Linux From Scratch 3 01-25-2007 08:16 AM
LFS 6.12 Readjusting Toolchain file not found jgreen Linux From Scratch 1 12-29-2005 12:23 AM
LFS 6 ch5.9 adjusting the toolchain failed sanity check totty79 Linux From Scratch 1 03-21-2005 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:47 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