LinuxQuestions.org
Review your favorite Linux distribution.
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 10-10-2008, 06:50 AM   #1
nillgump
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Rep: Reputation: 0
Question 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?
 
Old 10-10-2008, 07:29 AM   #2
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
What does "echo $(gcc -print-libgcc-file-name)" show?
 
Old 10-10-2008, 07:43 AM   #3
nillgump
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
this

Quote:
Originally Posted by Total-MAdMaN View Post
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?
 
Old 10-10-2008, 07:50 AM   #4
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
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.
 
Old 10-10-2008, 08:42 AM   #5
nillgump
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
NO,just
libgcc.a
 
Old 10-11-2008, 06:32 AM   #6
clonas
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Rep: Reputation: 0
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 ?
 
Old 10-11-2008, 09:50 AM   #7
nillgump
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
he

Quote:
Originally Posted by clonas View Post
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?

Last edited by nillgump; 10-11-2008 at 09:52 AM.
 
Old 11-01-2008, 10:51 AM   #8
Lolandrea
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
I'm having the same problem... I need to solve it... did anyone know what could be the solution???????? :S
 
Old 11-02-2008, 10:53 AM   #9
Lolandrea
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
Exclamation

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!!!
 
Old 11-05-2008, 12:50 PM   #10
clonas
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Rep: Reputation: 0
After copying specs file, I,ve got printered specs file and nothing else done.
 
Old 11-05-2008, 06:18 PM   #11
Lolandrea
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
Exclamation Can't umount /mnt/lfs

move my post to theme
 
Old 11-12-2008, 06:16 AM   #12
Stephann
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
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!
 
Old 11-24-2008, 08:29 PM   #13
jimmerlin
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Rep: Reputation: 0
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.
 
  


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
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
LFS 6.2: made mistake when going from lfs to root setup oldgeek Linux From Scratch 4 11-12-2006 09:00 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 05:03 AM

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

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