linking fails on OSX 10.13 with Xcode 9
$ LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS="-I/usr/local/opt/openssl/include" python ./waf configure build
[...]
[92/92] Linking build/main/ntptime/ntptime
Undefined symbols for architecture x86_64:
"_debug", referenced from:
_ntp_set_tod in libntp.a(clockwork.c.1.o)
_change_logfile in libntp.a(msyslog.c.1.o)
"_lib_nextbuf", referenced from:
_common_prettydate in libntp.a(prettydate.c.1.o)
_rfc3339time in libntp.a(prettydate.c.1.o)
_format_time_fraction in libntp.a(timetoa.c.1.o)
_humanlogtime in libntp.a(humandate.c.1.o)
_humantime in libntp.a(humandate.c.1.o)
"_lib_stringbuf", referenced from:
_common_prettydate in libntp.a(prettydate.c.1.o)
_rfc3339time in libntp.a(prettydate.c.1.o)
_format_time_fraction in libntp.a(timetoa.c.1.o)
_humanlogtime in libntp.a(humandate.c.1.o)
_humantime in libntp.a(humandate.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 'ntptime' failed with exit status 1 (run with -v to display more information)
I re-ran with -v:
$ LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS="-I/usr/local/opt/openssl/include" python ./waf build -v
--- building host ---
Waf: Entering directory `/Users/selsky/src/gitlab.com/ntpsec/build/host'
17:19:34 runner 'rm -f pylib/*.py[co]'
Waf: Leaving directory `/Users/selsky/src/gitlab.com/ntpsec/build/host'
--- building main ---
Waf: Entering directory `/Users/selsky/src/gitlab.com/ntpsec/build/main'
--- PYTHONPATH is not set, loading the Python ntp library may be troublesome ---
17:19:34 runner 'rm -f pylib/*.py[co]'
[87/92] Linking build/main/ntptime/ntptime
17:19:34 runner ['/usr/bin/clang', 'ntptime/ntptime.c.1.o', '-o/Users/selsky/src/gitlab.com/ntpsec/build/main/ntptime/ntptime', '-Llibntp', '-lntp', '-lm', '-L/usr/local/opt/openssl/lib']
Undefined symbols for architecture x86_64:
"_debug", referenced from:
_ntp_set_tod in libntp.a(clockwork.c.1.o)
_change_logfile in libntp.a(msyslog.c.1.o)
"_lib_nextbuf", referenced from:
_common_prettydate in libntp.a(prettydate.c.1.o)
_rfc3339time in libntp.a(prettydate.c.1.o)
_format_time_fraction in libntp.a(timetoa.c.1.o)
_humanlogtime in libntp.a(humandate.c.1.o)
_humantime in libntp.a(humandate.c.1.o)
"_lib_stringbuf", referenced from:
_common_prettydate in libntp.a(prettydate.c.1.o)
_rfc3339time in libntp.a(prettydate.c.1.o)
_format_time_fraction in libntp.a(timetoa.c.1.o)
_humanlogtime in libntp.a(humandate.c.1.o)
_humantime in libntp.a(humandate.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 'ntptime' failed with exit status 1:
{task 4307672592: cprogram ntptime.c.1.o -> ntptime}
['/usr/bin/clang', 'ntptime/ntptime.c.1.o', '-o/Users/selsky/src/gitlab.com/ntpsec/build/main/ntptime/ntptime', '-Llibntp', '-lntp', '-lm', '-L/usr/local/opt/openssl/lib']