[SOLVED] LFS:- Error while compiling GCC (configure-target-libgcc)
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.