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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-17-2010, 09:59 AM
|
#1
|
|
LQ Newbie
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5
Rep:
|
adjusting tool chain section 5.8 i686-lfs-linux-gnu-gcc: command not found
I have go to section 5.8 adjusting the tool chain. I copy and past from the section
SPECS=`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/specs
$LFS_TGT-gcc -dumpspecs | sed \
-e 's@/lib\(64\)\?/ld@/tools&@g' \
-e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
echo "New specs file is: $SPECS"
unset SPECS
this is the output
lfs@richard-laptop:/mnt/lfs$ SPECS=`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/specs
i686-lfs-linux-gnu-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
lfs@richard-laptop:/mnt/lfs$ $LFS_TGT-gcc -dumpspecs | sed \
> -e 's@/lib\(64\)\?/ld@/tools&@g' \
> -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
bash: /specs: Permission denied
i686-lfs-linux-gnu-gcc: command not found
lfs@richard-laptop:/mnt/lfs$ echo "New specs file is: $SPECS"
New specs file is: /specs
I am using ubuntu 10.04
|
|
|
|
09-17-2010, 10:15 AM
|
#2
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,718
|
Hi,
Did you make Ubuntu suitable to be host for LFS as stated here: vii. Host System Requirements
BTW: Do tell us what version of LFS you are building. I do assume it is LFS 6.6 stable (the link given is from the development package, due to an error in the 6.6 stable version, as mentioned here: Errata for the 6.6 Version of the LFS Book)
Hope this helps.
|
|
|
|
09-17-2010, 11:46 AM
|
#3
|
|
LQ Newbie
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5
Original Poster
Rep:
|
yes it is version 6.6 i am trying to work through
Well i did double check and somehow i did notice that i was missing bison all the other programs are installed with acceptable versions. I have installed bison and given it another try but the result is still the same.
Strangely i have noticed the gcc compiler in tools/bin is not named i686-lfs-linux-gnu-gcc but it is named i686-pc-linux-gnu-gcc, i dont know if that will be derailing things.
Thanks for the help
|
|
|
|
09-17-2010, 12:12 PM
|
#4
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,718
|
Hi,
Quote:
Originally Posted by rlaybourn
Well i did double check and somehow i did notice that i was missing bison all the other programs are installed with acceptable versions.
|
Did you also create the link to yacc?
Was bison the only thing you needed to do to make Ubuntu compliant? I really doubt that, Ubuntu isn't an easy distro to make compliant (search this sub forum and be amazed...). Can you post the output of the version-check.sh script.
Quote:
|
Strangely i have noticed the gcc compiler in tools/bin is not named i686-lfs-linux-gnu-gcc but it is named i686-pc-linux-gnu-gcc, i dont know if that will be derailing things.
|
No it won't, as explained here: chapter 4.4 (bottom of the page) and here: chapter 5.2 (the important box and the first "dot" under it)
I would suggest you use the LFS liveCD as a host. It was created just for that and will also make sure you don't have to change the host (ubuntu) you are normally working with. A much safer approach. If you take this advise, posting the output of the i]version-check.sh[/i] script isn't needed.
Hope this helps.
|
|
|
|
09-17-2010, 01:08 PM
|
#5
|
|
LQ Newbie
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5
Original Poster
Rep:
|
well i replaced the "$LFS_TGT-gcc" parts with a full path to the compiler file and it worked, compiled the dummy program ok. It is worrying that i have to make such manual hacks i guess it suggests i have done something a bit wrong somewhere. I am downloading the live cd now . I did try to do the second pass on the binutils but it would not go through the configuration according to the config.log it appears to try to compile a file but no output is produced and so it fails
|
|
|
|
09-17-2010, 01:16 PM
|
#6
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,718
|
Quote:
Originally Posted by rlaybourn
well i replaced the "$LFS_TGT-gcc" parts with a full path to the compiler file and it worked, compiled the dummy program ok. It is worrying that i have to make such manual hacks i guess it suggests i have done something a bit wrong somewhere.
|
If you need to change any of the commands in the book to make it work, then there is definitely something wrong! Continuing would be useless.
Quote:
|
I am downloading the live cd now.
|
Good choice!
Don't use the packages and book that are (possibly) on the liveCD. Those are from an older LFS version (6.3 from the top of my head). Download the Book and the packages ( LFS tarballs) and use those.
Have fun!
|
|
|
|
09-17-2010, 01:39 PM
|
#7
|
|
LQ Newbie
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5
Original Poster
Rep:
|
Thanks for the help , i was starting to suspect it was time to wipe it out and start round 2, a project for tomorrow then. At least on the next try i should have more of an idea what i am doing.
|
|
|
|
10-14-2010, 08:23 AM
|
#8
|
|
Member
Registered: Dec 2009
Location: Bulgaria for now :)
Distribution: Fedora 14
Posts: 60
Rep:
|
You know , it could be not the case here, but i got the same error message
well, i deleted all related to gcc and started over with the step and by the end of MAKE i realized that the previous time i forgot to do MAKE INSTALL. and what do you know, doing that last bit resolved the issue 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:59 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
|
|