Part II Chapter 6 Section 6.16 GCC-4.5.2 make error
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.
Part II Chapter 6 Section 6.16 GCC-4.5.2 make error
Hi there, sorry to post here (again lol) but this time I'm stumped. I'm trying to build GCC-4.5.2 and when I run make, I get an odd error.
I will iterate:
Code:
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/sources/gcc-build/i686-pc-linux-gnu/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/sources/gcc-build'
make: *** [all] Error 2
of course, that's just where the error begins and ends, and then stops make, but if you need more, just say so.
configure: error: in `/sources/gcc-build/i686-pc-linux-gnu/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
Although the error shown gives me an idea, details are missing. Did you have a look at the config.log file that was created?
My guess for now: You haven't (correctly) build c++ (this was done in chapter 5.10 GCC-4.5.2 - Pass 2).
If my assumption is correct fixing this isn't as easy as the previous perl problem you had. You already adjusted the toolchain (6.10) so going back to chapter 5, (re)installing gcc and continuing with 6.16 is probably not possible. You can, of course, try.
I do hope you followed the advise given at the bottom of chapter 5.34. In that case you don't have to start from scratch again but can remove all and restore the backup. At this point you can redo 5.10 and all of chapter 6.
Well, I went back and reinstalled gcc, tried compiling gcc and got an error about not being able to find zlib.h. So I went back and reinstalled zlib, got the same error, so I decided I'm just going to restart compiling lfs, as I didn't make a backup like you pointed out (I guess I just didn't see that part). Ah well, thanks anyway
Although I figured as much, you did already do the re-adjusting the toolchain part, it is too bad you couldn't fix it by going back to chapter 5.
About making a backup after finishing chapter 5:
- Make sure you are root user,
- Make sure $LFS is still mounted,
- Then:
Code:
# making the backup
$ cd $LFS
$ tar czf /root/lfs-6.8.chap.5.tar.gz *
# removing all
$ cd $LFS
rm -rf *
# restoring the backup
$ cd $LFS
$ tar zxf /root/lfs-6.8.chap.5.tar.gz
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.