LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS - Adjusting the toolchain problem (book 6.4) (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-adjusting-the-toolchain-problem-book-6-4-a-728521/)

charlie_lab 05-26-2009 02:38 AM

LFS - Adjusting the toolchain problem (book 6.4)
 
Hello,

In this chapter i have to do this :
gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' \
> `dirname $(gcc -print-libgcc-file-name)`/specs

I don't see anything happen and no specs file is being found.

What went wrong ?

Roelof

druuna 05-26-2009 02:42 AM

Hi,

Did you copy/paste the command or type it? If you typed it: the > is part of the command and not your PS2 prompt.

As an alternative you could use:

gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' > `dirname $(gcc -print-libgcc-file-name)`/specs

If that does not work, what does this command show:

gcc -print-libgcc-file-name

Hope this helps.

charlie_lab 05-26-2009 04:04 AM

Hello,

I copy/paste the command.

Result of gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' > `dirname $(gcc -print-libgcc-file-name)`/specs

Code:

lfs:~$ gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' > `dirname $(gcc -print-libgcc-file-name)`/specs
lfs:~$ less specs
specs: No such file or directory

Result of gcc -print-libgcc-file-name
Code:

lfs:~$ gcc -print-libgcc-file-name
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc.a

Roelof

druuna 05-26-2009 04:17 AM

Hi,

I do believe you are looking in the wrong place for the specs file.......

this command: `dirname $(gcc -print-libgcc-file-name)`/specs comes back with:

gcc -print-libgcc-file-name -> /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc.a
dirname /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc.a -> /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2
`dirname $(gcc -print-libgcc-file-name)`/specs -> /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/specs

Issuing a less specs from your current position will not show anything, 'cause specs is located elsewhere (otherwise they could have told you to do this instead: gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' > specs. Which will put specs in the wrong place and is, thus, wrong).

If the commands given in the LFS book do not show any error(s): Continue.

charlie_lab 05-26-2009 04:20 AM

Oke,

Thank you for your time and explanation.

Roelof


All times are GMT -5. The time now is 12:24 AM.