[ntp:questions] 4.2.4p0 configure does not find clock_settime

Spoon devnull at localhost.com
Mon Mar 19 08:48:09 UTC 2007


Spoon wrote:

> I tried to build the latest production release (4.2.4p0) from
> http://www.ntp.org/downloads.html
> 
> (My system is Linux 2.6.18.6 with glibc 2.3.6)
> 
> ./configure does not find clock_settime and clock_gettime.
> 
> checking for clock_gettime... no
> checking for clock_settime... no
> checking if we'll use clock_settime or settimeofday or stime... 
> settimeofday()
> configure: WARNING: *** But clock_settime() would be better (if we had 
> it) ***
> 
> configure:42255: checking for clock_gettime
> configure:42312: gcc -o conftest -g -O2  -Wall -Wcast-qual 
> -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes 
> conftest.c  >&5
> conftest.c:170: warning: function declaration isn't a prototype
> conftest.c:177: warning: function declaration isn't a prototype
> conftest.c:185: warning: function declaration isn't a prototype
> /tmp/ccwVU0HL.o(.text+0x12): In function `main':
> /home/msigler/tempKEEP/attic/ntp-4.2.4p0/conftest.c:186: undefined 
> reference to `clock_gettime'
> /tmp/ccwVU0HL.o(.data+0x0): undefined reference to `clock_gettime'
> collect2: ld returned 1 exit status
> 
> configure:42255: checking for clock_settime
> configure:42312: gcc -o conftest -g -O2  -Wall -Wcast-qual 
> -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes 
> conftest.c  >&5
> conftest.c:170: warning: function declaration isn't a prototype
> conftest.c:177: warning: function declaration isn't a prototype
> conftest.c:185: warning: function declaration isn't a prototype
> /tmp/cceYmYrV.o(.text+0x12): In function `main':
> /home/msigler/tempKEEP/attic/ntp-4.2.4p0/conftest.c:186: undefined 
> reference to `clock_settime'
> /tmp/cceYmYrV.o(.data+0x0): undefined reference to `clock_settime'
> collect2: ld returned 1 exit status
> 
> On my system, the clock_* functions are provided by librt:
> http://sourceware.org/cgi-bin/cvsweb.cgi/libc/rt/?cvsroot=glibc
> 
> ./configure LDFLAGS='-lrt' seems to "fix" the problem.
> 
> I don't know if it's the correct solution, though.

Would anyone care to comment?

Should I take this discussion to the NTP mailing list?

Regards.




More information about the questions mailing list