[ntp:questions] Trying to compile ntp-dev-4.2.7p485-RC

Brent Gordon ntp_list at adobe-labs.com
Mon Dec 15 04:49:45 UTC 2014


Because I'm going to talk about three different files all with the same 
name (capability.h) I will identify them this way:
cap_main is located in /usr/src/linux-headers-3.13.0-43/include/linux
cap_uapi is located in /usr/src/linux-headers-3.13.0-43/include/uapi/linux
cap_orig is located in /usr/include/linux

I originally linked cap_orig to /usr/include/sys.

The capability.h you mention below is cap_orig.  It is nearly identical 
to cap_uapi.  The main difference is that cap_uapi has __user in each 
type definition.

cap_t is defined in cap_main.  cap_main includes cap_uapi. The problem 
is that the one in uapi doesn't work; I haven't tried the replacing 
cap_uapi with cap_orig yet.  Here is the first part of the error:
        CC     ntpd.o
      In file included from /usr/include/sys/capability.h:15:0,
                       from ntpd.c:108:
      /usr/include/uapi/linux/capability.h:43:10: error: expected 
‘=’,‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
       } __user *cap_user_header_t;
                ^
Note that the error occurs after the __user.

Other comments below.

On 12/14/2014 8:13 PM, William Unruh wrote:
> On 2014-12-15, Harlan Stenn <stenn at ntp.org> wrote:
>> Brent Gordon writes:
> ...
>>
>>> I had the same problem that David Taylor had with timepps.h being in
>>> /usr/include/sys instead of /usr/include.  In addition, capability.h was
>>> in /usr/include/linux instead of /usr/include/sys.  Both issues were
>>> fixed with soft links.
>>
>> If you need to link both copies of timepps.h then your distro has made
>> changes that are "not the same" as what everybody else is doing.

I only have one copy of timepps.h, which was linked from 
/usr/include/sys to /usr/include/, per Brian Inglis' suggestion in a 
different thread.

> Mageia 3 capability.h is also in /usr/include/linux and timepps.h does
> not exist. (not does a ppstools package)

I previously installed ppstools because the whole purpose of compiling 
NTP was to experiment with pps.

>
> ...
>>
>> The next trick will be for you to figure out why cap_t isn't being found
>> in the place others find it (sys/capability.h).

This is a brand new install of Ubuntu, so files are where the 
distribution put them.

> This is the only mention of cap_t in capability.h on my system:
>
> /* Note, cap_t, is defined by POSIX (draft) to be an "opaque" pointer to
>     a set of three capability sets.  The transposition of 3*the
>     following structure to such a composite is better handled in a
>     user library since the draft standard requires the use of
>     malloc/free etc.. */


More information about the questions mailing list