Xymon Mailing List Archive search

Xymon 4.2.3 Compile Issues HP-UX 11.31 CLOCK_MONOTONIC

4 messages in this thread

list John Browning · Thu, 23 Apr 2009 09:23:07 -0400 ·
Hi,
I'm compiling a 4.2.3 client binary for HP-UX 11.31 and am receiving the following error:

mefunc-client.o timefunc.c
timefunc.c: In function 'gettimer':
timefunc.c:55: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
timefunc.c:55: error: (Each undeclared identifier is reported only once
timefunc.c:55: error: for each function it appears in.)
timefunc.c: In function 'getntimer':
timefunc.c:67: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
gmake[1]: *** [timefunc-client.o] Error 1
gmake[1]: Leaving directory `/root/xymon-4.2.3/lib'
gmake: *** [lib-client] Error 2

After some research I see numerous threads and posts on a slew of sights stating CLOCK_MONOTONIC is not supported in HP-UX nor MAC OSX, both of which I will need to compile binaries for.

Any help or tips would be greatly appreciated.
Thanks!
John Browning
UNIX Systems Administrator
R&D DataCenter
www.sas.com<http://www.sas.com/>;

SAS(r) ... THE POWER TO KNOW(r)
list Henrik Størner · Thu, 23 Apr 2009 13:32:18 +0000 (UTC) ·
In <user-3a8ea80be762@xymon.invalid> John Browning <user-45e7970967c7@xymon.invalid> writes:
I'm compiling a 4.2.3 client binary for HP-UX 11.31 and am receiving the fo=
llowing error:
quoted from John Browning
mefunc-client.o timefunc.c
timefunc.c: In function 'gettimer':
timefunc.c:55: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
I believe this has been fixed in the update for the client configuration
script which you can find at
http://hobbitmon.svn.sourceforge.net/viewvc/hobbitmon/branches/4.2.4/configure.client?revision=6162

Download this file and copy it on top of the "configure.client" file, then 
run "make distclean" and start over with the configure-make-make install
cycle. It should hopefully work.


Regards,
Henrik
list John Browning · Thu, 23 Apr 2009 09:54:01 -0400 ·
Henrik,
Thank you very much for taking the time to reply.
I'm afraid I still get the error using the new configure.client.

I did notice the clock_gettime() output in the configure script this time around though:
Checking for clock_gettime() requiring librt ...
clock_gettime() not present, but this should be OK


Here is the error output after the gmake -s:

loadhosts.c: In function 'bbh_item_id':
loadhosts.c:523: warning: return discards qualifiers from pointer target type
sendmsg.c: In function 'sendtobbd':
sendmsg.c:324: warning: passing argument 5 of 'getsockopt' from incompatible pointer type
quoted from John Browning
timefunc.c: In function 'gettimer':
timefunc.c:55: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
timefunc.c:55: error: (Each undeclared identifier is reported only once
timefunc.c:55: error: for each function it appears in.)
timefunc.c: In function 'getntimer':
timefunc.c:67: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
gmake[1]: *** [timefunc-client.o] Error 1

gmake: *** [lib-client] Error 2


Also, to be safe I wiped away the entire build directory and untarred a fresh xymon-4.2.3.tar file, so it definitely was a clean slate.

I will see if I can come up with a workaround and I'll post it if I find one.

Thanks again!
quoted from Henrik Størner
-----Original Message-----
From: Henrik Størner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Thursday, April 23, 2009 9:32 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Xymon 4.2.3 Compile Issues HP-UX 11.31 CLOCK_MONOTONIC

In <user-3a8ea80be762@xymon.invalid> John Browning <user-45e7970967c7@xymon.invalid> writes:
I'm compiling a 4.2.3 client binary for HP-UX 11.31 and am receiving the fo=
llowing error:
mefunc-client.o timefunc.c
timefunc.c: In function 'gettimer':
timefunc.c:55: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
I believe this has been fixed in the update for the client configuration
script which you can find at
http://hobbitmon.svn.sourceforge.net/viewvc/hobbitmon/branches/4.2.4/configure.client?revision=6162

Download this file and copy it on top of the "configure.client" file, then 
run "make distclean" and start over with the configure-make-make install
cycle. It should hopefully work.


Regards,
Henrik
list John Browning · Thu, 23 Apr 2009 10:22:22 -0400 ·
I was able to get around the issue for now by temporarily by making the following changes to the code:

In lib/timefunc.c:

In function gettimer(void):
res = clock_gettime(CLOCK_MONOTONIC, &t); to res = clock_gettime(CLOCK_REALTIME, &t);

in function getntimer(struct timespec *tp):
res = clock_gettime(CLOCK_MONOTONIC, tp); to res = clock_gettime(CLOCK_REALTIME, tp);

In build/test-clockgettime-librt.c:
(void)clock_gettime(CLOCK_MONOTONIC, &ts); to (void)clock_gettime(CLOCK_REALTIME, &ts);

This has worked for now even though it is simply reverting to CLOCK_REALTIME which HP-UX 11.31 supports.
quoted from John Browning

-----Original Message-----
From: Henrik Størner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Thursday, April 23, 2009 9:32 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Xymon 4.2.3 Compile Issues HP-UX 11.31 CLOCK_MONOTONIC

In <user-3a8ea80be762@xymon.invalid> John Browning <user-45e7970967c7@xymon.invalid> writes:
I'm compiling a 4.2.3 client binary for HP-UX 11.31 and am receiving the fo=
llowing error:
mefunc-client.o timefunc.c
timefunc.c: In function 'gettimer':
timefunc.c:55: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
I believe this has been fixed in the update for the client configuration
script which you can find at
http://hobbitmon.svn.sourceforge.net/viewvc/hobbitmon/branches/4.2.4/configure.client?revision=6162

Download this file and copy it on top of the "configure.client" file, then 
run "make distclean" and start over with the configure-make-make install
cycle. It should hopefully work.


Regards,
Henrik