[LinuxPPS] ntp compiling problems

Luca Bertagnolio time at berta.com
Tue Sep 22 12:32:45 CEST 2009


After applying the latest 2.6.31 patchset provided by Rodolfo last week,
I now have a testbed where the basic PPS functions are working OK
using ldattach.

My current issues revolve around compiling ntp with PPS support, something
that previously I had no problem doing, but this time things look a little more
complicated.

First and foremost, I am running an i586-class machine with an updated Gentoo
install, with gcc-4.1.2 and glibc-2.10.1.

The Gentoo portage comes with ntp-4.2.4_p7 already patched for the nano and
adjtimex stuff, and I have added to a local portage copy the PPS patch that
I have used successfully in the past.

I have a script that helps me create and destroy the /usr/include
links, so the fresh
includes that come with the kernel are correctly linked into /usr/include.

Still, the ntp configuration phase reports:

checking timepps.h usability... no
checking timepps.h presence... no
checking for timepps.h... no
checking timex.h usability... no
checking timex.h presence... no
checking for timex.h... no

and the configure logs has these lines in it:

configure:26471: checking timepps.h usability
conftest.c:116:21: error: timepps.h: No such file or directory
| #include <timepps.h>
configure:26516: checking timepps.h presence
conftest.c:82:21: error: timepps.h: No such file or directory
| #include <timepps.h>
configure:26587: checking for timepps.h

So, I copied timepps.h from /usr/include/sys to /usr/include, and what
I got was this:

configure:26471: checking timepps.h usability
                 from /usr/include/timepps.h:24,
                 from /usr/include/timepps.h:26,
In file included from /usr/include/timepps.h:27,
                 from /usr/include/timepps.h:27,
In file included from /usr/include/timepps.h:27,
In file included from /usr/include/timepps.h:28,
/usr/include/linux/pps.h:54: error: expected specifier-qualifier-list
before '__s64'
/usr/include/linux/pps.h:61: error: expected specifier-qualifier-list
before '__u32'
In file included from /usr/include/linux/pps.h:117,
                 from /usr/include/timepps.h:28,
/usr/include/timepps.h: In function 'time_pps_create':
/usr/include/timepps.h:91: error: 'EINVAL' undeclared (first use in
this function)
/usr/include/timepps.h:91: error: (Each undeclared identifier is
reported only once
/usr/include/timepps.h:91: error: for each function it appears in.)
/usr/include/timepps.h:98: error: expected expression before 'struct'
/usr/include/timepps.h:100: error: 'EOPNOTSUPP' undeclared (first use
in this function)
/usr/include/timepps.h: In function 'time_pps_getparams':
/usr/include/timepps.h:123: error: expected expression before 'struct'
/usr/include/timepps.h:127: error: 'struct pps_ktime' has no member named 'sec'
/usr/include/timepps.h:128: error: 'struct pps_ktime' has no member named 'nsec'
/usr/include/timepps.h:129: error: 'struct pps_ktime' has no member named 'sec'
/usr/include/timepps.h:130: error: 'struct pps_ktime' has no member named 'nsec'
/usr/include/timepps.h: In function 'time_pps_setparams':
/usr/include/timepps.h:142: error: 'struct pps_ktime' has no member named 'sec'
/usr/include/timepps.h:143: error: 'struct pps_ktime' has no member named 'nsec'
/usr/include/timepps.h:144: error: 'struct pps_ktime' has no member named 'sec'
/usr/include/timepps.h:145: error: 'struct pps_ktime' has no member named 'nsec'
/usr/include/timepps.h:147: error: expected expression before 'struct'
/usr/include/timepps.h: In function 'time_pps_getcap':
/usr/include/timepps.h:153: error: expected expression before 'int'
/usr/include/timepps.h: In function 'time_pps_fetch':
/usr/include/timepps.h:165: error: 'EINVAL' undeclared (first use in
this function)
/usr/include/timepps.h:170: error: 'struct pps_ktime' has no member named 'sec'
/usr/include/timepps.h:171: error: 'struct pps_ktime' has no member named 'nsec'
/usr/include/timepps.h:172: error: 'struct pps_ktime' has no member
named 'flags'
/usr/include/timepps.h:174: error: 'struct pps_ktime' has no member
named 'flags'
/usr/include/timepps.h:176: error: expected expression before 'struct'
/usr/include/timepps.h:178: error: 'struct pps_kinfo' has no member
named 'assert_sequence'
/usr/include/timepps.h:179: error: 'struct pps_kinfo' has no member
named 'clear_sequence'
/usr/include/timepps.h:180: error: 'struct pps_kinfo' has no member
named 'assert_tu'
/usr/include/timepps.h:181: error: 'struct pps_kinfo' has no member
named 'assert_tu'
/usr/include/timepps.h:182: error: 'struct pps_kinfo' has no member
named 'clear_tu'
/usr/include/timepps.h:183: error: 'struct pps_kinfo' has no member
named 'clear_tu'
/usr/include/timepps.h:184: error: 'struct pps_kinfo' has no member
named 'current_mode'
/usr/include/timepps.h: In function 'time_pps_kcbind':
/usr/include/timepps.h:194: error: 'EOPNOTSUPP' undeclared (first use
in this function)
| #include <timepps.h>
configure:26516: checking timepps.h presence
                 from /usr/include/timepps.h:24,
                 from /usr/include/timepps.h:26,
In file included from /usr/include/timepps.h:27,
                 from /usr/include/timepps.h:27,
In file included from /usr/include/linux/pps.h:117,
                 from /usr/include/timepps.h:28,
| #include <timepps.h>
configure:26587: checking for timepps.h

Can anyone help me shed any light here?  I do confirm that in
/usr/include I have:

lrwxrwxrwx  1 root root     46 Sep 22 11:58 linux ->
/lib/modules/2.6.31-gentoo/build/include/linux
lrwxrwxrwx  1 root root     52 Sep 22 11:58 asm-generic ->
/lib/modules/2.6.31-gentoo/build/include/asm-generic
lrwxrwxrwx  1 root root     44 Sep 22 11:58 asm ->
/lib/modules/2.6.31-gentoo/build/include/asm

Many thanks,

Luca



More information about the LinuxPPS mailing list