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.
I have came to the STEP 5.7. Adjusting the Toolchain .
but I can go on new.
when I have typed down the below:
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
yes,it works very well.
but next :
this:
gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&@g' \
> `dirname $(gcc -print-libgcc-file-name)`/specserror is like this:
sed:can't read /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/specs:
NO such file or directory
and I don't where is wrong.so I go on.
typed:
GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &&
find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &&
rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &&
unset GCC_INCLUDEDIR
but when I check:
echo 'main(){}' > dummy.c
cc dummy.c
readelf -l a.out | grep ': /tools'
I get nothing!!!!
I cannot find the specs directory... Please anyone can help me with this??.... i already have check this command once and once and once, and i cant find anything that could be possibly wrong... it keeps saying that /specs directory doesn't exists!!!
I had problems here too. I ran through the first three commands in the section without a hitch, but the fourth command failed. I then tried the next command with the specs, and had the same problems you did.
I solved it by copying and pasting each line from the first four lines (a couple errors regarding files not found popped up the first couple times) and then I was careful to cut and paste the fifth command. I was tripped up by the second line starting with a '>' character, and assumed it was just to represent the prompt; you NEED that greater than symbol in your code! Cut and paste the entire line exactly as it's in the book, and you should be good to go again.
originally there is no specs and no spec directory, gcc -dumpspecs is trying to generate a spec file in a directory(the directory is $gcc -print-libgcc-file-name), so i suggest,first run gcc -print-libgcc-file-name to find out what directory it is,and run gcc -dumpspecs to see if gcc can generate a file named specs in it,then run sed to modify it,hopefull it will be there,if not,there maybe problem that you typed something wrong,i know it's silly,but i found it's common,beware of the ", . `" symbols,and type it right.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.