[Xymon] Adventures in compiling xymon-client for HP-UX
Greg Hubbard
glh.forums at gmail.com
Fri Mar 9 20:42:37 CET 2018
I recently had to implement Xymon clients on some HP-UX machines -- HP-UX
11.31 on Itanium2 (64 bit version).
According to Mr. Google, there are no prebuilt binaries out there.
It gets worse. HP-UX does not have GNU tools, and the C compiler that
comes with it is intended for recompiling the kernel and nothing else. HP
used to have their own payware ANSI C compiler, but I could not find it.
The HP-UX software porting centre does not provide depot installation for
gcc any more, but if you hunt around you can find an elderly release of gcc
that can be installed with swinstall. One of the "intelligence tests" on
that site is that it provides files that end in .gz but are not actually
compressed!
The thing that someone might want to look at is a small bug in the
compilation process. The configure script figures out that HP-UX does not
have the clock_gettime() function and says that this probably does not
matter. But it does! in lib/timing.c there is some conditional
compilation logic that will step around some code, but it gets executed for
HP-UX. This causes the compilation to fail with messages:
timing.c: In function 'gettimer':
timing.c:44: error: 'CLOCK_MONOTONIC' undeclared (first use in this
function)
timing.c:44: error: (Each undeclared identifier is reported only once
timing.c:44: error: for each function it appears in.)
timing.c: In function 'getntimer':
timing.c:66: error: 'CLOCK_MONOTONIC' undeclared (first use in this
function)
gmake[1]: *** [<builtin>: timing.o] Error 1
gmake: *** [build/Makefile.rules:89: lib-client] Error 2
The workaround is to edit lib/timing.c and comment out all of the code that
the conditional logic would have skipped.
There might not be anyone else on the planet who cares about this, but I
thought I would document this for historical purposes...
Greg Hubbard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20180309/0f36eb58/attachment.html>
More information about the Xymon
mailing list