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.
error: C preprocessor "/lib/cpp" fails sanity check
Code:
#./configure --prefix=/usr/local/
configure: error: you must configure in a separate build directory
0x1:/usr/src/glibc-2.7# /usr/src/glibc-2.7/configure --prefix=/usr/local/
configure: error: you must configure in a separate build directory
0x1:/usr/src/glibc-2.7# cd ..
0x1:/usr/src# /usr/src/glibc-2.7/configure --prefix=/usr/local/
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
configure: running configure fragment for add-on nptl
checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for gcc... gcc
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 ISO C89... unsupported
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
I have my kernel headers, kernel source, cpp compiler, EVERYTHING installed, this does not make sense, nor is there a posted solution to it.
I don't know what you're trying to configure there, but it seems
to be swearing at you higher up already ...
Code:
#./configure --prefix=/usr/local/
configure: error: you must configure in a separate build directory
0x1:/usr/src/glibc-2.7# /usr/src/glibc-2.7/configure --prefix=/usr/local/
configure: error: you must configure in a separate build directory
Maybe you want to read the README and/or INSTALL first?
After running that command I did cd out and give it a prefix...
Code:
#./configure --prefix=/usr/local/
configure: error: you must configure in a separate build directory
0x1:/usr/src/glibc-2.7# /usr/src/glibc-2.7/configure --prefix=/usr/local/
configure: error: you must configure in a separate build directory
0x1:/usr/src/glibc-2.7# cd ..
0x1:/usr/src# /usr/src/glibc-2.7/configure --prefix=/usr/local/
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
configure: running configure fragment for add-on nptl
And it's glibc-2.7
Thanks for your help
Last edited by Virtuality; 12-31-2007 at 06:55 PM.
In your pastebin, look at lines 546-724. The configure script is testing cpp and tries several different tests, all of which fail for the same reason. This is the last test just before it spits your error message.
Code:
#configure:3875: /lib/cpp conftest.c
#In file included from /usr/local/include/features.h:354,
# from /usr/local/include/limits.h:27,
# from conftest.c:10:
#/usr/local/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
#configure:3881: $? = 1
#configure: failed program was:
#| /* confdefs.h. */
#| #define PACKAGE_NAME "GNU C Library"
#| #define PACKAGE_TARNAME "c-library"
#| #define PACKAGE_VERSION "(see version.h)"
#| #define PACKAGE_STRING "GNU C Library (see version.h)"
#| #define PACKAGE_BUGREPORT "glibc"
#| #define USE_REGPARMS 1
#| /* end confdefs.h. */
#| #ifdef __STDC__
#| # include <limits.h>
#| #else
#| # include <assert.h>
#| #endif
#| Syntax error
#configure:3943: error: C preprocessor "/lib/cpp" fails sanity check
I'm not a Debian user, so I can't tell you the exact name of the package providing the missing file. I can tell you that glibc provides the stubs-32.h header file though.
I've searched google for over an hour trying to find glibc that I can install on debian, but I can't even get sources... It only seems to exist for redhat/fedora as an rpm. Nothing else.
Also:
Code:
0x1:/home/main# apt-get install glibc-devel
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package glibc-devel
0x1:/home/main# apt-cache search glibc
linux-kernel-headers - Linux Kernel Headers for development
manpages-fr-dev - French version of the development manual pages
abicheck - binary compatibility checking tool
glibc-doc - GNU C Library: Documentation
ja-trans - Japanese gettext message files
kmtrace - a KDE memory leak tracer
libc6 - GNU C Library: Shared libraries
libc6-pic - GNU C Library: PIC archive library
libdb1-compat - The Berkeley database routines [glibc 2.0/2.1 compatibility]
libg++2.8.1.3-glibc2.2 - The GNU C++ extension library - runtime version
libgetopt-java - GNU getopt - Java port
libggz-dev - GGZ Gaming Zone: common utilities library - development files
libggz2 - GGZ Gaming Zone: common utilities library
libnss-ldap - NSS module for using LDAP as a naming service
libnss-mdns - NSS module for Multicast DNS name resolution
libnss-pgsql1 - name service switch module using PostgreSQL
libstdc++2.10-glibc2.2 - The GNU stdc++ library
linuxinfo - Displays extended system information
manpages-dev - Manual pages about using GNU/Linux for development
manpages-pl-dev - Polish man pages for developers
perdition-dev - Development libraries and headers for perdition
perdition-ldap - Library to allow perdition to access LDAP based popmaps
perdition-mysql - Library to allow perdition to access MySQL based popmaps
perdition-odbc - Library to allow perdition to access ODBC based popmaps
perdition-postgresql - Library to allow perdition to access PostgreSQL based popmaps
python-utmp - python module for working with utmp
winbind - service to resolve user and group information from Windows NT servers
glibc-doc-reference - GNU C Library: Documentation
0x1:/home/main#
main@0x1:~$ apt-cache search libc6-dev
libc6-dev - GNU C Library: Development Libraries and Header Files
libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64
0x1:/home/main# apt-get install libc6-dev
Reading package lists... Done
Building dependency tree... Done
libc6-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0x1:/home/main#
Last edited by Virtuality; 01-03-2008 at 01:50 AM.
I've searched google for over an hour trying to find glibc that I can install on debian, but I can't even get sources...
Are you kidding!!! Google glibc and the first hit is the glibc homepage --> http://www.gnu.org/software/libc/ where you click on Availability to get to the link to the ftp server --> http://ftp.gnu.org/gnu/glibc/ where you can get the source for glibc.
Since you already have glibc installed, is the stubs-32.h file installed in /usr/include/gnu or somewhere else? Is it even installed at all?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.