Skip to content

Errors building with leap smearing

$  LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib" CPPFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/include" ./waf -c no configure --refclock=all --enable-leap-smear clean build 
[...]
[110/139] Compiling ntpd/ntp_signd.c
../../ntpd/ntp_proto.c:2301:5: warning: incompatible pointer to integer conversion passing 'l_fp *' (aka 'unsigned long long *') to parameter of type 'l_fp' (aka 'unsigned long long'); dereference with * [-Wint-conversion]
                                lfptoa(&leap_smear.offset, 8)
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/ntp_fp.h:200:34: note: expanded from macro 'lfptoa'
#define lfptoa(fpv, ndec)       mfptoa((fpv), (ndec))
                                       ^
../../include/ntpd.h:44:12: note: expanded from macro 'DPRINTF'
                        mprintf arg;                    \
                                ^~~
../../include/ntp_fp.h:180:28: note: passing argument to parameter here
extern  char *  mfptoa          (l_fp, short);
                                     ^
1 warning generated.

[111/139] Compiling ntpd/ntp_timer.c
[112/139] Compiling ntpd/ntpd.c
../../ntpd/ntp_timer.c:482:3: warning: implicit declaration of function 'DTOLFP' is invalid in C99 [-Wimplicit-function-declaration]
                DTOLFP(leap_smear.doffset, &leap_smear.offset);
                ^
1 warning generated.

[...]
[139/139] Linking build/main/ntpd/ntpd
ld: warning: directory not found for option '-L/opt/local/lib'
ld: warning: directory not found for option '-L/opt/local/lib'
Undefined symbols for architecture x86_64:
  "_DTOLFP", referenced from:
      _check_leapsec in ntp_timer.c.19.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Waf: Leaving directory `/Users/selsky/src/gitlab.com/ntpsec/build/main'
Build failed
 -> task in 'ntpd' failed with exit status 1 (run with -v to display more information)