Build fails on osx with python2
$ LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS="-I/usr/local/opt/openssl/include" python ./waf clean distclean configure --refclock=all --enable-crypto build
--- cleaning host ---
--- cleaning main ---
'clean' finished successfully (0.143s)
'distclean' finished successfully (0.006s)
Setting top to : /Users/selsky/src/gitlab.com/ntpsec
Setting out to : /Users/selsky/src/gitlab.com/ntpsec/build
--- Configuring host ---
Checking for 'clang' (C compiler) : /usr/bin/clang
Checking for program 'bison' : /usr/bin/bison
Checking compiler : yes
Compiler found : clang
Checking for program 'awk' : /usr/bin/awk
Checking for program 'sh' : /bin/sh
Checking for program 'asciidoc' : /usr/local/bin/asciidoc
Checking for program 'a2x' : /usr/local/bin/a2x
Checking for program 'xsltproc' : /usr/bin/xsltproc
Checking for program 'git' : /usr/local/bin/git
DEVEL: Getting revision : d908c9ab11e9f1252f97c35f91327a4f4befa433
Building version : 0.9.5-d908c9a
--- Configuring main ---
Checking build target : osx
Checking for type uint64_t : yes
Checking for type struct if_laddrconf : no
Checking for type struct if_laddrreq : no
Checking for type struct timex : no
Checking for type struct ntptimeval : no
Checking for time_tick in struct timex : no
Checking for modes in struct timex : no
Checking for time.tv_nsec in struct ntptimeval : no
Checking for tai in struct ntptimeval : no
Checking sizeof int : 4
Checking sizeof long : 8
Checking sizeof long long : 8
Checking sizeof time_t (time.h) : 8
Checking for multicast capability : yes
Checking for library m : yes
Checking for library rt : not found
Checking for header openssl/asn1_mac.h : yes
Checking for header openssl/bn.h : yes
Checking for header openssl/err.h : yes
Checking for header openssl/evp.h : yes
Checking for header openssl/pem.h : yes
Checking for header openssl/rand.h : yes
Checking for header openssl/objects.h : yes
Checking for header openssl/x509v3.h : yes
Checking for header openssl/ssl.h : yes
Checking for library ssl : yes
Checking for library crypto : yes
Checking if OpenSSL works : yes
Checking for function adjtimex : no
Checking for function closefrom : no
Checking for function clock_gettime : yes
Checking for function clock_settime : yes
Checking for function EVP_MD_do_all_sorted : yes
Checking for function getdtablesize : yes
Checking for function getpassphrase : no
Checking for function getrusage : yes
Checking for function MD5Init : no
Checking for function ntp_adjtime : no
Checking for function ntp_gettime : no
Checking for function res_init : no
Checking for function sched_setscheduler : no
Checking for function strlcpy : yes
Checking for function strlcat : yes
Checking for function timer_create : no
Checking for header stdbool.h : yes
Checking for header alloca.h : yes
Checking for header arpa/nameser.h : yes
Checking for header dns_sd.h : yes
Checking for header ifaddrs.h : yes
Checking for header libscf.h : not found
Checking for header linux/if_addr.h : no
Checking for header linux/rtnetlink.h : no
Checking for header linux/serial.h : not found
Checking for header md5.h : no
Checking for header net/if6.h : not found
Checking for header net/route.h : yes
Checking for header netinfo/ni.h : not found
Checking for header priv.h : not found
Checking for header resolv.h : yes
Checking for header semaphore.h : yes
Checking for header stdatomic.h : yes
Checking for header sys/clockctl.h : not found
Checking for header sys/ioctl.h : yes
Checking for header sys/modem.h : not found
Checking for header sys/sockio.h : yes
Checking for header sys/sysctl.h : yes
Checking for header timepps.h : no
Checking for header sys/timepps.h : no
Checking for header utmpx.h : yes
Checking for header sys/timex.h : no
Checking for type sockaddr_storage : yes
Checking for sockaddr->sa_len : yes
Enabling Refclock Motorola UT Oncore GPS (oncore): : No
Refclock "Motorola UT Oncore GPS" disabled, PPS API has not been detected as working.
Enabling Refclock Trimble Navigation GPSes (trimble): : Yes
Enabling Refclock TrueTime GPS/GOES/OMEGA Receivers (truetime): : Yes
Enabling Refclock GPSD NG client protocol (gpsd): : Yes
Enabling Refclock JJY Receivers (jjy): : Yes
Enabling Refclock Generic Reference Driver (Parse) (generic): : Yes
Enabling Refclock Spectracom GPS Receivers (spectracom): : Yes
Enabling Refclock Dumb Clock (dumbclock): : Yes
Enabling Refclock Shared Memory Driver (shm): : Yes
Enabling Refclock PPS Clock Discipline (pps): : No
Refclock "PPS Clock Discipline" disabled, PPS API has not been detected as working.
Enabling Refclock Hewlett Packard 58503A GPS Receiver (hpgps): : Yes
Enabling Refclock Zyfer GPStarplus Receiver (zyfer): : Yes
Enabling Refclock Arbiter 1088A/B GPS Receiver (arbiter): : Yes
Enabling Refclock Generic NMEA GPS Receiver (nmea): : Yes
Enabling Refclock NeoClock4X - DCF77 / TDF serial line (neoclock): : Yes
Enabling Refclock Rockwell Jupiter GPS (jupiter): : No
Refclock "Rockwell Jupiter GPS" disabled, PPS API has not been detected as working.
Enabling Refclock NIST/USNO/PTB Modem Time Services (modem): : Yes
Enabling Refclock Undisciplined Local Clock (local): : Yes
Enabling Refclock Magnavox MX4200 and related GPS receivers (magnavox): : No
Refclock "Magnavox MX4200 and related GPS receivers" disabled, PPS API has not been detected as working.
Checking for %m expansion in vsnprintf(3) : no
Checking for header event2/event.h : yes
Checking for header event2/thread.h : yes
Checking for library event_core : yes
Checking for library event_pthreads : yes
Checking for header pthread.h : yes
Checking for library pthread : yes
Checking for library thr : not found
Checking for library dns_sd : not found
Checking for header dns_sd.h : yes
Checking if libevent2 works : yes
Checking if pthread works : yes
Checking if mDNSResponder works : yes
Writing configuration header: : config.h
Build Options
CC : /usr/bin/clang
CFLAGS : -Wall -Wextra -std=gnu99 -Wstrict-prototypes
LDFLAGS : -L/usr/local/opt/openssl/lib
PREFIX : /usr/local
Debug Support : Yes
Refclocks : trimble, truetime, gpsd, jjy, generic, spectracom, dumbclock, shm, hpgps, zyfer, arbiter, nmea, neoclock, modem, local
Build Manpages : Yes
Checking for program 'python' : /usr/bin/python
Checking for python version >= 2.6.0 : 2.7.10
python-config : /usr/bin/python-config
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
Testing pyembed configuration : yes
Asking python-config for pyext '--cflags --libs --ldflags' flags : yes
Testing pyext configuration : yes
'configure' finished successfully (13.113s)
--- building host ---
Waf: Entering directory `/Users/selsky/src/gitlab.com/ntpsec/build/host'
[1/2] Processing ntpd/ntp_parser.y
[2/2] Compiling build/host/ntpd/ntp_parser.tab.c
[3/4] Compiling ntpd/keyword-gen.c
[4/4] Linking build/host/ntpd/keyword-gen
[5/5] Compiling build/host/ntpd/ntp_parser.tab.h
172 keywords consumed 774 states of 2047 max.
Waf: Leaving directory `/Users/selsky/src/gitlab.com/ntpsec/build/host'
--- building main ---
Waf: Entering directory `/Users/selsky/src/gitlab.com/ntpsec/build/main'
[ 1/245] Compiling libisc/assertions.c
[ 2/245] Compiling libisc/backtrace-emptytbl.c
[ 3/245] Compiling libisc/backtrace.c
[ 4/245] Compiling libisc/error.c
[ 6/245] Compiling libisc/netaddr.c
[ 6/245] Compiling libisc/sha1.c
[ 7/245] Compiling libisc/errno2result.c
[ 8/245] Compiling libisc/interfaceiter.c
[ 9/245] Compiling libisc/net.c
[ 10/245] Compiling libparse/binio.c
[ 11/245] Compiling libparse/clk_computime.c
[ 12/245] Compiling libparse/clk_dcf7000.c
[ 13/245] Compiling libparse/clk_hopf6021.c
[ 14/245] Compiling libparse/clk_meinberg.c
[ 15/245] Compiling libparse/clk_rawdcf.c
[ 16/245] Compiling libparse/clk_rcc8000.c
[ 17/245] Compiling libparse/clk_schmid.c
[ 18/245] Compiling libparse/clk_sel240x.c
[ 19/245] Compiling libparse/clk_trimtaip.c
[ 20/245] Compiling libparse/clk_trimtsip.c
[ 21/245] Compiling libparse/clk_varitext.c
[ 22/245] Compiling libparse/clk_wharton.c
[ 23/245] Compiling libparse/data_mbg.c
[ 24/245] Compiling libparse/gpstolfp.c
[ 25/245] Compiling libparse/ieee754io.c
[ 26/245] Compiling libparse/info_trimble.c
[ 27/245] Compiling libparse/mfp_mul.c
[ 28/245] Compiling libparse/parse.c
[ 29/245] Compiling libparse/parse_conf.c
[ 30/245] Compiling libparse/trim_info.c
[ 31/245] Compiling libntp/a_md5encrypt.c
[ 32/245] Compiling libntp/atolfp.c
[ 33/245] Compiling libntp/authkeys.c
[ 34/245] Compiling libntp/authreadkeys.c
[ 35/245] Compiling libntp/clocktime.c
[ 36/245] Compiling libntp/decodenetnum.c
[ 37/245] Compiling libntp/emalloc.c
[ 38/245] Compiling libntp/dofptoa.c
[ 39/245] Compiling libntp/dolfptoa.c
[ 40/245] Compiling libntp/getopt.c
[ 41/245] Compiling libntp/initnetwork.c
[ 42/245] Compiling libntp/machines.c
[ 43/245] Compiling libntp/md5.c
[ 44/245] Compiling libntp/mstolfp.c
[ 45/245] Compiling libntp/msyslog.c
[ 46/245] Compiling libntp/netof.c
[ 47/245] Compiling libntp/ntp_endian.c
[ 48/245] Compiling libntp/ntp_intres.c
[ 49/245] Compiling libntp/ntp_random.c
[ 50/245] Compiling libntp/ntp_worker.c
[ 51/245] Compiling libntp/numtoa.c
[ 52/245] Compiling libntp/numtohost.c
[ 53/245] Compiling libntp/recvbuff.c
[ 54/245] Compiling libntp/refidsmear.c
[ 55/245] Compiling libntp/socket.c
[ 56/245] Compiling libntp/socktoa.c
[ 57/245] Compiling libntp/socktohost.c
[ 58/245] Compiling libntp/ssl_init.c
[ 59/245] Compiling libntp/strl_obsd.c
[ 60/245] Compiling libntp/syssignal.c
[ 61/245] Compiling libntp/timetoa.c
[ 62/245] Compiling libntp/vint64ops.c
[ 63/245] Compiling libntp/work_thread.c
[ 64/245] Compiling libntp/ymd2yd.c
[ 65/245] Compiling libntp/hextolfp.c
[ 66/245] Compiling libntp/humandate.c
[ 67/245] Compiling libntp/lib_strbuf.c
[ 68/245] Compiling libntp/ntp_calendar.c
[ 69/245] Compiling libntp/prettydate.c
[ 70/245] Compiling libntp/statestr.c
[ 71/245] Compiling libntp/systime.c
[ 72/245] Compiling libntp/pymodule.c
[ 73/245] Compiling libntp/hextolfp.c
[ 74/245] Compiling libntp/humandate.c
[ 75/245] Compiling libntp/lib_strbuf.c
[ 76/245] Compiling libntp/ntp_calendar.c
[ 77/245] Compiling libntp/prettydate.c
[ 78/245] Compiling libntp/statestr.c
[ 79/245] Compiling ntpdig/crypto.c
[ 80/245] Compiling ntpdig/kod_management.c
[ 81/245] Compiling ntpdig/log.c
[ 82/245] Compiling ntpdig/main.c
[ 83/245] Compiling ntpdig/networking.c
[ 84/245] Compiling ntpdig/utilities.c
[ 85/245] Creating build/main/ntpdig/version.c
[ 86/245] Compiling ntpdig/ntpdig.c
[ 87/245] Compiling ntpdig/ntpdig-man.txt
[ 88/245] Compiling libsodium/sodium/core.c
[ 89/245] Compiling libsodium/randombytes/randombytes.c
[ 90/245] Compiling libsodium/randombytes/sysrandom/randombytes_sysrandom.c
[ 91/245] Compiling ntpd/ntp_control.c
[ 92/245] Compiling ntpd/ntp_filegen.c
[ 93/245] Compiling ntpd/ntp_leapsec.c
[ 94/245] Compiling ntpd/ntp_monitor.c
[ 95/245] Compiling ntpd/ntp_restrict.c
[ 96/245] Compiling ntpd/ntp_util.c
[ 97/245] Compiling ntpd/ntp_refclock.c
[ 98/245] Compiling ntpd/refclock_conf.c
[ 99/245] Compiling ntpd/refclock_trimble.c
[100/245] Compiling ntpd/refclock_truetime.c
[101/245] Compiling ntpd/refclock_gpsd.c
[102/245] Compiling ntpd/refclock_jjy.c
[103/245] Compiling ntpd/refclock_generic.c
[104/245] Compiling ntpd/refclock_spectracom.c
[105/245] Compiling ntpd/refclock_dumbclock.c
[106/245] Compiling ntpd/refclock_shm.c
[107/245] Compiling ntpd/refclock_hpgps.c
[108/245] Compiling ntpd/refclock_zyfer.c
[109/245] Compiling ntpd/refclock_arbiter.c
[110/245] Compiling ntpd/refclock_nmea.c
[111/245] Compiling ntpd/refclock_neoclock.c
[112/245] Compiling ntpd/refclock_modem.c
[113/245] Compiling ntpd/refclock_local.c
[114/245] Creating build/main/ntpd/version.c
[115/245] Compiling ntpd/ntp_config.c
[116/245] Compiling ntpd/ntp_io.c
[117/245] Compiling ntpd/ntp_loopfilter.c
[118/245] Compiling ntpd/ntp_peer.c
[119/245] Compiling ntpd/ntp_proto.c
[120/245] Compiling ntpd/ntp_sandbox.c
[121/245] Compiling ntpd/ntp_scanner.c
[122/245] Compiling ntpd/ntp_signd.c
[123/245] Compiling ntpd/ntp_timer.c
[124/245] Compiling ntpd/ntpd.c
[125/245] Compiling build/host/ntpd/ntp_parser.tab.c
[126/245] Compiling ntpd/ntpd-man.txt
[127/245] Compiling ntpd/ntp.conf-man.txt
[128/245] Compiling ntpd/ntp.keys-man.txt
[129/245] Compiling ntpfrob/main.c
[130/245] Compiling ntpfrob/bumpclock.c
[131/245] Compiling ntpfrob/jitter.c
[132/245] Compiling ntpfrob/precision.c
[133/245] Compiling ntpfrob/pps-api.c
[134/245] Compiling ntpfrob/tickadj.c
[135/245] Compiling ntpfrob/ntpfrob-man.txt
[136/245] Compiling ntpkeygen/ntpkeygen.c
[137/245] Compiling ntpkeygen/ntpkeygen-man.txt
[138/245] Compiling ntptime/ntptime-man.txt
[139/245] Compiling include/ntp_control.h
[140/245] Compiling include/ntp.h
[141/245] Processing VERSION
[142/245] Compiling util/sht.c
[143/245] Compiling tests/unity/unity.c
[144/245] Compiling tests/unity/unity_fixture.c
[145/245] Compiling tests/ntpdig/crypto.c
[146/245] Compiling tests/ntpdig/key_file.c
[147/245] Compiling tests/ntpdig/kod_database.c
[148/245] Compiling tests/ntpdig/kod_file.c
[149/245] Compiling tests/ntpdig/packet_handling.c
[150/245] Compiling tests/ntpdig/packet_processing.c
[151/245] Compiling tests/ntpdig/utilities.c
[152/245] Compiling tests/common/tests_main.c
[153/245] Compiling tests/common/caltime.c
[154/245] Compiling tests/common/sockaddrtest.c
[155/245] Compiling tests/common/file_handling.c
[156/245] Compiling tests/libntp/a_md5encrypt.c
[157/245] Compiling tests/libntp/authkeys.c
[158/245] Compiling tests/libntp/calendar.c
[159/245] Compiling tests/libntp/clocktime.c
[160/245] Compiling tests/libntp/decodenetnum.c
[161/245] Compiling tests/libntp/hextolfp.c
[162/245] Compiling tests/libntp/humandate.c
[163/245] Compiling tests/libntp/lfpfunc.c
[164/245] Compiling tests/libntp/lfptostr.c
[165/245] Compiling tests/libntp/msyslog.c
[166/245] Compiling tests/libntp/netof.c
[167/245] Compiling tests/libntp/numtoa.c
[168/245] Compiling tests/libntp/numtohost.c
[169/245] Compiling tests/libntp/prettydate.c
[170/245] Compiling tests/libntp/recvbuff.c
[171/245] Compiling tests/libntp/refidsmear.c
[172/245] Compiling tests/libntp/sfptostr.c
[173/245] Compiling tests/libntp/socktoa.c
[174/245] Compiling tests/libntp/ssl_init.c
[175/245] Compiling tests/libntp/statestr.c
[176/245] Compiling tests/libntp/strtolfp.c
[177/245] Compiling tests/libntp/timespecops.c
[178/245] Compiling tests/libntp/vi64ops.c
[179/245] Compiling tests/libntp/ymd2yd.c
[180/245] Compiling tests/common/tests_main.c
[181/245] Compiling tests/common/caltime.c
[182/245] Compiling tests/common/sockaddrtest.c
[183/245] Compiling tests/common/file_handling.c
[184/245] Compiling tests/ntpd/leapsec.c
[185/245] Compiling tests/ntpd/restrict.c
[186/245] Compiling tests/common/tests_main.c
[187/245] Compiling tests/common/caltime.c
[188/245] Compiling tests/common/sockaddrtest.c
[189/245] Compiling tests/common/file_handling.c
[190/245] Compiling ntpleapfetch/ntpleapfetch
[191/245] Compiling ntpq/ntpq
[192/245] Compiling ntpstats/ntpviz
[193/245] Compiling ntptrace/ntptrace
[194/245] Compiling ntpwait/ntpwait
[195/245] Compiling ntpsweep/ntpsweep
[196/245] Compiling ntpleapfetch/ntpleapfetch-man.txt
[197/245] Compiling ntptrace/ntptrace-man.txt
[198/245] Compiling ntpstats/ntpviz-man.txt
[199/245] Compiling ntpwait/ntpwait-man.txt
[200/245] Compiling ntpsweep/ntpsweep-man.txt
[201/245] Compiling build/main/ntpd/version.c
[202/245] Linking build/main/ntpd/libntpd_lib.a
[203/245] Compiling build/main/ntpdig/ntpdig-man.txt.man-tmp
[204/245] Linking build/main/libparse/libparse.a
[205/245] Linking build/main/libisc/libisc.a
[206/245] Linking build/main/libntp/ntpc.so
[207/245] Compiling build/main/ntpdig/version.c
[208/245] Linking build/main/libsodium/libsodium.a
[209/245] Compiling build/main/ntpd/ntp.keys-man.txt.man-tmp
[210/245] Compiling build/main/ntpd/ntp.conf-man.txt.man-tmp
[211/245] Compiling build/main/ntpd/ntpd-man.txt.man-tmp
[212/245] Compiling build/main/ntpfrob/ntpfrob-man.txt.man-tmp
[213/245] Compiling build/main/ntptime/ntptime-man.txt.man-tmp
[214/245] Compiling build/main/ntpkeygen/ntpkeygen-man.txt.man-tmp
[215/245] Linking build/main/ntpfrob/ntpfrob
[216/245] Compiling build/main/ntpleapfetch/ntpleapfetch-man.txt.man-tmp
[217/245] Compiling build/main/ntptrace/ntptrace-man.txt.man-tmp
[218/245] Compiling build/main/ntpstats/ntpviz-man.txt.man-tmp
[219/245] Compiling build/main/ntpwait/ntpwait-man.txt.man-tmp
[220/245] Compiling build/main/ntpsweep/ntpsweep-man.txt.man-tmp
[221/245] Linking build/main/libntp/libntp.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libntp/libntp.a(strl_obsd.c.1.o) has no symbols
[222/245] Compiling build/main/pylib/util.pyo
[223/245] Compiling pylib/ntp_magic.pyc
[224/245] Compiling pylib/__init__.pyc
[225/245] Compiling build/main/pylib/packet.pyo
[226/245] Compiling build/main/pylib/__init__.pyo
[227/245] Compiling build/main/pylib/statfiles.pyo
[228/245] Compiling pylib/packet.pyc
[229/245] Compiling build/main/pylib/statfiles.pyc
[230/245] Compiling pylib/util.pyc
[231/245] Compiling build/main/pylib/ntp_magic.pyo
[232/245] Compiling build/main/pylib/version.pyo
[233/245] Compiling pylib/ntp_control.pyc
[234/245] Compiling build/main/pylib/ntp_control.pyo
[235/245] Compiling pylib/version.pyc
[236/245] Linking build/main/ntpd/ntpd
[237/245] Linking build/main/tests/test_libntp
[238/245] Linking build/main/tests/test_ntpdig
[239/245] Linking build/main/ntpdig/ntpdig
[240/245] Linking build/main/tests/test_ntpd
[241/245] Linking build/main/util/sht
Undefined symbols for architecture x86_64:
"_ipv4_works", referenced from:
_ntpdig_main in main.c.1.o
"_ipv6_works", referenced from:
_ntpdig_main in main.c.1.o
_open_sockets in main.c.1.o
_ntpdig_name_resolved in main.c.1.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 'ntpdig' failed with exit status 1 (run with -v to display more information)