LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-03-2006, 05:03 PM   #1
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Rep: Reputation: 15
"/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..

Last edited by 311Sam; 10-03-2006 at 05:11 PM.
 
Old 10-03-2006, 08:51 PM   #2
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
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.
 
Old 10-03-2006, 08:56 PM   #3
sfaz32
LQ Newbie
 
Registered: Sep 2005
Posts: 16

Rep: Reputation: 0
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.
 
Old 10-03-2006, 10:51 PM   #4
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
upgradepkg --reinstall slackware/d/gcc*.tgz

Same problem.
 
Old 10-03-2006, 11:14 PM   #5
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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.
 
Old 10-03-2006, 11:35 PM   #6
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
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.
 
Old 10-04-2006, 05:07 AM   #7
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Original Poster
Rep: Reputation: 15
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?
 
Old 10-04-2006, 05:21 AM   #8
sfaz32
LQ Newbie
 
Registered: Sep 2005
Posts: 16

Rep: Reputation: 0
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.
 
Old 10-04-2006, 05:34 AM   #9
sfaz32
LQ Newbie
 
Registered: Sep 2005
Posts: 16

Rep: Reputation: 0
To 311Sam,

Try posting the full config.log.
 
Old 10-04-2006, 09:35 AM   #10
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
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).
 
Old 10-04-2006, 01:47 PM   #11
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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.
 
Old 10-04-2006, 03:20 PM   #12
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
/d/kernel-headers-2.4.33.3-i386-1.tgz

Thanks.
 
Old 10-04-2006, 03:37 PM   #13
nykey
Member
 
Registered: Nov 2003
Posts: 360

Rep: Reputation: 30
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.
 
Old 10-04-2006, 07:41 PM   #14
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by sfaz32
To 311Sam,

Try posting the full config.log.
oh sorry, full config logs here



Thanks for helping

Last edited by 311Sam; 06-21-2007 at 03:07 PM.
 
Old 10-04-2006, 08:38 PM   #15
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error: C++ preprocessor "/lib/cpp" fails sanity check marek345 Linux - Software 4 11-06-2008 09:49 AM
error: C preprocessor "/lib/cpp" fails sanity check ankit4u1 Linux - Software 2 04-02-2006 12:24 PM
problems with"/lib/cpp" fails sanity check mac1234mac Linux - Software 16 03-06-2006 06:49 AM
error: C preprocessor "/lib/cpp" fails sanity check Master Fox Linux - Software 0 10-14-2004 03:39 PM
" '/lib/cpp' fails sanity check" when trying to install GAIM BoardinBum Linux - Newbie 2 08-13-2004 08:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration