[hobbit] undefined reference to `clock_gettime'
Scot Kreienkamp
SKreien at la-z-boy.com
Thu Apr 9 14:58:29 CEST 2009
Tim,
I have it on multiple systems, it's always worked for me.
Thanks,
Scot Kreienkamp
La-Z-Boy Inc.
-----Original Message-----
From: Tim Boyer [mailto:tim at denmantire.com]
Sent: Thursday, April 09, 2009 8:13 AM
To: hobbit at hswn.dk
Cc: 'Me at home'; Me at home
Subject: RE: [hobbit] undefined reference to `clock_gettime'
Answering my own question here. On all of my systems - and all of a
friend's systems, all running RHEL 5.3 - the
LIBRTDEF = -lrt
Makefile workaround does not work.
What DOES work is this:
[root at challenger xymon-4.2.3]# LIBRTDEF=-lrt
[root at challenger xymon-4.2.3]# export LIBRTDEF
then make, etc.
> 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
>
>
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk
More information about the Xymon
mailing list