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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-06-2005, 10:41 PM
|
#1
|
LQ Newbie
Registered: Oct 2005
Location: canberra, australia
Posts: 9
Rep:
|
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
|
|
|
10-06-2005, 11:54 PM
|
#2
|
Member
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705
Rep:
|
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..........
|
|
|
10-06-2005, 11:58 PM
|
#3
|
Member
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705
Rep:
|
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..........
|
|
|
10-07-2005, 12:02 AM
|
#4
|
LQ Newbie
Registered: Oct 2005
Location: canberra, australia
Posts: 9
Original Poster
Rep:
|
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
|
|
|
10-07-2005, 12:09 AM
|
#5
|
LQ Newbie
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 18
Rep:
|
deleted
Last edited by kagashe; 10-07-2005 at 12:11 AM.
|
|
|
10-07-2005, 01:47 AM
|
#6
|
Member
Registered: Apr 2005
Location: Finland
Posts: 196
Rep:
|
Quote:
SPECFILE='gcc --print-file specs'
echo $SPECFILE
> gcc --print-file specs
|
This happens because you are using apostrophes instead of backticks.
|
|
|
10-07-2005, 02:03 AM
|
#7
|
LQ Newbie
Registered: Oct 2005
Location: canberra, australia
Posts: 9
Original Poster
Rep:
|
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
|
|
|
10-07-2005, 05:22 AM
|
#8
|
Member
Registered: May 2004
Distribution: Slackware / GoboLinux / LFS / VoidLinux
Posts: 145
Rep:
|
"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.
|
|
|
10-10-2005, 01:30 PM
|
#9
|
Member
Registered: Aug 2003
Distribution: GoboLinux
Posts: 167
Rep:
|
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.
|
|
|
10-13-2005, 04:06 AM
|
#10
|
Member
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 06:23 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|