LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-06-2005, 10:41 PM   #1
suma17
LQ Newbie
 
Registered: Oct 2005
Location: canberra, australia
Posts: 9

Rep: Reputation: 0
Question Possible Error in Book -- Adjusting Toolchain


Hi there.. I am installing LFS for the first time. I noticed what appears be an error in the book. However I'm guessing it's not an error in the book (surely somebody else would have noticed it first if it was).



SPECFILE=`gcc --print-file specs` &&
sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
$SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE


When I type this command I get the help page of sed - the same as if I run sed with no arguments. In an attempt to determine the problem, I entered the commands one at a time. I believe I have located the problem at the first line:

SPECFILE='gcc --print-file specs'
echo $SPECFILE
> gcc --print-file specs


An alternative approach results in no error:

gcc --print-file specs
> /usr/lib/gcc/i486-pc-linux-gnu/3.4.3/specs
SPECFILE='/usr/lib/gcc/i486-pc-linux-gnu/3.4.3/specs'


I am just wondering if this is an error in the book, or if it is something wrong with my system.

Also, should I be concerned that there is a "i468-pc-linux-gnu" folder on my Pentium 3 (i686) computer.


Any suggestions would be greatly appreciated.
Cheers,
Suma
 
Old 10-06-2005, 11:54 PM   #2
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
No error in the book..........I had no probs with it.........some thing is wrong here..........did you adjust the linker from the binutils-build dir?? If you get an error adjusting the SPECFILE, you missed a step..........more than likely you did not adjust the linker from binutils pass 1..........
 
Old 10-06-2005, 11:58 PM   #3
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Quote:

gcc --print-file specs
> /usr/lib/gcc/i486-pc-linux-gnu/3.4.3/specs
SPECFILE='/usr/lib/gcc/i486-pc-linux-gnu/3.4.3/specs'
this won't work.........you want the linker to use gcc from the /tools/lib NOT the gcc from your host system..........
 
Old 10-07-2005, 12:02 AM   #4
suma17
LQ Newbie
 
Registered: Oct 2005
Location: canberra, australia
Posts: 9

Original Poster
Rep: Reputation: 0
hmmm... i deffinately remember adjusting the linker. im not getting an "error" as such, it just seems i'm passing an invalid parameter to sed.

just thought of something: /usr/lib/gcc/ would be the host system, which is what i'm supposed to avoid.

i'm going to start again from the beginning and see if i get the same problem. will post back with results.


-suma


EDIT: gotta love cross-posts
 
Old 10-07-2005, 12:09 AM   #5
kagashe
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 18

Rep: Reputation: 0
deleted

Last edited by kagashe; 10-07-2005 at 12:11 AM.
 
Old 10-07-2005, 01:47 AM   #6
Harmaa Kettu
Member
 
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
Quote:
SPECFILE='gcc --print-file specs'
echo $SPECFILE
> gcc --print-file specs
This happens because you are using apostrophes instead of backticks.
 
Old 10-07-2005, 02:03 AM   #7
suma17
LQ Newbie
 
Registered: Oct 2005
Location: canberra, australia
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks Harmaa Kettu

I had just got up to the toolchain stage when I noticed this. Everything working fine now


I think they should warn people of this in the book. I know it says to copy-paste, but I for one have absolutely no idea how to copy and paste from links into bash.


Cheers,
Suma
 
Old 10-07-2005, 05:22 AM   #8
shevegen
Member
 
Registered: May 2004
Distribution: Slackware / GoboLinux / LFS / VoidLinux
Posts: 145

Rep: Reputation: 26
"I think they should warn people of this in the book."

I would like something like "user comments", something small, like on
php.net, you sometimes have folks paste their code, or give hints.
I think that would be a very neat idea, and the user could decide whether
he wants to see the pure book, or the book+user comments.

After all, people often do mistakes, and its good to point out at more
of these mistakes (i for example, managed to mess up with my host system
after I successfully built my first LFS two month or so ago...)

Last edited by shevegen; 10-07-2005 at 05:23 AM.
 
Old 10-10-2005, 01:30 PM   #9
kundor
Member
 
Registered: Aug 2003
Distribution: GoboLinux
Posts: 167

Rep: Reputation: 30
Quote:
Originally posted by suma17
Thanks Harmaa Kettu

I had just got up to the toolchain stage when I noticed this. Everything working fine now


I think they should warn people of this in the book. I know it says to copy-paste, but I for one have absolutely no idea how to copy and paste from links into bash.


Cheers,
Suma
Use your mouse and select the text in links. If that doesn't work, hold down shift and select the text in links. Use the middle button to paste. If you run links in a separate virtual terminal you can just switch back and forth with alt-f1 alt-f2. If your mouse doesn't work, install gpm.
 
Old 10-13-2005, 04:06 AM   #10
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Rep: Reputation: 31
Hello,

I just reached at this point and faced same problem. Executing this command display help of sed. I tried after matching each character, I think there is a problem with command.

However, I made manual change ( as it was suggested in book) in spec file and replaced /lib/ld-linux.so.2 with /tools/lib/ld-linux.so.2.


Thanks,
Kirtimaan
 
  


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 - sanity issue... yanger Linux From Scratch 2 11-12-2008 04:52 AM
Held on 5.9. Adjusting the Toolchain satimis Linux From Scratch 2 06-30-2005 06:36 AM
LFS 6 ch5.9 adjusting the toolchain failed sanity check totty79 Linux From Scratch 1 03-21-2005 02:58 PM
5.9. Adjusting the Toolchain - Error Spudds Linux From Scratch 6 02-23-2005 09:22 AM
6.12. Re-adjusting the Toolchain jobesd Linux From Scratch 2 01-16-2005 01:50 PM

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

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