Xymon Mailing List Archive search

undefined reference to `clock_gettime'

5 messages in this thread

list Tim Boyer · Tue, 24 Mar 2009 11:16:21 -0400 ·
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
list Tim Boyer · Thu, 9 Apr 2009 08:13:10 -0400 ·
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.
quoted from Tim Boyer
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

 
list Scot Kreienkamp · Thu, 9 Apr 2009 08:58:29 -0400 ·
Tim,

I have it on multiple systems, it's always worked for me.

Thanks,
 Scot Kreienkamp
La-Z-Boy Inc.
quoted from Tim Boyer

-----Original Message-----
From: Tim Boyer [mailto:user-390665de94b9@xymon.invalid] Sent: Thursday, April 09, 2009 8:13 AM
To: user-ae9b8668bcde@xymon.invalid
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

 
list Tim Boyer · Thu, 9 Apr 2009 10:43:39 -0400 ·
Scott -

We think it _may_ be a RHEL 5.x system updated to RHEL5.3 issue.  We've seen
three clean 5.3 system work, and more than a dozen upgrades fail.

-- tim -- 
quoted from Scot Kreienkamp
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:user-390665de94b9@xymon.invalid] Sent: Thursday, April 09, 2009 8:13 AM
To: user-ae9b8668bcde@xymon.invalid
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
list Scot Kreienkamp · Thu, 9 Apr 2009 10:51:38 -0400 ·
I think my case confirms that.  All mine are clean installs.  So far,
anyway.
quoted from Tim Boyer

Thanks,
 Scot Kreienkamp
La-Z-Boy Inc.

-----Original Message-----
From: Tim Boyer [mailto:user-390665de94b9@xymon.invalid] Sent: Thursday, April 09, 2009 10:44 AM
To: user-ae9b8668bcde@xymon.invalid
Cc: Me at home
Subject: RE: [hobbit] undefined reference to `clock_gettime'

Scott -

We think it _may_ be a RHEL 5.x system updated to RHEL5.3 issue.  We've
seen
three clean 5.3 system work, and more than a dozen upgrades fail.

-- tim -- 
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:user-390665de94b9@xymon.invalid] Sent: Thursday, April 09, 2009 8:13 AM
To: user-ae9b8668bcde@xymon.invalid
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