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 01-29-2019, 09:28 PM   #1
Bidski
LQ Newbie
 
Registered: Nov 2012
Posts: 5

Rep: Reputation: Disabled
LFS 8.3-systemd Ch 6.21 GCC-8.2.0 still references tools directory


After working through Ch 6.21 to install gcc-8.2.0, everything succeeds and there were only 3 unexpected failures in libitm, all other numbers seem inline with the test results in the links provided.

Code:
# ../contrib/test_summary | grep -A7 Summ        
		=== g++ Summary ===

# of expected passes		125329
# of expected failures		504
# of unsupported tests		4930
/sources/gcc-8.2.0/build-lfs/gcc/xg++  version 8.2.0 (GCC) 

		=== gcc tests ===
--
		=== gcc Summary ===

# of expected passes		135003
# of expected failures		393
# of unsupported tests		2129
/sources/gcc-8.2.0/build-lfs/gcc/xgcc  version 8.2.0 (GCC) 

		=== libatomic tests ===
--
		=== libatomic Summary ===

# of expected passes		54
		=== libgomp tests ===


Running target unix

		=== libgomp Summary ===

# of expected passes		1837
# of unsupported tests		192
		=== libitm tests ===


Running target unix
--
		=== libitm Summary ===

# of expected passes		42
# of expected failures		3
# of unsupported tests		1
		=== libstdc++ tests ===


--
		=== libstdc++ Summary ===

# of expected passes		11613
# of expected failures		71
# of unsupported tests		599

Compiler version: 8.2.0 (GCC) 
Platform: x86_64-pc-linux-gnu
I installed gcc and made all of the symlinks as instructed, but after compiling the simple test program I see some unexpected results

Code:
readelf -l a.out | grep ': /lib'
Returned no output, but

Code:
readelf -l a.out | grep ': /tools'
shows
Code:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
I patched the gcc specs file as in Ch 6.10 and re-compiled the example, and this resolves that error .... as you would expect.

Checking the other outputs shows the following
Code:
# grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/../lib/crt1.o succeeded
/usr/lib/../lib/crti.o succeeded
/usr/lib/../lib/crtn.o succeeded

# grep -B4 '^ /usr/include' dummy.log
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include

# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");

# grep "/lib.*/libc.so.6 " dummy.log
attempt to open /lib/libc.so.6 succeeded

# grep found dummy.log
found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2
All of these seem fine, apart from the compiler include search paths. The start files show a different output than expected, but they still point to the right folder location, so I am guessing that is ok.

These results are all the same, regardless of whether or not I patch the specs file to remove the tools reference.

Adjusting the toolchain in Ch 6.10 appears to have succeeded (the output of all of the checks returned the expected results). The only reference to the tools directory at this stage was in the linker search paths, but the paths that referenced the tools directory also had '-linux-gnu' (the paths started with =/tools), which Ch 6.10 says to ignore.
Code:
# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib")
My question here is, should I have needed to patch the specs file for this installation of gcc? My impression from Ch 6.21 is that I shouldn't have needed to do this. In which case, where did I go wrong?

My secondary question is, is the rest of the output ok? Or is this likely a side effect of still having that reference to the tools directory?
 
Old 01-30-2019, 04:34 AM   #2
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
I would rebuild ch6 again something went wrong adjusting toolchain ch 6.10
use the saved tools you saved earlier
 
Old 01-30-2019, 04:36 AM   #3
Bidski
LQ Newbie
 
Registered: Nov 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
I would rebuild ch6 again something went wrong adjusting toolchain ch 6.10
use the saved tools you saved earlier
Is there anything in particular you would recommend that I pay attention to? Or any extra checks that I could try and perform during the course of Ch6 that might help to shed light on this situation, should it happen again?
 
Old 01-30-2019, 04:40 AM   #4
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
What type of book you following PDF or HTML
 
Old 01-30-2019, 04:40 AM   #5
Bidski
LQ Newbie
 
Registered: Nov 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
HTML
 
Old 01-30-2019, 04:47 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
And copy paste the commands there
 
Old 01-30-2019, 10:32 PM   #7
Bidski
LQ Newbie
 
Registered: Nov 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Not sure what I missed the first and second time through this chapter, but apparently the third time's a charm. Thanks for your help spiky0011.
 
  


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
step 5.10 gcc/limitx.h gcc/glimits.h gcc/limity.h no such file or directory iambrj Linux From Scratch 7 08-07-2018 11:22 AM
[SOLVED] lfs.7.9 api headers /tools/bin/gcc no that directory end Linux From Scratch 11 09-01-2016 11:18 AM
Gcc 4.6.1 can't Find in /mnt/lfs/tools on LFS verison 7.0 using LFS_TGT xerofoify Linux From Scratch 20 08-03-2012 12:55 PM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
Loginataka - Still Valid in References? Capere Programming 1 08-11-2008 07:56 AM

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

All times are GMT -5. The time now is 02:26 PM.

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