gcc-4.5.2 - Pass 1 error -gcc command not found ??
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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
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.
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 ----------
I checked .bash_profile and .bashrc content using cat command ... and they are the same in both according to the book ...
Did you check if the LFS_TGT variable is set?
Quote:
I hope that is correct unless i am supposed to replace the uname -m with i686 ??
No, you do not need to do that by hand. uname -m is a command that is executed and will do it for you.
Quote:
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
If LFS_TGT was not set correctly then you need to start from scratch.
Quote:
..for reinstall do we first remove the directory files ?
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
You don't know how to echo a variable? If that is the case then your level of experience is probably too little to build an LFS system (vi. Prerequisites).
Anyway: echo $LFS_TGT
Quote:
...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
If .bashrc was/is correct then you would not have had the error you originally posted. It shows that LFS_TGT was not set. Are you sure you are executing the commands as user lfs?
Quote:
So my only option is from scratch ?
You're still very early in the process of building, I would start from scratch (but also keep in mind what the Prerequisites says.....).
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.