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 09-17-2010, 09:59 AM   #1
rlaybourn
LQ Newbie
 
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5

Rep: Reputation: 0
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
 
Old 09-17-2010, 10:15 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 09-17-2010, 11:46 AM   #3
rlaybourn
LQ Newbie
 
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 09-17-2010, 12:12 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by rlaybourn View Post
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.
 
Old 09-17-2010, 01:08 PM   #5
rlaybourn
LQ Newbie
 
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 09-17-2010, 01:16 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by rlaybourn View Post
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!
 
Old 09-17-2010, 01:39 PM   #7
rlaybourn
LQ Newbie
 
Registered: Sep 2010
Location: Taipei Taiwan
Distribution: Ubuntu 10.04
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 10-14-2010, 08:23 AM   #8
nocountryman
Member
 
Registered: Dec 2009
Location: Bulgaria for now :)
Distribution: Fedora 14
Posts: 60

Rep: Reputation: 3
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
 
  


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 command not found LFS book 6.3, section 6.7.1 cdc5205 Linux From Scratch 1 08-16-2008 01:56 PM
error in adjusting tool chain in LFS 6.3 chandra123 Linux From Scratch 6 03-19-2008 07:02 AM
adjusting tool chain chandra123 Linux From Scratch 2 02-17-2008 04:45 PM
LFS chapter 5 adjusting the tool chain JusCrzn Linux From Scratch 1 12-20-2004 06:32 PM

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

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