[ntp:questions] Re: Clock type 30 invalid?

Richard B. Gilbert rgilbert88 at comcast.net
Sat Jan 24 00:02:06 UTC 2004


Thanks Dave.

I grabbed those files this morning.  I  just put timepps.h in 
~/ntp4.2.0/include and just tried again using the source without the "&& 
HAVE_PPSAPI" at line 87.

The results: 


sunblok_# make
(bk version) >/dev/null 2>&1 && \
    cd . && \
            x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
    y=`cat version 2>/dev/null` || true && \
    case "$x" in ''|$y) ;; *) echo $x > version ;; esac
make  all-recursive
Making all in scripts
Making all in include
Making all in isc
Making all in ElectricFence
Making all in libntp
Making all in libparse
Making all in ntpd
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include     -g -O2 
-Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Ws\
  -c -o refclock_oncore.o `test -f 'refclock_oncore.c' || echo 
'./'`refclock_oncore.c; \
then mv -f ".deps/refclock_oncore.Tpo" ".deps/refclock_oncore.Po"; \
else rm -f ".deps/refclock_oncore.Tpo"; exit 1; \
fi
refclock_oncore.c: In function `oncore_get_timestamp':
refclock_oncore.c:1581: warning: assignment from incompatible pointer type
refclock_oncore.c:1586: warning: int format, u_long arg (arg 3)
refclock_oncore.c:1600: error: structure has no member named `tv_usec'
refclock_oncore.c:1600: error: structure has no member named `tv_usec'
refclock_oncore.c:1600: error: structure has no member named `tv_usec'
refclock_oncore.c:1456: warning: unused variable `i'
refclock_oncore.c: At top level:
refclock_oncore.c:306: warning: `oncore_ppsapi' used but never defined
*** Error code 1
make: Fatal error: Command failed for target `refclock_oncore.o'
Current working directory /export/home/rbg/ntp-4.2.0/ntpd
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/rbg/ntp-4.2.0
*** Error code 1
make: Fatal error: Command failed for target `all'


David L. Mills wrote:

>Richard,
>
>The timepps.h header file is required for PPS support. It consists of
>inline macros which can easily be adapted to other systems. Files for
>several systems are in ftp.udel.edu at pub/ntp/software/ppsclock.tar.Z
>or ppsclock_nano.tar.Z.
>
>Dave
>
>  
>
>>"Richard B. Gilbert" wrote:
>>
>>We don't have PPSAPI!!!!!
>>
>>sunblok_# grep PPSAPI config.h
>>/* #undef HAVE_PPSAPI */
>>
>>Shouldn't this mean that we don't need timepps.h?
>>
>>refclock_oncore.o is being built; AFAIK, without errors.  It's only
>>when we try to use it that we see a problem!
>>
>>Tonight I'll try:
>>make clean
>>./configure --enable-oncore
>>make >build.log
>>
>>and scan build.log for errors in building the driver (or any other
>>errors).
>>
>>Harlan Stenn wrote:
>>
>>    
>>
>>>In article <GKydnWUo-9g1zZLdRVn-iQ at comcast.com>,
>>>Richard B. Gilbert <rgilbert88 at comcast.net> wrote:
>>>
>>>
>>>      
>>>
>>>>Harlan,
>>>>
>>>>Where does it say that the the PPSAPI is required?
>>>>
>>>>
>>>>        
>>>>
>>>Line 87 of refclock_oncore.c .
>>>
>>>
>>>
>>>      
>>>
>>>>Looking at the code,  I see a lot of  #ifdef HAVE_PPSAPI
>>>>statements.
>>>>Don't these mean that IF you have PPSAPI you do A otherwise you do
>>>>B?
>>>>
>>>>
>>>>        
>>>>
>>>Yes.
>>>
>>>
>>>
>>>      
>>>
>>>>I also don't see where timepps.h is required.  It's that #ifdef
>>>>again;
>>>>if you have it, do A, else do B.
>>>>
>>>>
>>>>        
>>>>
>>>That's because  HAVE_PPSAPI does not tell us which header to use.
>>>If we
>>>HAVE_PPSAPI then we expect a timepps.h header and trust that one
>>>will
>>>be provided.
>>>
>>>If you remove the offending bit from the end of line 87 and the
>>>result
>>>works for you, please open an issue at http://bugzilla.ntp.org and I
>>>expect we'll get this fixed pronto.
>>>
>>>H
>>>
>>>
>>>      
>>>




More information about the questions mailing list