configure: error: C++ preprocessor "/lib/cpp" fails sanity check
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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]#
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?
"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?
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*
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.
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
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.
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 ?
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.