Skip to content

Build fails on CentOS 6 x64

I did a fresh install of CentOS 6 x64, and I'm seeing build errors in ntp_io.c

[root@vultr ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap]# ./waf configure
Setting top to                           : /root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap
Setting out to                           : /root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build
--- Configuring host ---
Checking for 'gcc' (C compiler)          : /usr/bin/gcc
Checking compiler                        : yes
Compiler found                           : GCC
Checking for program 'awk'               : /bin/awk
Checking for program 'perl'              : not found
Checking for program 'sh'                : /bin/sh
Checking for program 'asciidoc'          : not found
Checking for program 'a2x'               : not found
Checking for program 'xsltproc'          : not found
Building version                         : 0.9.3
--- Configuring main ---
Checking build target                    : unix
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           : yes
Checking for type struct ntptimeval      : yes
Checking for time_tick in struct timex   : no
Checking for modes in struct timex       : yes
Checking for time.tv_nsec 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 edit                      : not found
Checking for library m                         : yes
Checking for library ossaudio                  : not found
Checking for library rt                        : yes
Checking for library curses                    : not found
Checking for library readline                  : not found
Checking for library gcc_s                     : yes
Checking for function adjtimex                 : yes
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     : no
Checking for function getclock                 : no
Checking for function getpassphrase            : no
Checking for function MD5Init                  : no
Checking for function ntp_adjtime              : yes
Checking for function ntp_gettime              : yes
Checking for function res_init                 : yes
Checking for function rtprio                   : no
Checking for function sched_setscheduler       : yes
Checking for function settimeofday             : yes
Checking for function strlcpy                  : no
Checking for function strlcat                  : no
Checking for function timer_create             : no
Checking for header stdbool.h                  : yes
Checking for header dns_sd.h                   : not found
Checking for header histedit.h                 : not found
Checking for header ifaddrs.h                  : yes
Checking for header libscf.h                   : not found
Checking for header linux/if_addr.h            : not found
Compilation check failed but include exists linux/if_addr.h
Checking for header linux/rtnetlink.h          : not found
Compilation check failed but include exists linux/rtnetlink.h
Checking for header linux/serial.h             : yes
Checking for header machine/soundcard.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 readline/readline.h        : no
Checking for header readline/history.h         : no
Checking for header resolv.h                   : yes
Checking for header semaphore.h                : yes
Checking for header stdatomic.h                : not found
Checking for header sys/audioio.h              : not found
Checking for header sys/capability.h           : not found
Checking for header sys/ioctl.h                : yes
Checking for header sys/modem.h                : not found
Checking for header sys/prctl.h                : yes
Checking for header sys/sockio.h               : not found
Checking for header sys/soundcard.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                : yes
Checking for header sys/audio.h                : not found
Checking for type sockaddr_storage             : yes
Checking for sockaddr->sa_len                  : no
Checking for %m expansion in vsnprintf(3)      : yes
Checking for header sys/capability.h           : not found
Checking for library cap                       : not found
Checking for header event2/event.h             : not found
Checking for header event2/thread.h            : not found
Checking for library event_core                : not found
Checking for library event_pthreads            : not found
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                   : not found
Checking if libcap works                       : no
Checking if libevent2 works                    : no

Warning libevent2 does not work
This means ntpdig will not be built
While not necessary you will lose 'ntpdate' functionality.

Checking if pthread works                      : yes
Checking if mDNSResponder works                : no
Writing configuration header:                  : config.h

Build Options
  CC                            :  /usr/bin/gcc
  CFLAGS                        :  -Wall -Wextra
  LDFLAGS                       :
  PREFIX                        :  /usr/local
  Debug Support                 :  Yes
  Refclocks                     :
  Build Manpages                :  No
