Compile Ntpsec with Refclock Support

Compile Ntpsec with Refclock Support

I'm trying to use ntpd for accurate time sync with a ublox gps module using this tutorial on Ubuntu 16.04.

However, I'm stuck setting up ntpd to listen to the shm driver. In the /var/log/ntp.log, I get the following error:

05-18T10:58:56 ntpd[6687]: newpeer: addr:127.127.28.0, name:(null), cast_flags:1, flags:1
05-18T10:58:56 ntpd[6687]: ntpd was compiled without refclock support.
05-18T10:58:56 ntpd[6687]: 127.127.28.0 local addr 127.0.0.1 -> <null>
05-18T10:58:56 ntpd[6687]: newpeer: addr:127.127.28.1, name:(null), cast_flags:1, flags:21
05-18T10:58:56 ntpd[6687]: ntpd was compiled without refclock support.
05-18T10:58:56 ntpd[6687]: 127.127.28.1 local addr 127.0.0.1 -> <null>
05-18T10:58:56 ntpd[6687]: Fudge commands not supported: built without refclocks

I am using the NTPsec fork of NTP with the following ntp.conf file:

pool pool.ntp.org iburst

driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log

restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1 mask 255.255.255.0
restrict -6 ::1

# GPS Serial data reference (NTP0)
server 127.127.28.0
fudge 127.127.28.0 refid GPS

# GPS PPS reference (NTP1)
server 127.127.28.1 prefer
fudge 127.127.28.1 refid PPS

It seems like I built NTP without refclock support. However, I don't find information how to include this.

All help is much appreciated!

2
Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.