LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   "/lib/cpp" fails sanity check (https://www.linuxquestions.org/questions/slackware-14/lib-cpp-fails-sanity-check-489146/)

311Sam 10-03-2006 05:03 PM

"/lib/cpp" fails sanity check
 
i just recently upgraded to the 2.6.18 kernel from the stock one in slackware 10.2. the whole reason for the upgrade was because i want to install NetworkManager but it requires HAL and HAL requires 26 kernel. i still dont have hal installed but i ran the configure script for network manager again just to see what would happen, under 24 kernel with would stop with an error for hal, now under the 26 kernel the scripts gets this error when ran:

Code:

C++ preprocessor "/lib/cpp" fails sanity check
i dont get why a kernel update would effect that? is there any way around that other then recompiling gcc from source??

also i have that same error when trying to install pango. that was a few weeks ago and i was doing that under the 24 kernel. hmm..

2Gnu 10-03-2006 08:51 PM

I'm getting the same error trying to recompile XSupplicant under 2.4.33.3 after upgrading to 11.0. I normally have to recompile the app after kernel upgrades, but I can't get past the above error.

Kernel source, headers and make tools are all installed.

sfaz32 10-03-2006 08:56 PM

You are missing the C++ compiler from the gcc. /lib/cpp is created while compiling gcc on the second pass.

Reinstall the gcc packages and try to run the script again.

2Gnu 10-03-2006 10:51 PM

upgradepkg --reinstall slackware/d/gcc*.tgz

Same problem.

gbonvehi 10-03-2006 11:14 PM

There's usually a log file created after the error, read carefully and see if you can locate it. It's usually more specific about the problem, there are a lot of things that makes the sanity check fail.

2Gnu 10-03-2006 11:35 PM

Thanks for trying to help with this. I can't compile anything right now, including XFCE4 panel plugins.

Snipped from config.log:
Code:

configure:2973: checking dependency style of gcc
configure:3063: result: gcc3
configure:3086: checking how to run the C preprocessor
configure:3121: gcc -E  conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
                from /usr/include/limits.h:144,
                from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:122,
                from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/syslimits.h:7,
                from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:11,
                from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: /usr/local/include/linux/limits.h: Permission denied
configure:3127: $? = 1
configure: failed program was:
| /* confdefs.h.  */
___________________________________

configure:3121: gcc -E -traditional-cpp  conftest.c
In file included from /usr/include/features.h:308,
                from /usr/include/assert.h:36,
                from conftest.c:14:
/usr/include/sys/cdefs.h:31: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:3127: $? = 1
configure: failed program was:
| /* confdefs.h.  */

There's nothing significant (i2c) in /usr/local/include/linux

Code:

grep cpp config.log
configure:3121: gcc -E -traditional-cpp  conftest.c
configure:3121: gcc -E -traditional-cpp  conftest.c
configure:3121: /lib/cpp  conftest.c
configure:3121: /lib/cpp  conftest.c
configure:3204: result: /lib/cpp
configure:3228: /lib/cpp  conftest.c
configure:3228: /lib/cpp  conftest.c
configure:3303: error: C preprocessor "/lib/cpp" fails sanity check
ac_cv_prog_CPP=/lib/cpp
CPP='/lib/cpp'

Code:

ls -al /lib/cpp
lrwxrwxrwx 1 root root 12 Oct  3 20:45 /lib/cpp -> /usr/bin/cpp

Code:

~/xfce4-xmms-plugin-0.3.1$ ./configure
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... 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... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.


311Sam 10-04-2006 05:07 AM

here the the bottom end of a couple of config.log files:

Code:

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

#define HAVE_DLFCN_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define PACKAGE "hal"
#define PACKAGE_BUGREPORT "david@fubar.dk"
#define PACKAGE_NAME "hal"
#define PACKAGE_STRING "hal 0.5.8.1"
#define PACKAGE_TARNAME "hal"
#define PACKAGE_VERSION "0.5.8.1"
#define STDC_HEADERS 1
#define VERSION "0.5.8.1"
#endif
#ifdef __cplusplus
void exit (int);

configure: exit 1

Code:

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

#define PACKAGE_NAME "NetworkManager"
#define PACKAGE_TARNAME "NetworkManager"
#define PACKAGE_VERSION "0.6.4"
#define PACKAGE_STRING "NetworkManager 0.6.4"
#define PACKAGE_BUGREPORT "dcbw@redhat.com"
#define PACKAGE "NetworkManager"
#define VERSION "0.6.4"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1

configure: exit 1

Code:

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

#define HAVE_DLFCN_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define MODULE_VERSION "1.5.0"
#define PACKAGE "pango"
#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=pango"
#define PACKAGE_NAME "pango"
#define PACKAGE_STRING "pango 1.14.4"
#define PACKAGE_TARNAME "pango"
#define PACKAGE_VERSION "1.14.4"
#define PANGO_BINARY_AGE 1404
#define PANGO_INTERFACE_AGE 4
#define PANGO_MAJOR_VERSION 1
#define PANGO_MICRO_VERSION 4
#define PANGO_MINOR_VERSION 14
#define STDC_HEADERS 1
#define VERSION "1.14.4"
#endif
#ifdef __cplusplus
void exit (int);

configure: exit 1

i can reinstall gcc from source if needed. i would have already done it but it seems there are a ton of install options for it. would just doing a standard ./configure, make &make install work or would it just totally screw everything up?

i got "gcc-4.1.1.tar.bz2" from ftp://mirrors.laffeycomputer.com/pub...ses/gcc-4.1.1/. not sure what the other filee are for in that directory?

sfaz32 10-04-2006 05:21 AM

To 2Gnu,

Code:

/usr/include/bits/local_lim.h:36:26: /usr/local/include/linux/limits.h: Permission denied
Does /usr/local/include/linux/limits.h exist?
limits.h is from the glibc headers. It should be under /usr/include/linux .

Try to reinstall glibc.

sfaz32 10-04-2006 05:34 AM

To 311Sam,

Try posting the full config.log.

2Gnu 10-04-2006 09:35 AM

Quote:

Originally Posted by sfaz32
To 2Gnu,

Does /usr/local/include/linux/limits.h exist?
limits.h is from the glibc headers. It should be under /usr/include/linux .

Try to reinstall glibc.

I reinstalled glibc (along with everything that sounded like or contained glibc) ;)

