LinuxQuestions.org

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

Virtuality 12-30-2007 02:00 AM

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.

Debian Etch.

matthewg42 12-30-2007 05:22 AM

What is in the config.log (just the bits which refer to cpp should suffice)?

Virtuality 12-31-2007 06:27 AM

I did a search for 'cpp' through the config.log
Code:

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC=''
CC=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
CXX_SYSINCLUDES=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'

This is all there is that so much as mentions cpp.

Tinkster 12-31-2007 02:42 PM

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?



Cheers,
Tink

Virtuality 12-31-2007 05:31 PM

Please look at my code properly : /

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

Virtuality 01-01-2008 09:21 PM

This is a serious issue, I can not compile my WACOM drivers either. It happens everytime I reinstall debian and I have found no solution.

Every single person who uses debian should experience this;

How is it fixed? I should mention I have build-essential already installed also...

weibullguy 01-01-2008 09:39 PM

You will find this exact statement in the config.log
Quote:

configure: error: C preprocessor "/lib/cpp" fails sanity check
. It will be right before the failed step. Search your config.log again.

syberguyy 01-02-2008 01:28 AM

Set the environment variable CPP=/lib/cpp

I helped for me...but not for this package ,its for globus

Virtuality 01-02-2008 03:45 AM

what command do i use to do that? :)

Thanks

Virtuality 01-02-2008 06:14 PM

I typed CPP=/lib/cpp/ and it solved nothing.

http://pastebin.com/f58de519a

proper config.log^

Thanks

weibullguy 01-02-2008 09:29 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.

Virtuality 01-03-2008 12:43 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... 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#


Tinkster 01-03-2008 12:48 AM

Try
apt-cache search libc6-dev



Cheers,
Tink

Virtuality 01-03-2008 12:48 AM

Already installed.

Code:

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#


weibullguy 01-03-2008 05:25 AM

Quote:

Originally Posted by Virtuality (Post 3009357)
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?


All times are GMT -5. The time now is 08:52 PM.