LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Need help with SPECFILE=` gcc -- print-file specs` (https://www.linuxquestions.org/questions/linux-from-scratch-13/need-help-with-specfile%3D%60-gcc-print-file-specs%60-484192/)

status1 09-16-2006 07:01 PM

Need help with SPECFILE=` gcc -- print-file specs`
 
Hello
On page 56 of the LFS 6.0 book I have to ammend the GCC spec file.
On the first line there are some single quotes that I am not sure if it's the same as the forward quotes
It has a much steeper slant then the regular quote.
Are there any special characters that I should use that I
don't normallty have on my keyboard ?
The other thing is not clear is in which directory should I be when I execute the command.

Right now I am getting an error at the mv command because it's trying to move it to the /usr/lib/gcc/i486-pc-linux-gnu/3.4.1/specs
and it's saying it is unable to remove target : Read only file system.

jong357 09-16-2006 11:22 PM

Didn't we already have this same exact post answered here just a couple days ago? :study: Maybe it was somewhere else. They are tics and can be found above your TAB key. You used them in your subject header..... :scratch:

When you have long/complex commands, it's best to just copy/paste the whole lot to make sure you get it right.

druuna 09-18-2006 06:22 AM

Hi,

@jong357: Yep, we've had this question before: chapter 5.7 concerns

@status1: jong357 is correct on 2 accounts:

1) You probably did not use backtics but normal quote's.
2) If at all possible copy-paste the (syntactical complicated) commands.

status1 09-18-2006 06:37 PM

Hello,
If it's the symbol that is under the ~ then yes I used the backtick
It's on the bottom next to the alt key on my laptop.
For some reason in the book it's tilted a lot more than it looks
on the keyboard and typed out.
In the book it looks almost horizontal to maybe 15 degrees while on the keyboard and on the screen it looks like 45 degrees.
I thought that there was some trick to making that symbol

So then the problem is somewhere else

I will give it another try over the weekend.
Is there more than one spec file ?
I tried to edit it by hand but I did find any mention of /lib/ld-linux.so.2
I will give it another try over the weekend maybe I missed something on the first try.

druuna 09-19-2006 02:26 AM

Hi,

Love to help you, but I also see that a previous problem hasn't been solved yet. It's pointless to continue if you do not solve that problem first.

BTW: SPECFILE is not a file, but a variable that holds the content of the output of the gcc --print.....command.

status1 09-23-2006 02:02 PM

Hello,
Well I ran it again and as I suspected and as you explained the earlier problem
did not have any effect on the current error which still exists.
Here is the exact error
mv: inter-device move failed 'tempspecfile' to '/usr/lib/gcc/i486-pc-linux-gnu/
3.4.1/specs' : unable to remove target Read-only file system

druuna 09-23-2006 02:27 PM

Hi,

You are not allowed writing to /usr/lib/gcc/i486-pc-linux-gnu/. I do wonder if that destination is correct.......

Did you run make -C ld install (first command chapter 5.9) from within the binutils-build directory?

And what is the output of echo $SPECFILE after you do the SPECFILE=`gcc --print-file specs` and sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' $SPECFILE > tempspecfile steps.

status1 09-23-2006 03:15 PM

Hello,
Yes I ran the make -C ld install but I am not getting anything for
echo $SPECFILE just a blank line

status1 09-23-2006 03:30 PM

Hello,
Actually I realize that I had a typo in the first line
I missed the $ before the SPECFILE
so now I have an error on the first line
bash: =/usr/lib/gcc/i486-pc-linux-gnu/3.4.1/specs: no such file or directory

druuna 09-23-2006 03:31 PM

Hi,

Quote:

echo $SPECFILE just a blank line
That's not correct, it should print a dirstructure that points to a file. I.e:
Code:

$ SPECFILE=`gcc --print-file specs`
$ echo $SPECFILE
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs

What happens when you run the following command: gcc --print-file specs

PS: You cannot use /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs, this is version dependent and does not correspond with LFS 6.0.

status1 09-23-2006 03:43 PM

Hello
After I run gcc --print-file specs I get
/usr/lib/gcc/i486-pc-linux-gnu/3.4.1/specs
Which I have but it's a read only file system so I don't see how I can change it unless I move it somewhere else

druuna 09-23-2006 04:00 PM

Hi,

I don't think that /usr/lib/gcc/i486-pc-linux-gnu/3.4.1/specs has the correct path part. It should say something like: /tools/usr/lib/gcc/i486-pc-linux-gnu/3.4.1/specs (guessing here, don't have a half installed lfs 6.0 around :) ).

gcc should point to /tools/bin/cc, is that so?
If not: you probably forget to do the ln -s gcc /tools/bin/cc step in chapter 5.5

status1 09-23-2006 04:12 PM

Hello,
I did not forget that command
I just ran ln -s gcc /tools/bin/cc again and I got
ln: /tools/bin/cc : file exists

druuna 09-23-2006 04:26 PM

Hi,

What does which gcc tell you?

status1 09-23-2006 04:30 PM

Hello,
After running which gcc I get
/usr/bin/gcc


All times are GMT -5. The time now is 08:52 PM.