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.
The solution for me was to create 2 missing symbolic links, I got the info from the GCC install howto.
My error was that linux/limits.h did not exist .
In the dir usr/include linux should be linked to /linux/include/linux in the kernel source dir, and asm should be linked to linux/include/asm also in kernel source dir.
Well, thanks for your advice.
My first problem was that "slackbuilds" clean up after use, including the configure.log file and leave nothing to look at. So I got something else to compile, i.e. wine-1.1.6. This generated a config.log which produced a number of lines similar to those below :
configure:3759: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Wine"
| #define PACKAGE_TARNAME "wine"
| #define PACKAGE_VERSION "1.1.6"
| #define PACKAGE_STRING "Wine 1.1.6"
| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3753: gcc -E conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i486-slackware-linux/4.2.3/include/limits.h:1
22,
from /usr/lib/gcc/i486-slackware-linux/4.2.3/include/syslimits.
h:7,
from /usr/lib/gcc/i486-slackware-linux/4.2.3/include/limits.h:1
1,
from conftest.c:9:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
I'm supposing a way out is to create a link concerning "limits.h" somewhere, but I'm not sure about this, what would you do?
Thank you for posting this solution.
I had the same problem.
Who would have known that cc1 is cc1plus?
This is for Debian 3.1. ./configuration for a Graphire 4 graphics tablet.
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
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
i get this when i install a program that i need help ??
Today, in some machine, I came accross the same problem. As this thread started several years back, I decided to make this post, that can eventually be useful to people - like this thread was to me, right now.
Some comments seem wrong (at least compared to my solution) or - possibly - just different, because they are old enough.
OS:
Debian 9 (just to mention, the name which I never remember and prefer not to use is: Debian Stretch)
Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64
Problem: ./configure 'ing a project (which should not matter much for the issue, as long it is/contains c++) the following error happens:
Code:
$ ./configure
[[[[[ there are several lines before the following one,
but I removed them here, should not matter ]]]]]
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
The installed package that solved the issue is 'g++'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.