gcc-4.5.2 - Pass 1 error -gcc command not found ??
Hi I am having trouble getting past chapter 5.5 of Linux From Scratch 6.8 book in which we have to install GCC-4.5.2.
After make and install of GCC-4.5.2 when we have to execute this below command for linking : ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \ sed 's/libgcc/&_eh/'` i get an error : bash: -gcc : command not found What does this above error mean ..please help ? Or atleast guide what exactly $LFS_TGT-gcc is doing maybe then i can figure it out ? It does link libgcc.a despise the above error ... Is this an issue to be ignored ? BTW i am using VirtualBox to build the LFS n LFS LiveCD Thank you |
It means you haven't set the variable LFS_TGT or it somehow got unset. You were supposed to do that in chapter 4.4. It also means your binutils build is probably not correct either.
|
Hi,
This $LFS_TGT-gcc should expand to the value that $LFS_TGT holds and -gcc (example: i686-lfs-linux-gnu-gcc) LFS_TGT is set in this chapter: 4.4. Setting Up the Environment Hope this helps. |
If you get that error you must have made a mistake earlier. Seems to me that the variable $LFS_TGT is not set.
|
I checked .bash_profile and .bashrc content using cat command ... and they are the same in both according to the book ...
.bash_profile ...content : exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash .bashrc ....content : set +h umask 022 LFS=/mnt/lfs LC_ALL=POSIX LFS_TGT=$(uname -m)-lfs-linux-gnu PATH=/tools/bin:/bin:/usr/bin export LFS LC_ALL LFS_TGT PATH I hope that is correct unless i am supposed to replace the uname -m with i686 ?? And binutils compiled fine ..at least i think coz i checked the log file i didn't notice any errors even the tools section contains a folder called i686-lfs-linux-gnu Even the gcc-4.5.2 compile and install went without any errors. Should i try recompiling them again ..for reinstall do we first remove the directory files ? ---------- Post added 07-17-11 at 11:19 PM ---------- Btw thank you for the quick reply :) |
Hi,
Quote:
Quote:
Quote:
Quote:
|
Is there a way to tell if it was set correctly ...because i went back checked .bash_profile and .bashrc both are correct according to the book . I know uname -m is a command i ran it just to make sure and the out i received was i686
So my only option is from scratch ? |
I tried recreating the .bashrc and bash_profile and then ran the "source ~/.bash_profile" command and i get an error :
bash: exec: env: not found |
Hi,
Quote:
Anyway: echo $LFS_TGT Quote:
Quote:
Hope this helps. |
Umm.. I did run them as user lfs and yes i do know how echo a file ... that is why i mentioned if i were to replace it with i686 ... well thanks i anyway i will consider your idea of starting over :)
Thank you |
Hey druuna,
Question is .bashrc supposed to be created as root or user lfs ?? |
|
Thanks i think i figured what is wrong :) thanks for the help
|
You're welcome :)
Have fun with the build! |
You're welcome :)
|
Hello Every one ,
I would like to know if any one has seen this wierd out put after "make install" command of Gcc-4.5.2 of chapter 5.5 for building Gcc-4.5.2 -pass-1 ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'` is giving the following output ln: target `found' is not a directory i have the following out put for the commands enclosed between double quotes: out put of "echo $LFS_TGT" -> i686-lfs-linux-gnu-gcc out put of "gcc -print-libgcc-file-name" -> /usr/lib/gcc/i586-suse-linux/4.5/libgcc.a Am i doing some thing wrong ? Regards, Rakesh |
Hi,
What is the output of: Code:
$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/' |
Quote:
the out put is stated below : $LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/' i686-lfs-linux-gnu-gcc:command not found What does this mean ? Any pointer's would be appreciated. Regards, Rakesh. |
Hi,
Quote:
- i686-lfs-linux-gnu-gcc isn't (correctly) installed: Something went wrong when building gcc pass 1, - One of the lfs' user environment settings isn't correct (check 4.4. Setting Up the Environment). Hope this helps. |
Hi ,
Before starting again , i have cross verified the env variables . lfs:/mnt/lfs/sources/gcc-build$ more ~/.bashrc set +h umask 022 LFS=/mnt/lfs LC_ALL=POSIX LFS_TGT=$(uname -m)-lfs-linux-gnu PATH=/tools/bin:/bin:/usr/bin export LFS LC_ALL LFS_TGT PATH lfs:/mnt/lfs/sources/gcc-build$ more ~/.bash_profile exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash and I have deleted the entire build of Gcc and rebuilt GCC . But still i am facing the same out put for the command : lfs:/mnt/lfs/sources/gcc-build$ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'` ln target `found' is not a directory Any support would be appreciated. Regards, Rakesh. |
Hi ,
To my surprise the out put for the last command you have asked for is like below , sed: -e expression #1, char 5: extra charecters after command how can i resolve this case ? Regards, Rakesh |
All times are GMT -5. The time now is 09:48 PM. |