[Nagios-devel] success compiling NSCA on AIX 5.3 with gcc

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.
Locked
Guest

[Nagios-devel] success compiling NSCA on AIX 5.3 with gcc

Post by Guest »


It's been way more complicated and weird than I expected, but I got the
send_nsca client to compile on AIX 5.3

First I had to get the prereqs right:

- installed libmcrypt from source (http://mcrypt.sourceforge.net/)
I had to hack the Makefile to remove '-1.7' in a few places for
some reason
- installed Berkley DB (db-3.3.11-4.aix5.1.ppc.rpm) from IBM's Toolbox
for Linux apps
(http://www-03.ibm.com/servers/aix/produ ... nload.html)
- installed tcp_wrappers installp package from
http://www.bullfreeware.com/

When I ran ./configure on AIX, the 'make' broke (see output below). So
then, and this is the spooky part, I ran ./configure on a Linux machine
(RHEL4), and 'make send_nsca' then worked on my AIX machine:

$ make send_nsca
cd ./src/; make send_nsca ; cd ..
gcc -g -O2 -DHAVE_CONFIG_H -o send_nsca send_nsca.c netutils.c
utils.c -lnsl

The binary appears to work fine.

I am ignorant about make/configure stuff, but I think the configure
script is based on really old AIXes and when it sees "aix" it thinks it
should complicate things a lot. But AIX 5L is (deliberately) very
linux-like, especially when it comes to running gcc. One of the goals
for AIX 5L was supposed to be "100% source compatibility with Linux"

Maybe someone who knows more about automake/autoconf could fix the
configure script? I'm happy to test...


-n


--
nathan vonnahme, system engineer at fairbanks memorial hospital
1650 cowles street, fairbanks alaska 99701. 907-458-5464





$ make send_nsca
cd ./src/; make send_nsca ; cd ..
gcc -g -O2 -DHAVE_LIBMCRYPT -I/usr/local/include -DHAVE_CONFIG_H
-o send_nsca send_nsca.c netutils.c utils.c -L/usr/local/lib -lmcrypt
-lnsl
In file included from send_nsca.c:20:
../include/netutils.h:37: warning: `struct in_addr' declared inside
parameter list
../include/netutils.h:37: warning: its scope is only this definition or
declaration, which is probably not what you want
send_nsca.c:25: error: syntax error at '@' token
send_nsca.c:25: error: syntax error at '@' token
send_nsca.c:25: error: `nsca_port' undeclared here (not in a function)
send_nsca.c: In function `main':
send_nsca.c:102: error: syntax error at '@' token
send_nsca.c:102: error: syntax error at '@' token
send_nsca.c:102: error: `nsca_port' undeclared (first use in this
function)
send_nsca.c:102: error: (Each undeclared identifier is reported only
once
send_nsca.c:102: error: for each function it appears in.)
send_nsca.c:200: warning: assignment makes pointer from integer without
a cast
send_nsca.c:205: warning: assignment makes pointer from integer without
a cast
send_nsca.c:210: warning: assignment makes pointer from integer without
a cast
send_nsca.c:215: warning: assignment makes pointer from integer without
a cast
send_nsca.c: In function `read_config_file':
send_nsca.c:495: warning: assignment makes pointer from integer without
a cast
send_nsca.c:504: warning: assignment makes pointer from integer without
a cast
In file included from netutils.c:33:
../include/netutils.h:37: warning: `struct in_addr' declared inside
parameter list
../include/netutils.h:37: warning: its scope is only this definition or
declaration, which is probably not what you want
netutils.c: In function `my_connect':
netutils.c:49: error: storage size of `servaddr' isn't known
netutils.c:55: error: `AF_INET' undeclared (first use in this function)
netutils.c:55: error: (Each undeclared identifier is reported only once
netutils.c:55: error: for each function it appears in.)
netutils.c:62: warning: assignment makes pointer from integer without a
cast
netutils.c:68: error: dereferencing pointer to incomplete type
netutils.c:68: error: dereferencing pointer to incomplete type
netutils.c:72: warning: assignment makes pointer from integer without a
cast
netutils.c:78: error: `PF_INET' undeclared (first use in this function)
netutils.c:78: error: `SOCK_DGRAM' undeclared (first use in this
function)
netutils.c:78: error: `SOCK_STREAM' undeclared (first use in this
function)
netutils.c:78: error: dereferencing pointer to incomplete type
netutils.c:87: error: `errno' undecl

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked