LinuxQuestions.org

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

masmddr 08-03-2010 08:06 AM

"C preprocessor "/lib/cpp" fails sanity check" every single time.
 
Hello.
I have no idea what I've done but I can't compile from source anymore.
VectorLinux standard 6.0

everything I try to compile fails at ./configure with an error :
Quote:

checking how to run the C preprocessor... /lib/cpp
configure: error: in `/home/mas/Desktop/mpc-0.8.2':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
the content of config.log: (kinda long)
Quote:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by mpc configure 0.8.2, which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = A-HOST.None
uname -m = i686
uname -r = 2.6.27.12
uname -s = Linux
uname -v = #1 SMP PREEMPT Thu Jan 22 00:12:35 MST 2009

/usr/bin/uname -p = Intel(R) Core(TM)2 Duo CPU T7250 @ 2.00GHz
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /bin
PATH: /opt/bin
PATH: /usr/X11/bin
PATH: /usr/local/games
PATH: /usr/games
PATH: /usr/lib/java/bin
PATH: /usr/lib/qt/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2419: checking for a BSD-compatible install
configure:2487: result: /usr/bin/ginstall -c
configure:2498: checking whether build environment is sane
configure:2548: result: yes
configure:2689: checking for a thread-safe mkdir -p
configure:2728: result: /usr/bin/mkdir -p
configure:2741: checking for gawk
configure:2757: found /usr/bin/gawk
configure:2768: result: gawk
configure:2779: checking whether make sets $(MAKE)
configure:2805: result: no
configure:2882: checking whether to enable maintainer-specific portions of Makefiles
configure:2891: result: no
configure:2909: checking build system type
configure:2923: result: i686-pc-linux-gnu
configure:2943: checking host system type
configure:2956: result: i686-pc-linux-gnu
configure:3088: checking for gcc
configure:3104: found /usr/bin/gcc
configure:3115: result: gcc
configure:3344: checking for C compiler version
configure:3353: gcc --version >&5
gcc (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3364: $? = 0
configure:3353: gcc -v >&5
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.2.3/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.2.3/configure --prefix=/usr --enable-shared --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.2.3
configure:3364: $? = 0
configure:3353: gcc -V >&5
gcc: '-V' option must have argument
configure:3364: $? = 1
configure:3353: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:3364: $? = 1
configure:3384: checking whether the C compiler works
configure:3406: gcc conftest.c >&5
configure:3410: $? = 0
configure:3459: result: yes
configure:3462: checking for C compiler default output file name
configure:3464: result: a.out
configure:3470: checking for suffix of executables
configure:3477: gcc -o conftest conftest.c >&5
configure:3481: $? = 0
configure:3503: result:
configure:3525: checking whether we are cross compiling
configure:3533: gcc -o conftest conftest.c >&5
configure:3537: $? = 0
configure:3544: ./conftest
configure:3548: $? = 0
configure:3563: result: no
configure:3568: checking for suffix of object files
configure:3590: gcc -c conftest.c >&5
configure:3594: $? = 0
configure:3615: result: o
configure:3619: checking whether we are using the GNU C compiler
configure:3638: gcc -c conftest.c >&5
configure:3638: $? = 0
configure:3647: result: yes
configure:3656: checking whether gcc accepts -g
configure:3676: gcc -c -g conftest.c >&5
configure:3676: $? = 0
configure:3717: result: yes
configure:3734: checking for gcc option to accept ISO C89
configure:3798: gcc -c conftest.c >&5
configure:3798: $? = 0
configure:3811: result: none needed
configure:3842: checking for style of include used by make
configure:3870: result: none
configure:3895: checking dependency style of gcc
configure:4005: result: none
configure:4025: checking how to run the C preprocessor
configure:4056: 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:122,
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:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:4056: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4056: 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:122,
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:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:4056: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4056: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:331,
from /usr/include/assert.h:38,
from conftest.c:15:
/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:4056: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4056: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:331,
from /usr/include/assert.h:38,
from conftest.c:15:
/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:4056: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4056: /lib/cpp 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:122,
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:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:4056: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4056: /lib/cpp 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:122,
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:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:4056: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4095: result: /lib/cpp
configure:4115: /lib/cpp 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:122,
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:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:4115: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4115: /lib/cpp 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:122,
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:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:4115: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mpc"
| #define PACKAGE_TARNAME "mpc"
| #define PACKAGE_VERSION "0.8.2"
| #define PACKAGE_STRING "mpc 0.8.2"
| #define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
| #define PACKAGE_URL ""
| #define PACKAGE "mpc"
| #define VERSION "0.8.2"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4145: error: in `/home/mas/Desktop/mpc-0.8.2':
configure:4148: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

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

ac_cv_build=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=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_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=
ac_cv_host=i686-pc-linux-gnu
ac_cv_objext=o
ac_cv_path_install='/usr/bin/ginstall -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP=/lib/cpp
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_make_make_set=no
am_cv_CC_dependencies_compiler_type=none

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

ACLOCAL='${SHELL} /home/mas/Desktop/mpc-0.8.2/missing --run aclocal-1.11'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/mas/Desktop/mpc-0.8.2/missing --run tar'
AR=''
AUTOCONF='${SHELL} /home/mas/Desktop/mpc-0.8.2/missing --run autoconf'
AUTOHEADER='${SHELL} /home/mas/Desktop/mpc-0.8.2/missing --run autoheader'
AUTOMAKE='${SHELL} /home/mas/Desktop/mpc-0.8.2/missing --run automake-1.11'
AWK='gawk'
CC='gcc'
CCDEPMODE='depmode=none'
CFLAGS=''
CPP='/lib/cpp'
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /home/mas/Desktop/mpc-0.8.2/missing --run makeinfo'
MKDIR_P='/usr/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT='o'
OTOOL64=''
OTOOL=''
PACKAGE='mpc'
PACKAGE_BUGREPORT='mpc-discuss@lists.gforge.inria.fr'
PACKAGE_NAME='mpc'
PACKAGE_STRING='mpc 0.8.2'
PACKAGE_TARNAME='mpc'
PACKAGE_URL=''
PACKAGE_VERSION='0.8.2'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
STRIP=''
VERSION='0.8.2'
WARNINGCFLAGS=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE='#'
am__include='#'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/mas/Desktop/mpc-0.8.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
mkdir_p='/usr/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "mpc"
#define PACKAGE_TARNAME "mpc"
#define PACKAGE_VERSION "0.8.2"
#define PACKAGE_STRING "mpc 0.8.2"
#define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr"
#define PACKAGE_URL ""
#define PACKAGE "mpc"
#define VERSION "0.8.2"

configure: exit 1
I was intending to recompile gcc from source instead of the the one came with the distro, but to do so I need MPC, which I can't compile.:banghead:

barunparichha 08-03-2010 10:05 AM

why r u putting cpp source under /usr/lib ??
/usr/lib is only for libraries

configure:3104: found /usr/bin/gcc
configure:3115: result: gcc
configure:3344: checking for C compiler version
configure:3353: gcc --version >&5


Copy your sourec code to $HOME/cpp-source &
try running configure with "--prefix" option.

knudfl 08-03-2010 10:26 AM

@ barunparichha : The 'cpp' in /lib/ is a link to /usr/bin/cpp
.... and is quite usual, and of course OK.

@ masmddr : The solution is : Install the package 'kernel-headers'

( You have the error : "linux/limits.h: No such file or ..." ).

..

masmddr 08-03-2010 10:37 AM

Thank you. that solved the problem.


All times are GMT -5. The time now is 03:30 AM.