LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   configure: error: C++ preprocessor "/lib/cpp" fails sanity check (https://www.linuxquestions.org/questions/linux-software-2/configure-error-c-preprocessor-lib-cpp-fails-sanity-check-124961/)

Mugatu 12-11-2003 12:54 PM

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]#

Tinkster 12-11-2003 02:06 PM

That means that you didn't install your C++ compiler.



Cheers,
Tink

Mugatu 12-11-2003 02:26 PM

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?

Tinkster 12-11-2003 02:43 PM

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

Mugatu 12-11-2003 03:07 PM

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?

Tinkster 12-11-2003 03:14 PM

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

Mugatu 12-11-2003 03:36 PM

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.

Tinkster 12-11-2003 03:41 PM

Congratulations :}


Cheers,
Tink


Was this worth an affero? ;}

zari 10-08-2004 01:29 PM

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

Boyer 10-22-2004 08:36 AM

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

nutsucoco 10-22-2004 03:12 PM

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

Boyer 10-22-2004 05:18 PM

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.

nutsucoco 10-24-2004 09:02 AM

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 ?

exeon 10-27-2004 02:49 PM

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

stevenking66 11-05-2004 05:04 PM

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


All times are GMT -5. The time now is 07:00 PM.