LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-30-2009, 08:47 AM   #1
samengr
Member
 
Registered: Jan 2008
Posts: 59

Rep: Reputation: 15
[RHEL] nagios-plugin install error - C preprocessor "/lib/cpp" fails sanity check


Hi I am facing an issue while installing nagios-plugin at a remote linux machine.

Machine specs are

OS: RHEL5
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
uname -m = i686
uname -r = 2.6.18-92.el5PAE
Ngios-plugin-1.4.14


# ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios- group=nagios --with-cgiurl=nagios/cgi-bin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity checkSee `config.log' for more details.


and in config.log I can see the error


/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:4378: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "nagios-plugins"
| #define PACKAGE_TARNAME "nagios-plugins"
| #define PACKAGE_VERSION "1.4.14"
| #define PACKAGE_STRING "nagios-plugins 1.4.14"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "nagios-plugins"
| #define VERSION "1.4.14"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error

configure:4372: 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/i386-redhat-linux/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/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:4378: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "nagios-plugins"
| #define PACKAGE_TARNAME "nagios-plugins"
| #define PACKAGE_VERSION "1.4.14"
| #define PACKAGE_STRING "nagios-plugins 1.4.14"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "nagios-plugins"
| #define VERSION "1.4.14"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4372: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:330,
from /usr/include/assert.h:37,
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:4378: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "nagios-plugins"
| #define PACKAGE_TARNAME "nagios-plugins"
| #define PACKAGE_VERSION "1.4.14"
| #define PACKAGE_STRING "nagios-plugins 1.4.14"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "nagios-plugins"
| #define VERSION "1.4.14"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif

/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:4378: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "nagios-plugins"
| #define PACKAGE_TARNAME "nagios-plugins"
| #define PACKAGE_VERSION "1.4.14"
| #define PACKAGE_STRING "nagios-plugins 1.4.14"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "nagios-plugins"
| #define VERSION "1.4.14"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4372: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:330,
from /usr/include/assert.h:37,
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:4378: $? = 1

configure:4378: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "nagios-plugins"
| #define PACKAGE_TARNAME "nagios-plugins"
| #define PACKAGE_VERSION "1.4.14"
| #define PACKAGE_STRING "nagios-plugins 1.4.14"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "nagios-plugins"
| #define VERSION "1.4.14"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4372: /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/i386-redhat-linux/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/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




It seems to me glibc issue as I found error "error: #error "You need a ISO C conforming compiler to use the glibc headers"

but I do have glibc installed in this machine

# yum list | grep glibc
This system is not registered with RHN.
RHN support will be disabled.
compat-glibc.i386 1:2.3.4-2.26 installed
compat-glibc-headers.i386 1:2.3.4-2.26 installed
glibc.i686 2.5-24 installed
glibc-common.i386 2.5-24 installed
glibc-devel.i386 2.5-24 installed
glibc-headers.i386 2.5-24 installed
glibc.i386 2.5-12 localinfo
glibc.i686 2.5-12 localinfo
glibc-common.i386 2.5-12 localinfo
glibc-devel.i386 2.5-12 localinfo
glibc-headers.i386 2.5-12 localinfo
glibc-utils.i386 2.5-12 localinfo


may be helpful output:

# yum list | grep gcc
This system is not registered with RHN.
RHN support will be disabled.
compat-gcc-34.i386 3.4.6-4 installed
compat-gcc-34-c++.i386 3.4.6-4 installed
compat-gcc-34-g77.i386 3.4.6-4 installed
compat-libgcc-296.i386 2.96-138 installed
gcc.i386 4.1.1-52.el5 installed
gcc-c++.i386 4.1.1-52.el5 installed
gcc-gfortran.i386 4.1.1-52.el5 installed
gcc-gnat.i386 4.1.1-52.el5 installed
gcc-java.i386 4.1.1-52.el5 installed
gcc-objc.i386 4.1.1-52.el5 installed
gcc-objc++.i386 4.1.1-52.el5 installed
libgcc.i386 4.1.2-42.el5 installed
libgcc.i386 4.1.1-52.el5 localinf




Any idea how can I fix this issue?

Thanks.
 
Old 10-30-2009, 08:55 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Hi,

Do you have the linux headers for your kernel installed? Looks to me that they're missing although I might be mistaking.

Kind regards,

Eric
 
Old 10-30-2009, 09:40 AM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
A lot of your packages seem to be a little dated. Current kernel is -164, gcc stuff is currently at 4.1.2-46, probably others as well.

You might also want to pull the source rpm from epel or rpmforge (1.4.13 is available from both) and look at the spec file to see what tweaks and patches were needed to get it to run on el5. This is always a great starting point.
 
Old 11-02-2009, 04:18 AM   #4
samengr
Member
 
Registered: Jan 2008
Posts: 59

Original Poster
Rep: Reputation: 15
Yeh I know system packages are not up to date but I have rest of the systems installed by the same media. My OS are not registered with RHN so I cant update them.

Please have a look the output

[root@dwweb06 ~]# rpm -qa | grep kernel
kernel-PAE-devel-2.6.18-92.el5
kernel-PAE-2.6.18-92.el5

******

# yum list | grep kernel
This system is not registered with RHN.
RHN support will be disabled.
kernel-PAE.i686 2.6.18-92.el5 installed
kernel-PAE-devel.i686 2.6.18-92.el5 installed
kernel.i686 2.6.18-8.el5 localinfo
kernel-PAE.i686 2.6.18-8.el5 localinfo
kernel-PAE-devel.i686 2.6.18-8.el5 localinfo
kernel-devel.i686 2.6.18-8.el5 localinfo
kernel-doc.noarch 2.6.18-8.el5 localinfo
kernel-headers.i386 2.6.18-8.el5 localinfo
kernel-xen.i686 2.6.18-8.el5 localinfo
kernel-xen-devel.i686 2.6.18-8.el5 localinfo


It seems to me kernel and kernel headers are not installed. As this system is in a production environment so my concern is at this time whould it be any issue if I install the kernel and kernel headers? Realistically I can't take risk with this system.

waiting for suggestions.

Many thanks.
 
Old 11-02-2009, 04:30 AM   #5
samengr
Member
 
Registered: Jan 2008
Posts: 59

Original Poster
Rep: Reputation: 15
Solved -

Thanks for your help guys. When I installed the kernel-headers after that nagios-plugins installed smoothly.

Thanks.
 
Old 11-02-2009, 11:04 AM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Why run RHEL without support and updates? Centos is RHEL with the logos removed(it is built using RHEL source rpms). It is free to install/update(unlike RHEL) and it is binary compatible with RHEL.
 
  


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 10:49 AM
error: C++ preprocessor "/lib/cpp" fails sanity check watcher69b Linux - Software 1 07-03-2008 05:09 AM
error: C++ preprocessor "/lib/cpp" fails sanity check i.you Linux - Software 3 03-06-2007 03:24 AM
error: C preprocessor "/lib/cpp" fails sanity check ankit4u1 Linux - Software 2 04-02-2006 01:24 PM
error: C preprocessor "/lib/cpp" fails sanity check Master Fox Linux - Software 0 10-14-2004 04:39 PM


All times are GMT -5. The time now is 06:28 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration