undefined reference to `clock_gettime'

Tim Boyer tim at denmantire.com
Tue Mar 24 16:16:21 CET 2009


I'm trying to install 4.2.3 to a RHEL5.3 system.  make returns the
following:

../lib/hobbitclient.a(timefunc-client.o): In function `gettimer':
/usr/src/xymon-4.2.3/lib/timefunc.c:55: undefined reference to
`clock_gettime'
../lib/hobbitclient.a(timefunc-client.o): In function `getntimer':
/usr/src/xymon-4.2.3/lib/timefunc.c:67: undefined reference to
`clock_gettime'
collect2: ld returned 1 exit status

I've seen a couple of posts that suggest I add

LIBRTDEF = -lrt

to the Makefile.  I've done that, and it gets worse...

client_config.c: In function 'dump_client_config':
client_config.c:1112: warning: format '%lld' expects type 'long long int',
but argument 2 has type 'off_t'
client_config.c:1114: warning: format '%lld' expects type 'long long int',
but argument 2 has type 'off_t'
client_config.c:1116: warning: format '%lld' expects type 'long long int',
but argument 2 has type 'off_t'
client_config.c: In function 'check_file':
client_config.c:1596: warning: format '%lld' expects type 'long long int',
but argument 3 has type 'off_t'
client_config.c:1596: warning: format '%lld' expects type 'long long int',
but argument 4 has type 'off_t'
client_config.c:1609: warning: format '%lld' expects type 'long long int',
but argument 3 has type 'off_t'
client_config.c:1609: warning: format '%lld' expects type 'long long int',
but argument 4 has type 'off_t'
client_config.c:1622: warning: format '%lld' expects type 'long long int',
but argument 3 has type 'off_t'
client_config.c:1622: warning: format '%lld' expects type 'long long int',
but argument 4 has type 'off_t'
gcc -o ../client/hobbitd_client -Wl,--rpath=/usr/lib64 hobbitd_client.o
hobbitd_worker.o hobbitd_buffer.o client_config.o ../lib/hobbitclient.a
-L/usr/lib64 -lpcre  
../lib/hobbitclient.a(timefunc-client.o): In function `gettimer':
/usr/src/xymon-4.2.3/lib/timefunc.c:55: undefined reference to
`clock_gettime'
../lib/hobbitclient.a(timefunc-client.o): In function `getntimer':
/usr/src/xymon-4.2.3/lib/timefunc.c:67: undefined reference to
`clock_gettime'
collect2: ld returned 1 exit status
make[1]: *** [../client/hobbitd_client] Error 1

Pointers in the right direction appreciated.

-- 
Tim Boyer
Denman Tire Corporation

 




More information about the Xymon mailing list