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.
../../gcc-4.5.1/mpc/src/main.c:199:2: note: use option -std=c99 or -std=gnu99 to compile your code
The problem is indicated by line 2 of the same code ... a for loop contains a declaration which is not allowed unless you are using the newer compiler ... probably by now it is assumed that everyone has C99 specified ... LFS is a learning experience so you will need to dig about in compiler related stuff to figure out exactly where the -std=c99 should be hidden. Having done LFS several times, it is best to read through everything be fore you start.
Just a wild guess ...
5.5.1 builds a minimal compiler which will compile itself and the pieces it needs but not much else ... note the switch settings of stuff it is not to build ... make sure those are right, if they are, find the line in the code which has the offending for loop, then trace backwards to discover which switch is needed to turn off the compiling of that section. You might need to add that switch and notify your LFS friends - after testing the resulting compiler by finishing your project ...
Assuming you are trying to build LFS 6.7 Stable: There's no need to change the commands given in the book, they work as stated. If you need to add to or change the commands in the book then something else is wrong. The 2 most common problems are:
1) Your host isn't fully up to specifications,
2) A mistake was made in the chapter in question or in the steps leading up to that chapter.
I do not have any experience using Suse as a host, but I guess that could be the base of your problem.
Check to see if Suse installs all that is needed (c99 for example) and not just the gcc/g++ part (you might need to install [additional?] gcc development package).
I installed all the development packages which i felt relevant using Yast2.
Then, i installed all the stuff for which i got a 'no' while ./configure.
And, miraculously, on hitting 'make', it compiled with no error.
Its funny that configure was showing no error and was creating makefile even though some crucial stuff was not present.
Thanks again. ))
I have now got the complete tool chain and now heading towards chapter 6.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.