openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.48k forks source link

ntpd: fails to compile in master #24918

Closed bluecmd closed 1 month ago

bluecmd commented 2 months ago

Maintainer: @ffontaine @hauke @knthm Environment: any arch, master

Description: Building a clean OpenWrt for e.g. x86 at commit decd5e0cff5efc666327714e5b83b11ceb52b93e and packages feed at f9b1adf19d4b71f799a474537a6adbf45b8263b6 fails with:

    ERROR: package/feeds/packages/ntpd failed to build.

The actual error is:

make world V=sc
[..]
checking for library containing inet_pton... none required
checking for library containing inet_ntop... none required
checking for library containing setsockopt... none required
checking for recvmsg... yes
checking for inline... inline
checking size of time_t... 0
checking whether char is unsigned... yes
checking size of signed char... 0
checking for s_char... no
checking for long long... no
checking size of short... (cached) 2
checking size of int... (cached) 4
checking size of long... (cached) 4
configure: error: No way to specify a signed character!
make[6]: *** [Makefile:717: config.status] Error 1
make[6]: Leaving directory '/home/bluecmd/openwrt-clean/build_dir/target-i386_pentium4_musl/ntp-4.2.8p17/sntp'
make[5]: *** [Makefile:665: all-recursive] Error 1
make[5]: Leaving directory '/home/bluecmd/openwrt-clean/build_dir/target-i386_pentium4_musl/ntp-4.2.8p17'
make[4]: *** [Makefile:597: all] Error 2
make[4]: Leaving directory '/home/bluecmd/openwrt-clean/build_dir/target-i386_pentium4_musl/ntp-4.2.8p17'
make[3]: *** [Makefile:162: /home/bluecmd/openwrt-clean/build_dir/target-i386_pentium4_musl/ntp-4.2.8p17/.built] Error 2
make[3]: Leaving directory '/home/bluecmd/openwrt-clean/feeds/packages/net/ntpd'
time: package/feeds/packages/ntpd/compile#2.53#1.58#3.97
    ERROR: package/feeds/packages/ntpd failed to build.
make[2]: *** [package/Makefile:177: package/feeds/packages/ntpd/compile] Error 1
make[2]: Leaving directory '/home/bluecmd/openwrt-clean'
make[1]: *** [package/Makefile:171: /home/bluecmd/openwrt-clean/staging_dir/target-i386_pentium4_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/bluecmd/openwrt-clean'
make: *** [/home/bluecmd/openwrt-clean/include/toplevel.mk:248: world] Error 2

A somewhat minimal diffconfig to test with:

CONFIG_TARGET_x86=y
CONFIG_TARGET_x86_generic=y
CONFIG_TARGET_x86_generic_DEVICE_generic=y
CONFIG_OPENSSL_ENGINE=y
CONFIG_OPENSSL_OPTIMIZE_SPEED=y
CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=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_ERROR_MESSAGES=y
CONFIG_OPENSSL_WITH_IDEA=y
CONFIG_OPENSSL_WITH_MDC2=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SEED=y
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_OPENSSL_WITH_SSE2=y
CONFIG_OPENSSL_WITH_TLS13=y
CONFIG_OPENSSL_WITH_WHIRLPOOL=y
CONFIG_PACKAGE_libcap=y
CONFIG_PACKAGE_libevent2-core=y
CONFIG_PACKAGE_libevent2-pthreads=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_ntp-utils=y
CONFIG_PACKAGE_ntpd=y

This happens on Octeon and x86_64 as well which is how I detected it.

Full config.log attached: config.log

Possibly cause by this error?


conftest.c:57:18: error: 'long long long' is too long for GCC
   57 | #define intmax_t long long int
      |                  ^~~~
conftest.c:57:23: error: 'long long long' is too long for GCC
   57 | #define intmax_t long long int
      |                       ^~~~
conftest.c:58:19: error: duplicate 'unsigned'
   58 | #define uintmax_t unsigned long long int
      |                   ^~~~~~~~
conftest.c:58:28: error: 'long long long' is too long for GCC
   58 | #define uintmax_t unsigned long long int
      |                            ^~~~
conftest.c:58:33: error: 'long long long' is too long for GCC
   58 | #define uintmax_t unsigned long long int
      |                                 ^~~~
bluecmd commented 2 months ago

Repro steps from my bash history:

git clone https://github.com/openwrt/openwrt/ openwrt-clean
cd openwrt-clean/
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig  # change nothing except adding PACKAGE_ntpd=y
./scripts/diffconfig.sh > diffconfig
make -j$(nproc) defconfig download clean world 
make world V=sc
bluecmd commented 2 months ago

FWIW, I think this was fine at openwrt 607697fa4b8c43926a9983ee952b64aa249a3302 and/or openwrt/packages a month or so ago. I don't have full history of my builds, but this started happening when I rebased upon master yesterday from having taken a break of rebasing for a few months.

nxhack commented 2 months ago

The same goes for me.

The workaround I found is to remove 'PKG_FIXUP:=autoreconf' from the Makefile.

https://github.com/openwrt/openwrt/commit/c364cb8e469f9a7de1ed8960163c90e26b2df1ad

ynezz commented 1 month ago

I've just build from scratch tree on commit a1c7f794da57 ("mt76: update to Git HEAD (2024-09-05)") using Ubuntu 22.04 container with following configuration:

CONFIG_TARGET_mediatek=y
CONFIG_TARGET_mediatek_filogic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r3=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_filogic_DEVICE_bananapi_bpi-r3=""
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r3-mini=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_filogic_DEVICE_bananapi_bpi-r3-mini=""
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r4=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_filogic_DEVICE_bananapi_bpi-r4=""
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r4-poe=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_filogic_DEVICE_bananapi_bpi-r4-poe=""
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openwrt_one=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_filogic_DEVICE_openwrt_one=""
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_zyxel_nwa50ax-pro=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_filogic_DEVICE_zyxel_nwa50ax-pro=""
CONFIG_DEVEL=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_FEED_packages is not set
CONFIG_PACKAGE_ntpd=y

and I'm able to reproduce it.