Compilation problem with Nagios Core 3.3.1 on Solaris 10

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
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Compilation problem with Nagios Core 3.3.1 on Solaris 10

Post by crfriend »

I've just finished a fight to get Nagios Core 3.3.1 to even compile properly on a Solaris 10 Update 8 with gcc version 3.4.3 and perl version 5.8.5.

Builds work properly if the embedded perl interpreter is not used, however if it is, the build errors out on compiling "base/checks.c" and "base/utils.c" with:

Code: Select all

checks.c: In function `run_async_service_check':
checks.c:475: warning: implicit declaration of function `asprintf'
checks.c:711: error: `n_a' undeclared (first use in this function)
checks.c:711: error: (Each undeclared identifier is reported only once
checks.c:711: error: for each function it appears in.)
checks.c:711: warning: left-hand operand of comma expression has no effect
*** Error code 1
make: Fatal error: Command failed for target `checks.o'
Looking at line 711 doesn't yield any smoking guns:

Code: Select all

perl_plugin_output = POPpx ;
, however after doing a "diff" of version 3.2.2 and 3.3.1 yielded a missing

Code: Select all

STRLEN n_a ;
at line 348 in checks.c and in utils.c at line 308. Adding that declaration to both files at least gets the build to finish. The CGIs compiled without anything more serious than warnings.

The thing that bothers me is that it builds "out of the box" on Linux which smacks of non-deterministic behaviour. At least this anomaly should get documented somewhere.

Cheers!
Locked