LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS V 7.2: Chapter 6.10: Issue w/ adjusting GCC specs file (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-v-7-2-chapter-6-10-issue-w-adjusting-gcc-specs-file-4175450450/)

luckylinuxluser 02-16-2013 12:31 PM

LFS V 7.2: Chapter 6.10: Issue w/ adjusting GCC specs file
 
Code:

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

Output for this command is as follows:

Code:

bash: dirname $(gcc --print-libgcc-file-name)/specs: No such file or directory
I'm executing this code from the /sources directory. I already rm'ed the gcc-4.7.1 and gcc-build directory as per the General Compilation Instructions.

Any ideas on where I goofed?

druuna 02-17-2013 05:14 AM

There's not much to go on, but in general this points to a mistake made in this, or one of the previous chapters (yeah, I know that is rather general).

Have you checked if the directory that the command spits out does(n't) exist?
Code:

dirname $(gcc --print-libgcc-file-name)

luckylinuxluser 02-17-2013 12:35 PM

Quote:

Originally Posted by druuna (Post 4893539)
There's not much to go on, but in general this points to a mistake made in this, or one of the previous chapters (yeah, I know that is rather general).

Have you checked if the directory that the command spits out does(n't) exist?
Code:

dirname $(gcc --print-libgcc-file-name)

Yes I have checked that directory (/tools/lib/gcc/i686-pc-linux-gnu/4.7.1) and it does exist. It's only missing the ""/specs file.

druuna 02-17-2013 12:44 PM

Quote:

Originally Posted by luckylinuxluser (Post 4893794)
Yes I have checked that directory and it does exist. It's only missing the ""/specs file.

That is correct (the missing specs part). This output: `dirname $(gcc --print-libgcc-file-name)`/specs is given to sed to be used as output file.

Are you 100% sure the command was copied correctly? I do get the feeling you might have used 'dirname $(gcc --print-libgcc-file-name)'/specs instead of `dirname $(gcc --print-libgcc-file-name)`/specs (single quotes vs back-ticks).

luckylinuxluser 02-17-2013 12:57 PM

Quote:

Originally Posted by druuna (Post 4893800)
That is correct (the missing specs part). This output: `dirname $(gcc --print-libgcc-file-name)`/specs is given to sed to be used as output file.

Are you 100% sure the command was copied correctly? I do get the feeling you might have used 'dirname $(gcc --print-libgcc-file-name)'/specs instead of `dirname $(gcc --print-libgcc-file-name)`/specs (single quotes vs back-ticks).

You're right. Thank you very much.

I had this very same issue before and can't believe I didn't check to make sure I was using the right characters... My host system doesn't have a GUI so I can't copy and paste.

Thank you.


All times are GMT -5. The time now is 05:21 PM.