success compiling NSCA on AIX 5.3 with gcc

Vonnahme, Nathan nathan.vonnahme at bannerhealth.com
Thu Jul 6 20:12:37 CEST 2006


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/products/aixos/linux/download.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' undeclared (first use in this function)
netutils.c:88: error: `ECONNREFUSED' undeclared (first use in this
function)
netutils.c:91: error: `ETIMEDOUT' undeclared (first use in this
function)
netutils.c:94: error: `ENETUNREACH' undeclared (first use in this
function)
netutils.c: At top level:
netutils.c:111: warning: `struct in_addr' declared inside parameter list
netutils.c:111: error: conflicting types for `my_inet_aton'
../include/netutils.h:37: error: previous declaration of `my_inet_aton'
netutils.c: In function `my_inet_aton':
netutils.c:204: error: dereferencing pointer to incomplete type
netutils.c: In function `recvall':
netutils.c:253: error: `errno' undeclared (first use in this function)
netutils.c:253: error: `EAGAIN' undeclared (first use in this function)
utils.c: In function `encrypt_init':
utils.c:94: error: `LOG_ERR' undeclared (first use in this function)
utils.c:94: error: (Each undeclared identifier is reported only once
utils.c:94: error: for each function it appears in.)
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.






Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list