LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.0 - 6.10 Re-adjusting the toolchain - No specs file (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-0-6-10-re-adjusting-the-toolchain-no-specs-file-915222/)

derstephen 11-23-2011 08:34 PM

LFS 7.0 - 6.10 Re-adjusting the toolchain - No specs file
 
As in the thread title, I am currently working through LFS chapter 6.10. This is the output for the second command, which points the GCC "specs" file to the new dynamic linker:

Code:

root:/sources/glibc-build# gcc -dumpspecs | sed -e 's@/tools@@g' \
> -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
> -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' \
> `dirname $(gcc --print-libgcc-file-name)`/specs
sed: can't read /tools/lib/gcc/i686-pc-linux-gnu/4.6.1/specs: No such file or directory

So of course I decided to see what would happen if I just created a new one:
Code:

root:/sources/glibc-build# touch /tools/lib/gcc/i686-pc-linux-gnu/4.6.1/specs
root:/sources/glibc-build# gcc -dumpspecs | sed -e 's@/tools@@g' -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' `dirname $(gcc --print-libgcc-file-name)`/specs
gcc: error: unrecognized option '-mtune=generic'
gcc: error: unrecognized option '-march=pentiumpro'

I realize I'm still in the glibc-build directory, but it seems like we're using absolute file names so I'd be surprised if that were the issue. The only thing I can think of is that it didn't get made because of some make error. This is the second time I've installed Glibc for this section (the first failed because of a stupid error I made and corrected) but there's always the possibility that I made a another error. I'd rather not have to rebuild it again since I'm working on a single-core processor and can't really spread it over multiple threads to much effect but ultimately I'll do what I have to do...

Thanks.

jhwilliams 11-25-2011 04:55 AM

Quote:

Originally Posted by derstephen (Post 4532321)
As in the thread title, I am currently working through LFS chapter 6.10. This is the output for the second command, which points the GCC "specs" file to the new dynamic linker:

Code:

> -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' \

You are missing a > redirection operator at the end of this line, before the \. As a result, you never write the specs file. If you carefully reinspect the (large) command on the LFS site, and you'll see what I'm talking about.


Quote:

I realize I'm still in the glibc-build directory, but it seems like we're using absolute file names so I'd be surprised if that were the issue.
A suggestion - never assume anything about directories or paths while you're following LFS, at least for the first time! cd can be a very important command.

derstephen 12-01-2011 05:20 PM

Thank you jhwilliams, I was hoping it would be something stupid I did. I promised myself I would be extra careful with typing in the commands, but it looks like I'll have to be even more careful than that...


All times are GMT -5. The time now is 01:24 PM.