LFS 6.3 chpt 5.7 step cmd problem

Jeremy Huntwork jhuntwork at linuxfromscratch.org
Sun Nov 30 13:21:44 PST 2008

Stealth wrote:
> On Sunday 30 November 2008 03:33:05 pm Wolfgang Messingschlager 
> wrote:
>> Stealth wrote:
>>> On Sunday 30 November 2008 02:17:30 pm Herman Gerritsen wrote:
>>>>> gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&@g' \
>>>>>  > `dirname $(gcc -print-libgcc-file-name)`/specs
>>>>> and I get:
>>>>> sed: can't read /usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs:
>>>>> No such file or directory

First off, do you understand what the PATH variable is doing? If not, I 
suggest you google for the PATH environment variable and take a quick read.

Secondly, do you understand what the first pass of binutils and gcc was 
for and where they should have been installed? Quick hint, you should 
have /tools/bin/gcc and when you run just 'gcc' your shell should be 
using /tools/bin/gcc, not /usr/bin/gcc.

> PATH=/tools/bin:/bin:/usr/bin
>> which gcc
> 4.1.2

I think you misunderstood his suggestion. Type 'which gcc' to find out 
the full path of gcc, the one that your shell is using by default. If 
'which gcc' spits out /usr/bin/gcc, then given that your PATH variable 
is as you say above, quite likely you don't have /tools/bin/gcc. A 
common mistake is to forget to type 'make install' for the first pass of 

> to complete the path above it is:
> /mnt/lfs/sources/gcc-build/gcc/specs

This is not at all correct. Unless that you mean you dumped the specs 
file to this location just so you could look at it. Having a specs file 
in this location does absolutely nothing.


More information about the lfs-support mailing list