[19.07] ld: cannot find -levent_pthreads breaks ntpd compilation

I wanted to run a newer build off my local 19.07 branch, but it's choking on the following error.... It's hard to imagine compilation requirements have changed for 19.07 in like two weeks, so I'm not sure what I'm looking at.

Commands I issued (after a general 'make V=s pointed to ntpd):
make package/ntpd/clean
make package/ntpd/compile V=s

Output:

env CCACHE_DISABLE=1 ccache_cc -DHAVE_CONFIG_H -I.  -I./../include -I./../lib/isc/include -I./../lib/isc/pthreads/include -I./../lib/isc/unix/include -I./libopts  -I/var/media/data/code/lede/19.07/staging_dir/target-x86_64_musl/usr/include -D_FORTIFY_SOURCE=2 -I/var/media/data/code/lede/19.07/staging_dir/target-x86_64_musl/usr/include -I/var/media/data/code/lede/19.07/staging_dir/target-x86_64_musl/include -I/var/media/data/code/lede/19.07/staging_dir/toolchain-x86_64_gcc-7.4.0_musl/usr/include -I/var/media/data/code/lede/19.07/staging_dir/toolchain-x86_64_gcc-7.4.0_musl/include/fortify -I/var/media/data/code/lede/19.07/staging_dir/toolchain-x86_64_gcc-7.4.0_musl/include  -Wall -Wcast-align -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Winit-self -Wstrict-overflow   -Wno-strict-prototypes -fPIE -fPIC -fstack-protector-all -O1 -Os -pipe -march=btver2 -mtune=btver2 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/var/media/data/code/lede/19.07/build_dir/target-x86_64_musl/ntp-4.2.8p13:ntp-4.2.8p13 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -c version.c -o version.o
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<command-line>:0:0: note: this is the location of the previous definition
  CCLD     sntp
/var/media/data/code/lede/19.07/staging_dir/toolchain-x86_64_gcc-7.4.0_musl/lib/gcc/x86_64-openwrt-linux-musl/7.4.0/../../../../x86_64-openwrt-linux-musl/bin/ld: cannot find -levent_pthreads
collect2: error: ld returned 1 exit status
make[7]: *** [Makefile:888: sntp] Error 1
make[7]: Leaving directory '/var/media/data/code/lede/19.07/build_dir/target-x86_64_musl/ntp-4.2.8p13/sntp'
make[6]: *** [Makefile:1049: all-recursive] Error 1
make[6]: Leaving directory '/var/media/data/code/lede/19.07/build_dir/target-x86_64_musl/ntp-4.2.8p13/sntp'
make[5]: *** [Makefile:677: all] Error 2
make[5]: Leaving directory '/var/media/data/code/lede/19.07/build_dir/target-x86_64_musl/ntp-4.2.8p13/sntp'
make[4]: *** [Makefile:666: all-recursive] Error 1
make[4]: Leaving directory '/var/media/data/code/lede/19.07/build_dir/target-x86_64_musl/ntp-4.2.8p13'
make[3]: *** [Makefile:598: all] Error 2
make[3]: Leaving directory '/var/media/data/code/lede/19.07/build_dir/target-x86_64_musl/ntp-4.2.8p13'
make[2]: *** [Makefile:159: /var/media/data/code/lede/19.07/build_dir/target-x86_64_musl/ntp-4.2.8p13/.built] Error 2
make[2]: Leaving directory '/var/media/data/code/lede/19.07/feeds/packages/net/ntpd'
time: package/feeds/packages/ntpd/compile#48.47#9.41#58.80
make[1]: *** [package/Makefile:113: package/feeds/packages/ntpd/compile] Error 2
make[1]: Leaving directory '/var/media/data/code/lede/19.07'
make: *** [/var/media/data/code/lede/19.07/include/toplevel.mk:227: package/ntpd/compile] Fout 2

Diffconfig:

CONFIG_TARGET_x86=y
CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86_64_Generic=y
CONFIG_DEVEL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUILD_PATENTED=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NEWER is not set
CONFIG_BUSYBOX_CONFIG_LSPCI=y
CONFIG_BUSYBOX_CONFIG_NSLOOKUP=y
# CONFIG_BUSYBOX_CONFIG_SWAPOFF is not set
# CONFIG_BUSYBOX_CONFIG_SWAPON is not set
CONFIG_CCACHE=y
CONFIG_DROPBEAR_ECC=y
CONFIG_DROPBEAR_ECC_FULL=y
CONFIG_IMAGEOPT=y
# CONFIG_KERNEL_KALLSYMS is not set
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_OPENSSL=y
CONFIG_LIBCURL_PROXY=y
CONFIG_OPENSSL_OPTIMIZE_SPEED=y
CONFIG_OPENSSL_WITH_ASM=y
CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y
CONFIG_OPENSSL_WITH_CMS=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_OPENSSL_WITH_EC2M=y
CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y
CONFIG_OPENSSL_WITH_NPN=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_OPENSSL_WITH_TLS13=y
CONFIG_PACKAGE_adblock=y
CONFIG_PACKAGE_amd64-microcode=y
CONFIG_PACKAGE_arptables=y
# CONFIG_PACKAGE_bnx2-firmware is not set
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_cgi-io=y
CONFIG_PACKAGE_collectd=y
CONFIG_PACKAGE_collectd-mod-conntrack=y
CONFIG_PACKAGE_collectd-mod-cpu=y
CONFIG_PACKAGE_collectd-mod-dns=y
CONFIG_PACKAGE_collectd-mod-interface=y
CONFIG_PACKAGE_collectd-mod-iptables=y
CONFIG_PACKAGE_collectd-mod-iwinfo=y
CONFIG_PACKAGE_collectd-mod-load=y
CONFIG_PACKAGE_collectd-mod-logfile=y
CONFIG_PACKAGE_collectd-mod-memory=y
CONFIG_PACKAGE_collectd-mod-network=y
CONFIG_PACKAGE_collectd-mod-ntpd=y
CONFIG_PACKAGE_collectd-mod-rrdtool=y
CONFIG_PACKAGE_collectd-mod-sensors=y
CONFIG_PACKAGE_collectd-mod-tcpconns=y
CONFIG_PACKAGE_collectd-mod-thermal=y
CONFIG_PACKAGE_collectd-mod-uptime=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_ddns-scripts_no-ip_com=y
CONFIG_PACKAGE_dmesg=y
CONFIG_PACKAGE_dmidecode=y
CONFIG_PACKAGE_ebtables=y
CONFIG_PACKAGE_ebtables-utils=y
CONFIG_PACKAGE_etherwake=m
CONFIG_PACKAGE_ethtool=y
CONFIG_PACKAGE_flashrom=y
CONFIG_PACKAGE_fstrim=y
CONFIG_PACKAGE_hostapd=m
CONFIG_PACKAGE_hostapd-common=y
CONFIG_PACKAGE_hostapd-utils=m
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_ip-bridge=y
CONFIG_PACKAGE_ip-tiny=y
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_ipset=y
CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
CONFIG_PACKAGE_iptables-mod-filter=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
CONFIG_PACKAGE_iw=y
CONFIG_PACKAGE_kmod-arptables=y
CONFIG_PACKAGE_kmod-asn1-decoder=y
# CONFIG_PACKAGE_kmod-bnx2 is not set
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-cfg80211=y
CONFIG_PACKAGE_kmod-crypto-aead=y
CONFIG_PACKAGE_kmod-crypto-authenc=y
CONFIG_PACKAGE_kmod-crypto-crc32c=y
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-crypto-hw-ccp=y
CONFIG_PACKAGE_kmod-crypto-manager=y
CONFIG_PACKAGE_kmod-crypto-null=y
CONFIG_PACKAGE_kmod-crypto-pcompress=y
CONFIG_PACKAGE_kmod-crypto-rsa=y
CONFIG_PACKAGE_kmod-crypto-sha1=y
CONFIG_PACKAGE_kmod-crypto-sha256=y
# CONFIG_PACKAGE_kmod-e1000e is not set
CONFIG_PACKAGE_kmod-ebtables=y
CONFIG_PACKAGE_kmod-ebtables-ipv4=y
CONFIG_PACKAGE_kmod-ebtables-ipv6=y
CONFIG_PACKAGE_kmod-ebtables-watchers=y
CONFIG_PACKAGE_kmod-gpio-button-hotplug=y
CONFIG_PACKAGE_kmod-gpio-nct5104d=y
CONFIG_PACKAGE_kmod-hid=y
CONFIG_PACKAGE_kmod-hid-generic=y
CONFIG_PACKAGE_kmod-i2c-piix4=y
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-input-evdev=y
CONFIG_PACKAGE_kmod-input-polldev=y
CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y
CONFIG_PACKAGE_kmod-ipt-filter=y
CONFIG_PACKAGE_kmod-ipt-ipopt=y
CONFIG_PACKAGE_kmod-ipt-iprange=y
CONFIG_PACKAGE_kmod-ipt-ipset=y
# CONFIG_PACKAGE_kmod-ipt-offload is not set
CONFIG_PACKAGE_kmod-ipt-raw=y
CONFIG_PACKAGE_kmod-ipt-ulog=y
CONFIG_PACKAGE_kmod-leds-apu2=y
CONFIG_PACKAGE_kmod-leds-gpio=y
CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_kmod-lib-crc32c=y
CONFIG_PACKAGE_kmod-lib-textsearch=y
CONFIG_PACKAGE_kmod-mmc=y
CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y
# CONFIG_PACKAGE_kmod-nf-flow is not set
CONFIG_PACKAGE_kmod-nfnetlink=y
CONFIG_PACKAGE_kmod-nls-base=y
CONFIG_PACKAGE_kmod-nls-utf8=m
CONFIG_PACKAGE_kmod-pcspkr=y
# CONFIG_PACKAGE_kmod-r8169 is not set
CONFIG_PACKAGE_kmod-random-core=y
CONFIG_PACKAGE_kmod-sched=y
CONFIG_PACKAGE_kmod-sched-cake=y
CONFIG_PACKAGE_kmod-sched-connmark=y
CONFIG_PACKAGE_kmod-sched-core=y
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-sdhci=y
CONFIG_PACKAGE_kmod-sound-core=y
CONFIG_PACKAGE_kmod-sp5100_tco=y
CONFIG_PACKAGE_kmod-tun=y
CONFIG_PACKAGE_kmod-udptunnel4=y
CONFIG_PACKAGE_kmod-udptunnel6=y
CONFIG_PACKAGE_kmod-usb-core=y
CONFIG_PACKAGE_kmod-usb-ehci=y
CONFIG_PACKAGE_kmod-usb-hid=y
CONFIG_PACKAGE_kmod-usb-net=y
CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y
CONFIG_PACKAGE_kmod-usb-net-rndis=y
CONFIG_PACKAGE_kmod-usb-ohci=m
CONFIG_PACKAGE_kmod-usb-printer=m
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-usb-storage-extras=m
CONFIG_PACKAGE_kmod-usb-uhci=m
CONFIG_PACKAGE_kmod-usb2=y
CONFIG_PACKAGE_kmod-usb3=y
CONFIG_PACKAGE_kmod-wireguard=y
CONFIG_PACKAGE_libcap=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libelf=y
CONFIG_PACKAGE_libevent2=y
CONFIG_PACKAGE_libexpat=y
CONFIG_PACKAGE_libftdi1=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libipset=y
CONFIG_PACKAGE_libiptc=y
CONFIG_PACKAGE_libiwinfo=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_libkmod=y
CONFIG_PACKAGE_libltdl=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liblzo=y
CONFIG_PACKAGE_libmnl=y
CONFIG_PACKAGE_libmount=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libnettle=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libopenssl-conf=y
CONFIG_PACKAGE_libpcap=y
CONFIG_PACKAGE_libpci=y
CONFIG_PACKAGE_libpcre=y
CONFIG_PACKAGE_libqrencode=y
CONFIG_PACKAGE_librrd1=y
CONFIG_PACKAGE_libsensors=y
CONFIG_PACKAGE_libsysfs=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libuci-lua=y
CONFIG_PACKAGE_libunbound=y
CONFIG_PACKAGE_libusb-1.0=y
CONFIG_PACKAGE_libusb-compat=y
CONFIG_PACKAGE_libustream-openssl=y
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-adblock=y
CONFIG_PACKAGE_luci-app-ddns=y
CONFIG_PACKAGE_luci-app-diag-core=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-nlbwmon=y
CONFIG_PACKAGE_luci-app-ntpc=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-app-p910nd=m
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-app-statistics=y
CONFIG_PACKAGE_luci-app-tinyproxy=m
CONFIG_PACKAGE_luci-app-wireguard=y
CONFIG_PACKAGE_luci-app-wol=m
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-compat=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-ipkg=y
CONFIG_PACKAGE_luci-lib-iptparser=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-proto-wireguard=y
CONFIG_PACKAGE_luci-ssl-openssl=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-material=y
CONFIG_PACKAGE_mii-tool=y
CONFIG_PACKAGE_mtr=y
CONFIG_PACKAGE_netperf=y
CONFIG_PACKAGE_nlbwmon=y
CONFIG_PACKAGE_ntp-utils=y
CONFIG_PACKAGE_ntpclient=y
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_p910nd=m
# CONFIG_PACKAGE_partx-utils is not set
CONFIG_PACKAGE_pciutils=y
CONFIG_PACKAGE_px5g-standalone=y
CONFIG_PACKAGE_qrencode=y
# CONFIG_PACKAGE_r8169-firmware is not set
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_rrdtool1=y
CONFIG_PACKAGE_sqm-scripts=y
CONFIG_PACKAGE_sqm-scripts-extra=y
CONFIG_PACKAGE_swconfig=y
CONFIG_PACKAGE_sysfsutils=y
CONFIG_PACKAGE_tc=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_tinyproxy=m
CONFIG_PACKAGE_tmux=y
CONFIG_PACKAGE_tune2fs=y
CONFIG_PACKAGE_uclibcxx=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_unbound-anchor=y
CONFIG_PACKAGE_unbound-control=y
CONFIG_PACKAGE_unbound-control-setup=m
CONFIG_PACKAGE_unbound-daemon=y
CONFIG_PACKAGE_unbound-host=m
CONFIG_PACKAGE_usbutils=m
CONFIG_PACKAGE_wget=y
CONFIG_PACKAGE_wireguard=y
CONFIG_PACKAGE_wireguard-tools=y
CONFIG_PACKAGE_wireless-regdb=y
CONFIG_PACKAGE_zlib=y
CONFIG_PACKAGE_zoneinfo-europe=y
CONFIG_PREINITOPT=y
CONFIG_TARGET_EXT4_JOURNAL=y
CONFIG_TARGET_EXT4_RESERVED_PCT=5
CONFIG_TARGET_IMAGES_PAD=y
CONFIG_TARGET_KERNEL_PARTSIZE=8
CONFIG_TARGET_OPTIMIZATION="-Os -pipe -march=btver2 -mtune=btver2"
CONFIG_TARGET_OPTIONS=y
CONFIG_TARGET_PREINIT_BROADCAST="10.0.0.255"
CONFIG_TARGET_PREINIT_IFNAME="10.0.0.1"
CONFIG_TARGET_PREINIT_IP="10.0.0.1"
CONFIG_TARGET_ROOTFS_PARTSIZE=250
# CONFIG_TARGET_ROOTFS_TARGZ is not set
CONFIG_VMDK_IMAGES=y
# CONFIG_LIBCURL_FTP is not set
# CONFIG_OPENSSL_ENGINE is not set

It turns out this has popped up in master already, and it was pointed out 19.07 pointed from the same problem... But that observation was not acted upon.

You need to select CONFIG_PACKAGE_libevent2-pthreads=m

1 Like

Thanks, but that does not fix things. If I need to do that manually, that means the package is broken.

It's missing indeed but the ntpd Makefile should take care of that:

$ grep libevent .config
CONFIG_PACKAGE_libevent2=y
# CONFIG_PACKAGE_libevent2-core is not set
# CONFIG_PACKAGE_libevent2-extra is not set
# CONFIG_PACKAGE_libevent2-openssl is not set
# CONFIG_PACKAGE_libevent2-pthreads is not set

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.