adjusting tool chain section 5.8 i686-lfs-linux-gnu-gcc: command not found
Linux From ScratchThis 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.
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.
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
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)
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.
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.
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
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.