LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-09-2009, 03:16 PM   #1
zxLinux
LQ Newbie
 
Registered: Jul 2008
Posts: 17

Rep: Reputation: 0
C preprocessor "/lib/cpp" fails sanity check, cannot find stdio.h ???


hello
i'm trying to install FUSE, i want to mount a ntfs partition, the problem
is that when i run ./configure it fails with that message

C preprocessor "/lib/cpp" fails sanity check

checking the logs i've found it fails with this message

configure:3644: gcc -c -g -O2 conftest.c >&5
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

i'm running Centos 5.2, i have installed Developer tools,
i'm not sure why this happens

i have installed fuse on another machine succesfully, so i don't
know why it fails or how to correct it

i have searched the filesystem for that library, found it on
/usr/lib/bcc/include , however if i try to set a .configure variable
with that path it fails too,


i what to know how to fix that, and why that library is not where
it should be,

thanks for your advice!!!
 
Old 03-09-2009, 03:26 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You apparently don't have the full GCC develpment package installed.

Try this:
Quote:
yum install gcc gcc-c++ autoconf automake
Or (which I suspect you already tried...but it didn't succeed):
Quote:
yum groupinstall 'Development Tools'
 
Old 03-09-2009, 04:04 PM   #3
zxLinux
LQ Newbie
 
Registered: Jul 2008
Posts: 17

Original Poster
Rep: Reputation: 0
hello
thanks for your reply
gcc-c++ appears as installed, same for autoconf and automake, however i still have the same problem

is it possible to download and install the library manually???
if yes, what path is the apropriate???? or is it possible
to use another lib already installed?

thanks again for your help, i really apreciate it
 
Old 03-09-2009, 08:58 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. Try something like this:
Quote:
rpm -qa|grep gcc
gcc-c++-2.96-54
gcc-2.96-54
gcc-g77-2.96-54
<= This is a very old Redhat .. you will *not* see this with your new CentOS...
... but it *should* give you some idea if you've actually got GCC installed
2. Then try this:
Quote:
vi hello.c
Code:
#include <stdio.h>

int main (int argc, char *argv[])
{
  printf ("Hello world!\n");
  return 0;
}
gcc -o hello -Wall -g hello.c

ls -l hello
-rwxr-xr-x 1 paulsm users 21313 Mar 9 18:02 hello

./hello
Hello world!
<= This will tell us if you can compile *any* program that needs "stdio.h"
3. If things still aren't working, please post back what you find.
 
Old 03-10-2009, 01:25 AM   #5
zxLinux
LQ Newbie
 
Registered: Jul 2008
Posts: 17

Original Poster
Rep: Reputation: 0
hey
i cannot compile it!!! it has been frustrating

here are the results of grep

gcc-gfortran-4.1.2-42.el5
gcc-objc-4.1.2-42.el5
libgcc-4.1.2-42.el5
gcc-gnat-4.1.2-42.el5
gcc-4.1.2-42.el5
gcc-c++-4.1.2-42.el5


here when i try to compile the source

gcc -o test -Wall -g test.c
test.c:1:19: error: stdio.h: No such file or directory
test.c: In function ‘main’:
test.c:5: warning: implicit declaration of function ‘printf’
test.c:5: warning: incompatible implicit declaration of built-in function ‘printf’


i'm pretty confused !!, you can see gcc is there but the compiler can't find the libraries

thanks for your advise
 
Old 03-10-2009, 09:15 AM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi, again -

You've done everything "right" ...but you need to install one more package:
Quote:
yum install glibc-headers
Look here:
http://www.linuxquestions.org/questi...ectory-685758/

'Hope that helps .. PSM

Last edited by paulsm4; 03-10-2009 at 09:17 AM.
 
Old 03-10-2009, 01:05 PM   #7
zxLinux
LQ Newbie
 
Registered: Jul 2008
Posts: 17

Original Poster
Rep: Reputation: 0
it works now!!

however i don't know why that headers where absent from the install list
maybe an issue in centos software manager

thanks for your help guys =D !!!
 
Old 03-10-2009, 01:39 PM   #8
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Cool :-)

And no, I don't know why you had to explicitly install the headers (independent of all the other components you installed), either. I've never had to do that before, on any *nix platform. I have no idea why CentOS does it that way.

But I'm glad we resolved the problem!

Happy compiling;-)

Your .. PSM
 
  


Reply


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 05:09 AM
error: C preprocessor "/lib/cpp" fails sanity check Virtuality Linux - Software 21 01-06-2008 10:35 PM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration