[ntp:questions] ppstime.h missing on Debian?

Brandon Uttech brandon.uttech at ioactive.com
Wed Nov 24 02:07:08 UTC 2004


Group,

For the past several days, I've been trouble shooting my first attempt 
at building a pps enabled ntp server. After a ton of googling, reading 
documentation, etc, I still don't have a functional system. However, I 
do believe I've identified a problem. ppstime.h is missing! Before 
moving forward, here is relevant info:

OS: Debian 3.0r3
Kernel: 2.4.21
Radio Clock: Ultra Link 325
NTP version: 4.2.0
PPSkit version: 2.1.4 (includes patch for kernel 2.4.21)

I applied the PPSkit patch (patch-2.4.21) to the 2.4.21 kernel source, 
enabled the required PPS options (NTP kernel support, NTP PPS support, 
and NTP PPS support on serial port), and compiled/installed the kernel 
with no problems (2.4.21-nano). Before attempting to install ntp, I also 
followed the rest of the steps given in INSTALL of the PPSkit.

I then configured ntp. To double check the configuration process, I 
reviewed config.log, looking for vital files that may have been missing. 
Sure enough, I noticed that ppstime.h was not found. I thought that 
maybe ppstime.h may just be in a different directory than what the 
configuration script was expecting, but ppstime.h is not present 
anywhere on my system. From the documentation I've read, this file is 
vital to getting the PPS API working. It is also supposed to be included 
in Linux and FreeBSD distros.

Output of config.log |grep pps:
configure:7683: checking timepps.h usability
configure:7719: checking timepps.h presence
configure:7791: checking for timepps.h
configure:9668: checking sys/ppsclock.h usability
configure:9704: checking sys/ppsclock.h presence
configure:9776: checking for sys/ppsclock.h
configure:9813: checking sys/ppstime.h usability
configure:9900:25: sys/ppstime.h: No such file or directory
| #include <sys/ppstime.h>
configure:9849: checking sys/ppstime.h presence
configure:9902:25: sys/ppstime.h: No such file or directory
| #include <sys/ppstime.h>
configure:9921: checking for sys/ppstime.h
configure:10836: checking sys/timepps.h usability
configure:10872: checking sys/timepps.h presence
configure:10944: checking for sys/timepps.h
configure:13065: checking for struct ppsclockev
configure:19329: checking for the ppsclock streams module
ac_cv_header_sys_ppsclock_h=yes
ac_cv_header_sys_ppstime_h=no
ac_cv_header_sys_timepps_h=yes
ac_cv_header_timepps_h=yes
ac_cv_struct_ppsclockev=yes
ac_cv_var_ppsclock=yes

Just for kicks I tried installing ntp anyway to see what would happen. 
Nothing good. ntptime yields the following, error ridden, expected output:

ntp_gettime() returns code 5 (ERROR)
   time c54b42dd.ad529fa0  Sun, Nov 21 2004  8:37:49.677, (.677042912),
   maximum error 2000000 us, estimated error 16 us, TAI offset 1073835988
ntp_adjtime() returns code 5 (ERROR)
   modes 0x0 (),
   offset 0.000 us, frequency 0.000 ppm, interval 4 s,
   maximum error 2000000 us, estimated error 16 us,
   status 0x2041 (PLL,UNSYNC,NANO),
   time constant 0, precision 55.136 us, tolerance 496 ppm,
   pps frequency 0.000 ppm, stability 0.000 ppm, jitter 0.000 us,
   intervals 0, jitter exceeded 0, stability exceeded 0, errors 0.

Did I miss an early vital step? Should ppstime.h have been present 
before I applied the PPSkit kernel patch? Please let me know if you 
require other info. Thanks for the help!

Brandon



More information about the questions mailing list