LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Part II Chapter 6 Section 6.16 GCC-4.5.2 make error (http://www.linuxquestions.org/questions/linux-from-scratch-13/part-ii-chapter-6-section-6-16-gcc-4-5-2-make-error-905882/)

steviebob 09-30-2011 11:29 PM

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.

I'm running Ubuntu Natty.

druuna 10-01-2011 03:02 AM

Hi,
Quote:

Originally Posted by steviebob
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.

But do have a look at the config.log first!

Hope this helps.

steviebob 10-01-2011 10:21 PM

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 :)

druuna 10-02-2011 02:34 AM

Hi,

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

Hope this helps.


All times are GMT -5. The time now is 08:29 AM.