LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 08-16-2009, 12:21 AM   #1
tgsasi
LQ Newbie
 
Registered: Apr 2006
Posts: 3
Thanked: 0
Smile C preprocessor "/lib/cpp" fails sanity check


[Log in to get rid of this advertisement]
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
tgsasi is offline     Reply With Quote
Old 08-16-2009, 01:32 AM   #2
weibullguy
PackManUtil Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Cross Linux from Scratch, Gentoo
Posts: 2,343
Blog Entries: 1
Thanked: 60
Look in config.log to see why you are getting this error. It is most likely that you are missing files.
weibullguy is offline     Reply With Quote
Old 08-16-2009, 02:03 AM   #3
tgsasi
LQ Newbie
 
Registered: Apr 2006
Posts: 3
Thanked: 0

Original Poster
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
tgsasi is offline     Reply With Quote
Old 08-16-2009, 02:16 AM   #4
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,926
Thanked: 272
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 03:23 AM..
knudfl is offline  
Tag This Post ,
Reply With Quote
Thanked by:
Old 08-16-2009, 02:20 AM   #5
paulsm4
Senior Member
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 3,318
Thanked: 144
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/
paulsm4 is offline     Reply With Quote
Old 08-16-2009, 02:39 AM   #6
tgsasi
LQ Newbie
 
Registered: Apr 2006
Posts: 3
Thanked: 0

Original Poster
Thanks a lot its working now

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

Thanks for your help


T.G.Sasikumar
tgsasi is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 12:16 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration