LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   C Preprocessor fails sanity check? (https://www.linuxquestions.org/questions/slackware-14/c-preprocessor-fails-sanity-check-558395/)

Tux-Slack 06-01-2007 02:11 PM

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?

weibullguy 06-01-2007 02:46 PM

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.

Tux-Slack 06-01-2007 03:12 PM

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

weibullguy 06-01-2007 03:23 PM

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.

pdw_hu 06-01-2007 03:26 PM

You need to install the kernel-headers pkg, as suggested.

Tux-Slack 06-01-2007 04:00 PM

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?

Tinkster 06-01-2007 04:48 PM

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

rworkman 06-02-2007 12:22 AM

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.

pdw_hu 06-02-2007 03:51 AM

I've been using the headers from my current kernel over 6 months now, and never experienced any problems.

Tux-Slack 06-02-2007 03:54 AM

Kernel headers did the job.
Thank you


All times are GMT -5. The time now is 03:44 PM.