LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-15-2009, 11:21 PM   #1
tgsasi
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
Smile C preprocessor "/lib/cpp" fails sanity check


Hi,

While installing pkg-config-0.23 package it throws error " C preprocessor "/lib/cpp" fails sanity check" and i checked for gcc which is already installed and i dont know how to fix this issue.



root@sahara gcc_4.0]# rpm -ivh gcc-c++-4.0.0-8.i386.rpm
warning: gcc-c++-4.0.0-8.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ########################################### [100%]
package gcc-c++-4.0.0-8 is already installed



Thanks
T.G.Sasikumar
 
Old 08-16-2009, 12:32 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,731
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
Look in config.log to see why you are getting this error. It is most likely that you are missing files.
 
Old 08-16-2009, 01:03 AM   #3
tgsasi
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Original Poster
Rep: Reputation: 0
When i checked in config.log file it shows below error.

conftest.c:11:19: error: stdio.h: No such file or directory
conftest.c:12:23: error: sys/types.h: No such file or directory
conftest.c:13:22: error: sys/stat.h: No such file or directory
conftest.c:16: error: syntax error before '*' token
conftest.c:16: warning: 'struct stat' declared inside parameter list
conftest.c:16: warning: its scope is only this definition or declaration, which is probably not what you want
conftest.c:16: warning: data definition has no type or storage class
conftest.c:50: error: syntax error before 'FILE'
conftest.c:50: warning: 'struct stat' declared inside parameter list
 
Old 08-16-2009, 01:16 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,675

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
Quote:
conftest.c:11:19: error: stdio.h: No such file or directory
conftest.c:12:23: error: sys/types.h: No such file or directory
conftest.c:13:22: error: sys/stat.h: No such file or directory
The missing packages : 'glibc-headers' (+ 'glibc-devel' ).

Which also is the the usual cause for the error :
" C preprocessor "/lib/cpp" fails sanity check "

Last edited by knudfl; 08-16-2009 at 02:23 AM.
 
Old 08-16-2009, 01:20 AM   #5
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

If you don't have "stdio.h", you've definitely got a problem.

"Gcc", it turns out, consists of several different packages. Here are a couple of different ways to get everything you need:

Debian, Ubuntu, Simply Mepis, etc:
Quote:
# apt-get update && apt-get upgrade
# apt-get install build-essential
# gcc
<= Checks if you have "gcc" installed...
Redhat, Fedora, etc:
Quote:
# yum install gcc gcc-c++ autoconf automake
# gcc
<= Checks if you have "gcc" installed...
Here's a bit more detail:
http://www.cyberciti.biz/faq/howto-i...piler-on-rhel/
 
Old 08-16-2009, 01:39 AM   #6
tgsasi
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks a lot its working now

After installing "glibc-headers" its working like a breeze.

Thanks for your help


T.G.Sasikumar
 
  


Reply

Tags
cpp


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
error: C++ preprocessor "/lib/cpp" fails sanity check watcher69b Linux - Software 1 07-03-2008 04:09 AM
error: C preprocessor "/lib/cpp" fails sanity check Virtuality Debian 13 01-12-2008 04:37 AM
error: C++ preprocessor "/lib/cpp" fails sanity check i.you Linux - Software 3 03-06-2007 02:24 AM
error: C preprocessor "/lib/cpp" fails sanity check ankit4u1 Linux - Software 2 04-02-2006 12:24 PM
error: C preprocessor "/lib/cpp" fails sanity check Master Fox Linux - Software 0 10-14-2004 03:39 PM


All times are GMT -5. The time now is 11:39 AM.

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