Problems when configuring and compiling ndoutils on CentOs 6

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
bkfrvn
Posts: 10
Joined: Thu Jan 16, 2014 2:20 pm

Problems when configuring and compiling ndoutils on CentOs 6

Post by bkfrvn »

Hi all,

I had problems when configuring and compiling ndoutils on CentOs 6.3 64 bit (CactiEZ 0.7).
I tried with ndotils verions 1.47b and 1.52, 1.52, the problems was the same.

The config.log shows errors:
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
conftest.c:74:20: error: socket.h: No such file or directory
conftest.c:41:20: error: socket.h: No such file or directory
conftest.c:98: error: expected expression before ')' token
conftest.c:98: error: expected expression before ')' token
conftest.c:98: error: expected expression before ')' token
conftest.c:68: error: void value not ignored as it ought to be
conftest.c:103: error: expected expression before ')' token
conftest.c:103: error: expected expression before ')' token
conftest.c:103: error: expected expression before ')' token
| /* Override any GCC internal prototype to avoid an error.
while the compiling with make produced errors too. Please find the attachment file the config.log and compiling log.

Can any one help me? Thank you very much in advance!
Attachments
make.log
(10.09 KiB) Downloaded 260 times
config.log
(52.49 KiB) Downloaded 280 times
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Problems when configuring and compiling ndoutils on Cent

Post by sreinhardt »

From your logs, it looks like you are missing glibc-headers, and specifically socket.h, Let's check a few things and verify what might be happening. That conftest.c is specifically used in configure to verify whether everything is there, that is needed. I'm not entirely sure how you got through a proper sane make without socket.h though.

Code: Select all

yum list installed | grep glibc
yum list installed | grep gcc

yum provides */socket.h | grep -i installed
find / -name socket.h
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
bkfrvn
Posts: 10
Joined: Thu Jan 16, 2014 2:20 pm

Re: Problems when configuring and compiling ndoutils on Cent

Post by bkfrvn »

Dear Spenser,

Thank you very much for your answer!

It seems that both glibc-headers and socket.h have been installed. Please find the results of the commands you mentioned:

[root@cacti ~]# yum list installed | grep glibc
glibc.x86_64 2.12-1.132.el6 @base
glibc-common.x86_64 2.12-1.132.el6 @base
glibc-devel.x86_64 2.12-1.132.el6 @base
glibc-headers.x86_64 2.12-1.132.el6 @base

[root@cacti ~]# yum list installed | grep gcc
gcc.x86_64 4.4.7-4.el6 @base
gcc-c++.x86_64 4.4.7-4.el6 @base
libgcc.x86_64 4.4.7-4.el6 @base

[root@cacti ~]# yum provides */socket.h | grep -i installed
Repo : installed
Repo : installed

[root@cacti ~]# find / -name socket.h
/usr/include/sys/socket.h
/usr/include/bits/socket.h
/usr/include/asm/socket.h
/usr/include/linux/socket.h
/usr/include/asm-generic/socket.h
/tmp/nagios-plugins-1.4.16/gl/sys/socket.h

I tried to include the socket.h to conftest.c. However, I could not find conftest.c, i.e. find / -name conftest.c gave no answer.

Bests!
Giang.
Last edited by slansing on Mon Jan 20, 2014 3:25 pm, edited 1 time in total.
Reason: Bump post was deleted, do not double post in that fashion, it will only place you lower on the list of "to be replied to."
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problems when configuring and compiling ndoutils on Cent

Post by slansing »

And just to be clear... this is not actually a Nagios server..? You are doing this on a cacti server?
bkfrvn
Posts: 10
Joined: Thu Jan 16, 2014 2:20 pm

Re: Problems when configuring and compiling ndoutils on Cent

Post by bkfrvn »

I compiled ndoutils on a server which both cacti and nagios is installed.
The

Code: Select all

#make
command shown following error:

In file included from db.c:17:
../include/ndo2db.h:58: error: expected specifier-qualifier-list before ‘MYSQL’

Please refer to following topic for more details:
http://support.nagios.com/forum/viewtop ... 224#p86224
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problems when configuring and compiling ndoutils on Cent

Post by slansing »

Alright, we are going to back up and try this from the start, first, what version of Nagios are you trying to install NDOutils on? We need this so we can make sure to compile the proper one.
bkfrvn
Posts: 10
Joined: Thu Jan 16, 2014 2:20 pm

Re: Problems when configuring and compiling ndoutils on Cent

Post by bkfrvn »

I compiled Nagios version 3.5.0 . Thank you very much!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Problems when configuring and compiling ndoutils on Cent

Post by tmcdonald »

bkfrvn wrote:Thank you very much!
Is this a "Thank you very much, it worked!" or a "Thank you very much for helping so far!" sort of thank you?
Former Nagios employee
bkfrvn
Posts: 10
Joined: Thu Jan 16, 2014 2:20 pm

Re: Problems when configuring and compiling ndoutils on Cent

Post by bkfrvn »

It is a "Thank you very much for helping so far!" :)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problems when configuring and compiling ndoutils on Cent

Post by slansing »

What version of NDO are you trying to compile, and on what version of Nagios Core? Also, what version of mysql are you running on the system?
Locked