4.2.4p0 configure does not find clock_settime - NTP

This is a discussion on 4.2.4p0 configure does not find clock_settime - NTP ; Hello everyone, 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 ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: 4.2.4p0 configure does not find clock_settime

  1. 4.2.4p0 configure does not find clock_settime

    Hello everyone,

    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...?cvsroot=glibc

    ../configure LDFLAGS='-lrt' seems to "fix" the problem.

    I don't know if it's the correct solution, though.

    Regards.

  2. Re: 4.2.4p0 configure does not find clock_settime

    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...?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.

  3. Re: 4.2.4p0 configure does not find clock_settime

    Your system has settimeofday() and that is all you need.

    H

  4. Re: 4.2.4p0 configure does not find clock_settime


  5. Re: 4.2.4p0 configure does not find clock_settime

    mike_t wrote:

    > https://ntp.isc.org/bugs/show_bug.cgi?id=475


    (You shouldn't have snipped so much of my original post.)

    Yes. It is the same issue.

    I have Linux 2.6.20.3-rt8 with glibc 2.3.6

    Setting LDFLAGS='-lrt' seems like an appropriate work-around
    in my situation.

    Thanks for the link.

    Regards.

  6. Re: 4.2.4p0 configure does not find clock_settime

    Harlan Stenn wrote:

    > Your system has settimeofday() and that is all you need.


    (Why did you snip so much of my original message?)

    If settimeofday() and clock_settime() are strictly equivalent,
    why make the build process complain?

    checking if we'll use clock_settime or settimeofday or stime...
    settimeofday()
    WARNING: *** But clock_settime() would be better (if we had it) ***

  7. Re: 4.2.4p0 configure does not find clock_settime

    >>> In article <45ffdc28$0$18135$426a74cc@news.free.fr>, Spoon writes:

    Spoon> Harlan Stenn wrote:
    >> Your system has settimeofday() and that is all you need.


    Spoon> (Why did you snip so much of my original message?)

    I took out:

    - what was already covered
    - you and I should be able to follow the thread as we are "in" it
    - anybody who comes later should be following the thread andn therefore also
    be "in" it.

    Spoon> If settimeofday() and clock_settime() are strictly equivalent, why
    Spoon> make the build process complain?

    Because they are not strictly equivalent.

    ntpd will work fine with settimeofday().

    If you check out the man pages for these functions it should be pretty
    clear.

    Spoon> checking if we'll use clock_settime or settimeofday or
    Spoon> stime... settimeofday() WARNING: *** But clock_settime() would be
    Spoon> better (if we had it) ***

    Ordinarily I would have snipped the above lines.

    H

+ Reply to Thread