[ntp:questions] Using Trimble TSIP under Linux

Martin Burnicki martin.burnicki at meinberg.de
Wed Oct 31 10:34:52 UTC 2012


David Taylor wrote:
> On 29/10/2012 15:09, John Hasler wrote:
>> David Taylor writes:
>>> if I try and compile with the flags for automatic start-up the make
>>> fails due a missing file: sys/capability.h.  Happens with both 4.2.6p5
>>> and 4.2.7p314.
>>
>> Install the linux-headers package appropriate to your kernel.
>
> Thanks, John.  Fixed with:
>
>    $ sudo apt-get install libcap-dev
>
> I do find it confusing that some headers are there, but not others.
> Perhaps part of making the Raspberry Pi a minimal system?  At least NTP
> is now coming up after a reboot, and with PPS!

Under Linux, header files are usually provided by separate packages 
since you don't need them unless you compile your own software.

For example, if you just want to use a pre-compiled ntpd from a binary 
package you usually need the openssl shared object (i.e. also only a 
binary) to be able to run ntpd.

However, if you build ntpd by your own the ./configure script checks if 
support for openssl is available at compile time, which means the 
openssl-devel package also needs to be installed. Otherwise ntpd would 
not find the openssl headers and thus would be built without crypto 
support using openssl.

Similar for PPS support, i.e. the ATOM driver. The configure script 
checks if the timepps.h header file is available in the compiler's 
include search path. If it is not then ntpd is built without ATOM 
support even if you explicitly enable ATOM support on the command line.

Safest way to find out what is actually supported, and what is not, is 
to check the config.h file after ./configure has been run.

If you build a binary package for a specific distribution then there's 
usually a .spec file for RPM packages for the specific distribution 
(don't know how the corresponding file and tools are called for Debian 
packages) providing hints which -devel packages are required to build a 
full-featured package of the application. For NTP under openSUSE Linux 
the spec file would include something like

   build-requires openssl-devel

The rpmbuild utility then checks if all devel-packages specified to be 
required for build have been installed, and complains if something is 
missing. This makes sure all required headers are available when 
./configure is run by rpmbuild, so that the binary is indeed built 
including all expected features.

BTW, if timepps.h is not available on your target system it can be 
fetched from the linuxpps web page:

git clone git://www.linuxpps.org/git/pps-tools pps-tools

Since the header file will bypass the package management the file should 
be copied to /usr/local/include:

cp pps-tools/timepps.h /usr/local/include/


Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany



More information about the questions mailing list