LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS:- Error while compiling GCC (configure-target-libgcc) (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-error-while-compiling-gcc-configure-target-libgcc-4175438564/)

Prabhu.Are 11-24-2012 03:04 PM

LFS:- Error while compiling GCC (configure-target-libgcc)
 
HI

I'm working on LFS(7.2), I got struck up while compiling GCC. Let me brief you this. I started with the basic of creating partitions, users and other things. I successfully configured binutilities and It got compile without error. In the case of GCC I untared all the three files (mpfr,gmp,mpc) and I configured as specified in the book, without any error. While compiling GCC it got compiled for 30 mins and then it throw me an error as.



checking for i686-lfs-linux-gnu-strip... i686-lfs-linux-gnu-strip
checking whether ln -s works... yes
checking for i686-lfs-linux-gnu-gcc... /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2


I need to resolve this please guide me.



My version check
http://pastebin.com/LrBgkxgE

My configlog content
http://pastebin.com/kCy4sBTL

druuna 11-26-2012 02:13 AM

I can only give you a general answer when it comes to this error (configure: error: cannot compute suffix of object files: cannot compile): Remove all you've done in chapter 5 and start again.

I've seen this error a few times in other threads and none of those have a specific solution. Those people that did start again reported success afterwards, which would point to a typo or misunderstanding of the commands in the first run.

Prabhu.Are 11-26-2012 02:53 AM

Quote:

Originally Posted by druuna (Post 4837059)
I can only give you a general answer when it comes to this error (configure: error: cannot compute suffix of object files: cannot compile): Remove all you've done in chapter 5 and start again.

I've seen this error a few times in other threads and none of those have a specific solution. Those people that did start again reported success afterwards, which would point to a typo or misunderstanding of the commands in the first run.



Drunna Thank you for your valuable comment.
Drunna it was resolved after examining the conflog file the actual issue is the absents of some packages in primary OS, the packages like g++,CC++,lex and some other's too. I came to know these package's are "not found" state in the conflog file, I just installed all those packages in my primary OS after that I did "make clean" and "make" It was done successively. I'm not sure this is the perfect way to resolve this or not, But this was working for me.

druuna 11-26-2012 03:05 AM

Quote:

Originally Posted by Prabhu.Are (Post 4837080)
Drunna it was resolved after examining the conflog file the actual issue is the absents of some packages in primary OS, the packages like g++,CC++,lex and some other's too. I came to know these package's are "not found" state in the conflog file, I just installed all those packages in my primary OS after that I did "make clean" and "make" It was done successively. I'm not sure this is the perfect way to resolve this or not, But this was working for me.

You shouldn't have to deviate from the book. If you do have to install extra's or edit contents to get things working then there is a fairly big chance something is wrong. You'll find out if that is true in the upcoming chapters.

BTW: The version check output looks almost correct, one entry might give problems: gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
From the book:
Quote:

Gcc-4.1.2 (Versions greater than 4.7.1 are not recommended as they have not been tested)
I haven't tried building LFS on top of the newest Ubuntu, so I do not have any personal experience yet with this.

If you think this is solved, please put up the [SOLVED] tag.
- above the first post -> Please Mark this thread as solved if you feel a solution has been provided.
- -or- -
- first post -> Thread Tools -> Mark this thread as solved


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