There are only a few dirs related to i2c. There are headers are in /usr/include/linux, but nothing in /usr/local/include.

I made a filthy hack: moved the stuff in /usr/local/include/linux and made a symlink to /usr/include/linux and some things are compiling (except for XSupplicant).

gbonvehi 10-04-2006 01:47 PM

2Gnu, what kernel-headers package are you using? Remember you should use 2.4 kernel-headers package on Slackware (at least by default..) because glibc was compiled against it.

2Gnu 10-04-2006 03:20 PM

/d/kernel-headers-2.4.33.3-i386-1.tgz

Thanks.

nykey 10-04-2006 03:37 PM

Quote:

Originally Posted by gbonvehi
2Gnu, what kernel-headers package are you using? Remember you should use 2.4 kernel-headers package on Slackware (at least by default..) because glibc was compiled against it.

The Glibc package in Slackware 11 was built against both the 2.4.x and the 2.6.x kernels.

311Sam 10-04-2006 07:41 PM

Quote:

Originally Posted by sfaz32
To 311Sam,

Try posting the full config.log.

oh sorry, full config logs here



Thanks for helping:)

gbonvehi 10-04-2006 08:38 PM

From the log:
Quote:

configure:4455: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/specs
Configured with: ../gcc-3.3.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.6
Take a look at the version, then read next:
Quote:

configure:6493: g++ --version </dev/null >&5
g++ (GCC) 3.4.6
You've gcc-g++-3.4.6 mixed with gcc-3.3.6... you've to upgrade or downgrade all gcc related packages.


All times are GMT -5. The time now is 04:14 AM.