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 02-23-2016, 12:52 PM   #1
RedCollarPanda
LQ Newbie
 
Registered: Feb 2016
Posts: 14

Rep: Reputation: Disabled
6.17. GCC-5.2.0 trouble


I followed all the commands and got to 6.17. GCC-5.2.0 page.

Now, after tests and so on when I do

Code:
echo 'int main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
I see empty output.

What I should get -
[Requesting program interpreter: /lib/ld-linux.so.2]

What I get -

[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]


Path is - /bin:/usr/bin:/sbin:/usr/sbin:/tools/bin

What do I do wrong?
 
Old 02-23-2016, 02:16 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Probably went wrong here somewhere:
http://www.linuxfromscratch.org/lfs/...adjusting.html
What did you get from
Code:
echo 'int main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
At 6.10?
 
1 members found this post helpful.
Old 02-23-2016, 02:49 PM   #3
RedCollarPanda
LQ Newbie
 
Registered: Feb 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Well, I don't remember...

I did a backup, so I can redo all the 6 chapter.
Any Advice?

Should I write here output of checking in 6.10 ?
 
Old 02-23-2016, 02:58 PM   #4
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
I think I ran into something like this and it was because I'd forgotten to delete the build tree from chapter5. Make sure you delete the gcc-build from chapter5, and probably delete and re-unpack the gcc source too, just to be safe.

If you did a backup BEFORE you started chapter 6, then that should be fine. In 6.10, you do move things around, so be careful.
 
1 members found this post helpful.
Old 02-23-2016, 03:30 PM   #5
RedCollarPanda
LQ Newbie
 
Registered: Feb 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Ok, so can you tell me - what build tree should I delete?
I was cleaning all *-build directories by "rm -rf *" before building again.

So as I shoul do - I should go to my backup from chapter 5 and post here output from 6.10 , right?
 
Old 02-23-2016, 03:45 PM   #6
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
Quote:
Originally Posted by RedCollarPanda View Post
Ok, so can you tell me - what build tree should I delete?
I was cleaning all *-build directories by "rm -rf *" before building again.

So as I shoul do - I should go to my backup from chapter 5 and post here output from 6.10 , right?
Code:
rm -rf gcc-build && mkdir -v gcc-build
I would also delete the gcc source treee:
Code:
rm -rf gcc-5.2.0 && tar -xf gcc-5.2.0.tar.bz2
This is because in chapter5, you have built GMP, MPC and MPFR into the gcc source tree.


Yes. Use the backup from chapter5 and redo chapter6. Good luck!
 
1 members found this post helpful.
Old 02-23-2016, 04:41 PM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Always use clean, freshly unpacked sources when building the toolchain and the base system, be specially careful with, binutils,gcc and glibc,monce the toolchain has been adjusted you can't really 'un-adjust' it, which is why it's a good idea to make and keep a copy of the toolchain at the end of chapter 5, I still do and I have been building LFS for about 4 years now.

P.S.
Woohoo! my 2,000th post!
 
1 members found this post helpful.
Old 02-28-2016, 11:53 AM   #8
RedCollarPanda
LQ Newbie
 
Registered: Feb 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you all! I have done all from scratch and after every build i was doing rm -rf %dirname% . 6.17 passed. Thanks again
 
  


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
GCC trouble sonik3230 Linux From Scratch 10 12-17-2013 09:03 AM
Trouble installing gcc curt22 Debian 2 06-20-2008 11:33 AM
[SOLVED] Trouble installing gcc phahn Linux - Software 6 01-24-2008 06:20 PM
gcc trouble assyrian1 Linux - Newbie 5 07-04-2005 01:31 AM
Trouble using gcc chombee Linux - General 4 06-23-2004 12:31 AM

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

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