LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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

Reply
 
Search this Thread
Old 10-01-2011, 12:29 AM   #1
steviebob
Member
 
Registered: Jan 2010
Location: Arkansas
Distribution: Slackware-Current, LFS
Posts: 136

Rep: Reputation: 16
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.
 
Old 10-01-2011, 04:02 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
Old 10-01-2011, 11:21 PM   #3
steviebob
Member
 
Registered: Jan 2010
Location: Arkansas
Distribution: Slackware-Current, LFS
Posts: 136

Original Poster
Rep: Reputation: 16
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
 
Old 10-02-2011, 03:34 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
  


Reply

Tags
c++, fails sanity check, gcc, lfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS 6.7 Chapter 6.16 GCC-4.5.1 make fails ianll Linux From Scratch 14 08-12-2012 01:27 AM
make fails in section 6.16.1. Installation of GCC ankycooper Linux From Scratch 3 02-25-2011 02:58 AM
LFS 6.6 - Chapter 5.5 - make[2]: *** [buildgetconstants.o] Error 1 - GCC Pass 1 malikcpp Linux From Scratch 3 06-29-2010 09:09 AM
Chapter 6.12 GCC make -k check errors kz_chopper Linux From Scratch 2 02-21-2007 12:54 AM
Is the output of (chapter 6)gcc-3.3.3 make -k check correct?????? linuxbh Linux From Scratch 1 09-05-2004 09:37 AM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration