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.
I have followed the LFS book 5.0 closely, and when I compile GCC-3.3.1, it says there is an error, first there are warnings about undefined references, then it says:
make[2]: *** [cc1] Error 1
make[2]: Leaving directory '/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2
I have absolutely no idea what happened. I had built GCC just fine the first time(I restarted the process when Glibc wouldn't build at all), maybe there were errors the first time. I saw a few threads about this from before, but none really got answered as far as I could tell.
Those are the only lines with error in them. Before that were a bunch of C files with undefined references. Most of what it tries to compile has undefined references. There shouldn't be anything wrong with the downloaded file, as it compiled previously without a problem(I restarted the process when Glibc couldn't find the rest of the information)
Originally posted by Blibblob Those are the only lines with error in them. Before that were a bunch of C files with undefined references. Most of what it tries to compile has undefined references. There shouldn't be anything wrong with the downloaded file, as it compiled previously without a problem(I restarted the process when Glibc couldn't find the rest of the information)
This allows us to get a further idea. You see, saying there are undefined references does not really tell us what has happened - is it not finding headers or linking failing or x? Do you have any more details, ie, what it is unable to find?
Undefined refrences, could be missing enviromental variables, or incorrect ones. what does
echo $PATH
echo $LD_LIBRARY_PATH
produce?
Are they pointing to the right places? do you have the sources in these places that the code is asking for. What about -L and -I paths, are they pointing to the right places?
The undefined references that I can see at the bottom are "targetm" and "regclass_map", before that I think I saw the x86 architecture.
$PATH is correct, it has the temporary folder for the new system at the front, and then the correct rest. And the book told me to unset LD_LIBRARY_PATH in my bash profile. And I, uh, don't understand what you mean by the two options.
Yep, They refer to the x86 definitions for gcc, targetm = target machine, and regclass_map is the register map. It seems if these are the definitions it can't find, then there is some missing files in your source, or there in the wrong place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.