LinuxQuestions.org
Review your favorite Linux distribution.
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 06-01-2007, 02:11 PM   #1
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
C Preprocessor fails sanity check?


I get an error when trying to ./configure any of the source code
in this style:
fire@xendria:~/programing/testapp$ ./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 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 ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) 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.

But, GCC is installed...
What should I do?
 
Old 06-01-2007, 02:46 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally Posted by Tux-Slack
What should I do?
See the config.log for more details. If you don't understand the details, post those back here.
 
Old 06-01-2007, 03:12 PM   #3
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Original Poster
Rep: Reputation: 37
How did you know I wouldn't understand this?
Here's the config.log:
http://www.x-shells.org/config.log

gcc version -> 3.4.6
 
Old 06-01-2007, 03:23 PM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Code:
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:11:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
It can't find the file /usr/include/linux/limits.h. That's a kernel header file. Does Slackware provide sanitized kernel headers? I don't use Slackware, so I have no idea. I would guess there is a kernel-headers package for Slackware though.
 
Old 06-01-2007, 03:26 PM   #5
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
You need to install the kernel-headers pkg, as suggested.
 
Old 06-01-2007, 04:00 PM   #6
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Original Poster
Rep: Reputation: 37
kernel-headers are for 2.4.33.3, 2.6.17.13 and 2.16.18
and I have 2.6.20.7, will this cause a problem?
 
Old 06-01-2007, 04:48 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
It shouldn't. And w/o the kernel headers that the system
libs have been compiled against you'll have a hard time
to install *anything* from source. Check the changelog
for kernel headers so you choose the ones that suit your
machine best.


Cheers,
Tink
 
Old 06-02-2007, 12:22 AM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
The kernel headers on your system should match the kernel that glibc was compiled against.
Do a search of this forum for me as the author, using kernel headers and glibc as tags.
I think it was in a thread about udev, but anyway, there's a decent (IMHO) explanation of why.
 
Old 06-02-2007, 03:51 AM   #9
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
I've been using the headers from my current kernel over 6 months now, and never experienced any problems.
 
Old 06-02-2007, 03:54 AM   #10
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Original Poster
Rep: Reputation: 37
Kernel headers did the job.
Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 i.you Linux - Software 3 03-06-2007 02:24 AM
error: C preprocessor "/lib/cpp" fails sanity check ankit4u1 Linux - Software 2 04-02-2006 12:24 PM
error: C preprocessor "/lib/cpp" fails sanity check Master Fox Linux - Software 0 10-14-2004 03:39 PM
configure: error: C++ preprocessor fails sanity check Guitarist88 Linux - Newbie 1 08-13-2004 03:23 AM

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

All times are GMT -5. The time now is 09:46 AM.

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