'configure' finished successfully (3.150s)
[root@vultr ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap]# ./waf
--- building host ---
Waf: Entering directory `/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build/host'
[1/3] Compiling ntpd/keyword-gen.c
[2/3] Linking build/host/ntpd/keyword-gen
[3/3] Compiling ntpd/ntp_parser.tab.h
178 keywords consumed 843 states of 2047 max.

Waf: Leaving directory `/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build/host'
--- building main ---
Waf: Entering directory `/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build/main'
[  1/161] Compiling libisc/assertions.c
[  2/161] Compiling libisc/backtrace-emptytbl.c
[  3/161] Compiling libisc/backtrace.c
[  4/161] Compiling libisc/error.c
[  5/161] Compiling libisc/md5.c
[  6/161] Compiling libisc/netaddr.c
[  7/161] Compiling libisc/result.c
[  8/161] Compiling libisc/sha1.c
[  9/161] Compiling libisc/unix/errno2result.c
[ 10/161] Compiling libisc/unix/interfaceiter.c
[ 11/161] Compiling libisc/unix/net.c
[ 12/161] Linking build/main/libisc/libisc.a
[ 13/161] Compiling libntp/a_md5encrypt.c
[ 14/161] Compiling libntp/atolfp.c
[ 15/161] Compiling libntp/authkeys.c
[ 16/161] Compiling libntp/authreadkeys.c
[ 17/161] Compiling libntp/authusekey.c
[ 18/161] Compiling libntp/caljulian.c
[ 19/161] Compiling libntp/caltontp.c
[ 20/161] Compiling libntp/calyearstart.c
[ 21/161] Compiling libntp/clocktime.c
[ 22/161] Compiling libntp/clocktypes.c
[ 23/161] Compiling libntp/decodenetnum.c
[ 24/161] Compiling libntp/dofptoa.c
[ 25/161] Compiling libntp/dolfptoa.c
[ 26/161] Compiling libntp/emalloc.c
[ 27/161] Compiling libntp/getopt.c
[ 28/161] Compiling libntp/hextolfp.c
[ 29/161] Compiling libntp/humandate.c
[ 30/161] Compiling libntp/icom.c
[ 31/161] Compiling libntp/iosignal.c
[ 32/161] Compiling libntp/lib_strbuf.c
[ 33/161] Compiling libntp/machines.c
[ 34/161] Compiling libntp/modetoa.c
[ 35/161] Compiling libntp/mstolfp.c
[ 36/161] Compiling libntp/msyslog.c
[ 37/161] Compiling libntp/netof.c
[ 38/161] Compiling libntp/ntp_calendar.c
[ 39/161] Compiling libntp/ntp_intres.c
[ 40/161] Compiling libntp/ntp_lineedit.c
[ 41/161] Compiling libntp/ntp_random.c
[ 42/161] Compiling libntp/ntp_rfc2553.c
[ 43/161] Compiling libntp/ntp_worker.c
[ 44/161] Compiling libntp/numtoa.c
[ 45/161] Compiling libntp/numtohost.c
[ 46/161] Compiling libntp/prettydate.c
[ 47/161] Compiling libntp/recvbuff.c
[ 48/161] Compiling libntp/refnumtoa.c
[ 49/161] Compiling libntp/refidsmear.c
[ 50/161] Compiling libntp/socket.c
[ 51/161] Compiling libntp/socktoa.c
[ 52/161] Compiling libntp/socktohost.c
[ 53/161] Compiling libntp/ssl_init.c
[ 54/161] Compiling libntp/statestr.c
[ 55/161] Compiling libntp/strl_obsd.c
[ 56/161] Compiling libntp/syssignal.c
[ 57/161] Compiling libntp/timetoa.c
[ 58/161] Compiling libntp/timevalops.c
[ 59/161] Compiling libntp/vint64ops.c
[ 60/161] Compiling libntp/work_thread.c
[ 61/161] Compiling libntp/ymd2yd.c
[ 62/161] Compiling libntp/systime.c
[ 63/161] Compiling libsodium/sodium/core.c
[ 64/161] Compiling libsodium/randombytes/randombytes.c
[ 65/161] Compiling libsodium/randombytes/sysrandom/randombytes_sysrandom.c
[ 66/161] Linking build/main/libsodium/libsodium.a
[ 67/161] Compiling ntpd/ntp_control.c
[ 68/161] Compiling ntpd/ntp_filegen.c
[ 69/161] Compiling ntpd/ntp_intercept.c
[ 70/161] Compiling ntpd/ntp_leapsec.c
[ 71/161] Compiling ntpd/ntp_loopfilter.c
[ 72/161] Compiling ntpd/ntp_monitor.c
[ 73/161] Compiling ntpd/ntp_peer.c
[ 74/161] Compiling ntpd/ntp_proto.c
[ 75/161] Compiling ntpd/ntp_restrict.c
[ 76/161] Compiling ntpd/ntp_sandbox.c
[ 77/161] Compiling ntpd/ntp_signd.c
[ 78/161] Compiling ntpd/ntp_timer.c
[ 79/161] Compiling ntpd/ntp_util.c
[ 80/161] Linking build/main/ntpd/libntpd_lib.a
[ 81/161] Creating build/main/ntpd/version.c
[ 82/161] Compiling ntpd/ntp_config.c
[ 83/161] Compiling ntpd/ntp_io.c
../../ntpd/ntp_io.c: In function ‘process_routing_msgs’:
../../ntpd/ntp_io.c:4620: error: storage size of ‘rtm’ isn’t known
../../ntpd/ntp_io.c:4659: error: invalid application of ‘sizeof’ to incomplete type ‘struct rt_msghdr’
../../ntpd/ntp_io.c:4662: error: ‘RTM_VERSION’ undeclared (first use in this function)
../../ntpd/ntp_io.c:4662: error: (Each undeclared identifier is reported only once
../../ntpd/ntp_io.c:4662: error: for each function it appears in.)
../../ntpd/ntp_io.c:4620: warning: unused variable ‘rtm’

Waf: Leaving directory `/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build/main'
Build failed
 -> task in 'ntpd' failed (exit status 1):
        {task 23570704: c ntp_io.c -> ntp_io.c.3.o}
['/usr/bin/gcc', '-Wall', '-Wextra', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build/host/ntpd', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/ntpd', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/libsodium/include', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/include', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/libisc/include', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/libisc/unix/include', '-I/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/libisc/pthreads/include', '../../ntpd/ntp_io.c', '-c', '-o', '/root/ntpsec-2016-05-12_220404-0.9.3-5fd5d82-snap/build/main/ntpd/ntp_io.c.3.o']