LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-11-2003, 12:54 PM   #1
Mugatu
Member
 
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Rep: Reputation: 30
Question configure: error: C++ preprocessor "/lib/cpp" fails sanity check


I've searched all over Google to try and figure out how to fix this error. I'm using Mandrake 9.2, and trying to install apollon 0.9.1. Any suggestions? I'm not a complete newbie at Linux, but I'm still learning. I've also seen this same error before when trying to install Xine.

[root@CCSTAFF2 apollon-0.9.1]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking whether g++ supports -Wmissing-format-attribute... no
checking whether g++ supports -Wundef... no
checking whether g++ supports -Wno-long-long... no
checking whether g++ supports -Wnon-virtual-dtor... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
[root@CCSTAFF2 apollon-0.9.1]# grep cpp config.log
configure:5334: /lib/cpp conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:5334: /lib/cpp conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:5416: result: /lib/cpp
configure:5441: /lib/cpp conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:5441: /lib/cpp conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:5515: error: C++ preprocessor "/lib/cpp" fails sanity check
ac_cv_prog_CXXCPP=/lib/cpp
CXXCPP='/lib/cpp'
[root@CCSTAFF2 apollon-0.9.1]#
 
Old 12-11-2003, 02:06 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That means that you didn't install your C++ compiler.



Cheers,
Tink
 
Old 12-11-2003, 02:26 PM   #3
Mugatu
Member
 
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Original Poster
Rep: Reputation: 30
Okay, I feel really stupid now (I probably should've posted my question in the newbie forum). According to this:

http://www.linuxquestions.org/questi...hreadid=124849

gcc is the c++ compiler, but Mandrake 9.2 came with gcc-3.3.1-2 installed already. Is there something else I need or should I just go to the newbie forum where I belong?
 
Old 12-11-2003, 02:43 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Have another look

gcc = C compiler
g++ = C++ compiler ...

I'm almost certain that Mandreck comes
with more than one gcc option to install.


Cheers,
Tink
 
Old 12-11-2003, 03:07 PM   #5
Mugatu
Member
 
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Original Poster
Rep: Reputation: 30
Well I still feel stupid. When I do a search for g++, it takes me to gcc.gnu.org. At:

http://www.gnu.org/directory/GNU/gpp.html

it says:

"g++ is the traditional nickname of GNU C++, a freely redistributable C++ compiler. It is part of gcc, the GNU compiler suite, and is currently part of that distribution "

So if I have gcc installed, should that not include g++ as well?
 
Old 12-11-2003, 03:14 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Let's put it that way:

gcc is TWO things ... it's the synonym for
the GNU compiler suite. If you download
gcc from GNU and compile it from source
you'll get C, C++, Objective C, ....

gcc is also the name of the normal C compiler.

Most distro's assume that the user won't NEED
or WANT all languages supported, and they split
it up for you to choose from. In Slack 8.1 I have
/var/log/packages/gcc-2.95.3-i386-2
/var/log/packages/gcc-g++-2.95.3-i386-2
/var/log/packages/gcc-g77-2.95.3-i386-2
installed. These are the names of the packages
that Patrick has split it up into. Have a look at
your Mdk CD's and look for gcc*



Cheers,
Tink
 
Old 12-11-2003, 03:36 PM   #7
Mugatu
Member
 
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Original Poster
Rep: Reputation: 30
Okay, I got it working, thanks a ton for the help. I finally found the g++ files ( gcc2.96-c++-2.96-0.83mdk.i586.rpm) and all is well once I installed the necessary stuff.
 
Old 12-11-2003, 03:41 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Congratulations :}


Cheers,
Tink


Was this worth an affero? ;}
 
Old 10-08-2004, 01:29 PM   #9
zari
LQ Newbie
 
Registered: Oct 2004
Posts: 1

Rep: Reputation: 0
same problem

hello

i have linux mandrake 10.1 and want to install some programs but ii cant Ive got the same notification please what can i do?

regard

ari
 
Old 10-22-2004, 08:36 AM   #10
Boyer
Member
 
Registered: Oct 2004
Location: Saint John, New Brunswick, Canada
Distribution: Mandrake 10.0 w/ KDE 3.3.1
Posts: 42

Rep: Reputation: 15
Like said above, you must install gcc, gcc-cpp, and gcc-c++

Just do:

# urpmi gcc gcc-cpp gcc-c++

and urpmi will install the nessessary packages for you. If you don't have urpmi for some reason, try www.pbone.net or www.rpmfind.net

Cheers,
Boyer
 
Old 10-22-2004, 03:12 PM   #11
nutsucoco
LQ Newbie
 
Registered: Oct 2004
Distribution: Mandrakelinux 10.1 Community
Posts: 2

Rep: Reputation: 0
Hi !
I have the same problem but I can't solve it : first of all I couldn't find the following package :
gcc2.96-c++-2.96-0.83mdk.i586.rpm
then I tried 'urpmi gcc-c++' and I got 'no package named gcc-c++'
What should I do ?
Thanks.

PS: my linux distribution is Mandrakelinux 10.1 Community
 
Old 10-22-2004, 05:18 PM   #12
Boyer
Member
 
Registered: Oct 2004
Location: Saint John, New Brunswick, Canada
Distribution: Mandrake 10.0 w/ KDE 3.3.1
Posts: 42

Rep: Reputation: 15
Try the two sites I recommended in the post above. I just did that yesterday, and it fixed my problems.
Also, you might want to update your urpm media database.
 
Old 10-24-2004, 09:02 AM   #13
nutsucoco
LQ Newbie
 
Registered: Oct 2004
Distribution: Mandrakelinux 10.1 Community
Posts: 2

Rep: Reputation: 0
How to update the urpm database ?
I tried to install gcc-c++ but it asked me to install libstdc++ first. The problem is that when I do "urpmi libstdc++5-3.3.1-4sls.i586.rpm" the computer does nothing. So I installed gcc-c++ without satisfying the dependencies and it is still not working.
Do you have a solution ?
 
Old 10-27-2004, 02:49 PM   #14
exeon
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Rep: Reputation: 0
I know this shouldn't be right.
gcc was already installed on my machine but I still got:
C++ preprocessor "/lib/cpp" fails sanity check
I looked at config.log and it said something like:
cc1plus command not found

i found cc1
/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/cc1
so I linked it in /usr/bin
ln -s /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/cc1 cc1plus

voila: all working

Mandrake 10.1 Community Edition
Athlon XP 1500+
Chipset SIS 735
 
Old 11-05-2004, 05:04 PM   #15
stevenking66
LQ Newbie
 
Registered: Aug 2004
Posts: 5

Rep: Reputation: 0
Hello

Not sure if this you proiblem, but for the benefit of the world in general, you can get the same error message if you do not have the kernel-source installed. My clue was in the config.log:

configure:3620: result: /lib/cpp
configure:3644: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:130,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory


Hope this is helpful to someone

Steve
 
  


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 marek345 Linux - Software 4 11-06-2008 09:49 AM
ardour wont configure: configure: error: C preprocessor "/lib/cpp" fails sanity check disciple061 Linux - Software 4 01-22-2005 12:35 PM
configure: error: C++ preprocessor "/lib/cpp" fails sanity check HELP Ckesey Linux - Newbie 3 10-04-2004 01:58 PM
configure: error: C++ preprocessor "/lib/cpp" fails sanity check HELP Ckesey Linux - Software 0 10-04-2004 09:49 AM
configure: error: C++ preprocessor "/lib/cpp" fails sanity check raela Linux - Software 6 03-16-2004 05:59 PM

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

All times are GMT -5. The time now is 03:00 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