LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Can't go on in LFS. (https://www.linuxquestions.org/questions/linux-from-scratch-13/cant-go-on-in-lfs-675477/)

nillgump 10-10-2008 06:50 AM

Can't go on in LFS.
 
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)`/specs
error 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!!!!

There must be some problems.
But where?

Total-MAdMaN 10-10-2008 07:29 AM

What does "echo $(gcc -print-libgcc-file-name)" show?

nillgump 10-10-2008 07:43 AM

this
 
Quote:

Originally Posted by Total-MAdMaN (Post 3306056)
What does "echo $(gcc -print-libgcc-file-name)" show?



/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc.a

SO what is wrong?

Total-MAdMaN 10-10-2008 07:50 AM

Is there a specs directory in /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2? If not, that's why the error is occuring.

nillgump 10-10-2008 08:42 AM

NO,just
libgcc.a

clonas 10-11-2008 06:32 AM

Actually, the directory is wrong in the given question. And have I understood it right that I only need to copy specs file to the important folder ?

nillgump 10-11-2008 09:50 AM

he
 
Quote:

Originally Posted by clonas (Post 3306839)
Actually, the directory is wrong in the given question. And have I understood it right that I only need to copy specs file to the important folder ?

how to find the specs?
I cann't find the file.
where do you find it ?
by "JUST copy the specs to the folder" can solve this problem?

Lolandrea 11-01-2008 10:51 AM

I'm having the same problem... I need to solve it... did anyone know what could be the solution???????? :S

Lolandrea 11-02-2008 10:53 AM

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!!!

clonas 11-05-2008 12:50 PM

After copying specs file, I,ve got printered specs file and nothing else done.

Lolandrea 11-05-2008 06:18 PM

Can't umount /mnt/lfs
 
move my post to theme

Stephann 11-12-2008 06:16 AM

Hey guys,

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.

Good luck!

jimmerlin 11-24-2008 08:29 PM

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.


All times are GMT -5. The time now is 10:54 AM.