Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3655 - autoconf-lean causes variating breakage at buildbot and private buildhosts #8738

Closed
openwrt-bot opened this issue Mar 1, 2021 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

hnyman:

autoconf-lean stuff from Felix was merged by Daniel a few days ago to master with commits
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=32c664ff02910bf39a3fbd5a5a4a8bff3191dd03 and
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=f439e291304a93b982e912dc91b80ca950a594f3

That seems to cause buildhost-specific variation in the generated site config files, and causes variating breakage from some packages.

I stumbled upon this on weekend with ntfs-3g, which suddenly does not compile in my Ubuntu 20.10 in Virtualbox. I filed a bug about ntfs-3g to packages feed, but this is more generic:
openwrt/packages#14940

The same buildhost builds 21.02 without problems (and that is still pretty identical to master regarding packages)

Reverting autoconf-lean commits fixes things for me.

There are now others with the same symptoms, based on responses to the packages feed bug.

Buildbot is now meeting the same problem. At least ntfs-3g, rsync, nedata, and possibly also mac80211 and mwlwifi are failing for some targets with some buildhosts (with the new SDK).

E.g.
https://downloads.openwrt.org/snapshots/faillogs/aarch64_cortex-a72/packages/ntfs-3g/compile.txt

OpenWrt-libtool: compile: aarch64-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -I../include/fuse-lite -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/include -I../include/ntfs-3g -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/ntfs-3g-2017.3.23-4-fuseint=ntfs-3g-2017.3.23-4-fuseint -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wall -MT libntfs_3g_la-ioctl.lo -MD -MP -MF .deps/libntfs_3g_la-ioctl.Tpo -c ioctl.c -fPIC -DPIC -o .libs/libntfs_3g_la-ioctl.o ioctl.c: In function 'fstrim_limits': ioctl.c:164:3: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration] major(statbuf.st_rdev), minor(statbuf.st_rdev)); ^~~~~ ioctl.c:164:27: warning: implicit declaration of function 'minor'; did you mean 'mknod'? [-Wimplicit-function-declaration] major(statbuf.st_rdev), minor(statbuf.st_rdev)); ^~~~~ mknod ... .libs/ntfsfix ntfsfix.o utils.o -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/usr/lib -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/lib ../libntfs-3g/.libs/libntfs-3g.so -lc /builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/bin/../lib/gcc/aarch64-openwrt-linux-musl/8.4.0/../../../../aarch64-openwrt-linux-musl/bin/ld: ../libntfs-3g/.libs/libntfs-3g.so: undefined reference to `minor' /builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/bin/../lib/gcc/aarch64-openwrt-linux-musl/8.4.0/../../../../aarch64-openwrt-linux-musl/bin/ld: ../libntfs-3g/.libs/libntfs-3g.so: undefined reference to `major' collect2: error: ld returned 1 exit status Makefile:939: recipe for target 'ntfsfix' failed make[6]: *** [ntfsfix] Error 1 make[6]: Leaving directory '/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/ntfs-3g-2017.3.23-4-fuseint/ntfsprogs' Makefile:504: recipe for target 'all-recursive' failed make[5]: *** [all-recursive] Error 1

https://downloads.openwrt.org/snapshots/faillogs/aarch64_cortex-a72/packages/rsync/compile.txt

flist.c: In function 'send_file_entry':
flist.c:438:16: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
if ((uint32)major(rdev) == rdev_major)
^~~~~
flist.c:442:41: warning: implicit declaration of function 'minor'; did you mean 'mknod'? [-Wimplicit-function-declaration]
if (protocol_version < 30 && (uint32)minor(rdev) <= 0xFFu)
^~~~~
mknod
In file included from flist.c:23:
rsync.h:479:36: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration]
#define MAKEDEV(devmajor,devminor) makedev(devmajor,devminor)
^~~~~~~
flist.c:451:11: note: in expansion of macro 'MAKEDEV'
rdev = MAKEDEV(rdev_major, 0);
^~~~~~~
...
generator.c:(.text+0x4654): undefined reference to makedev' /builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/bin/../lib/gcc/aarch64-openwrt-linux-musl/8.4.0/../../../../aarch64-openwrt-linux-musl/bin/ld: hlink.o: in function maybe_hard_link':
hlink.c:(.text+0x30c): undefined reference to `makedev'
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'rsync' failed
make[4]: *** [rsync] Error 1

https://downloads.openwrt.org/snapshots/faillogs/arm_cortex-a9/packages/netdata/compile.txt

collectors/proc.plugin/proc_diskstats.c: In function 'get_disk_name_from_path':
collectors/proc.plugin/proc_diskstats.c:393:16: error: called object 'major' is not a function or function pointer
if(major(sb.st_rdev) != major || minor(sb.st_rdev) != minor) {
^~~~~
collectors/proc.plugin/proc_diskstats.c:318:109: note: declared here
static inline int get_disk_name_from_path(const char *path, char *result, size_t result_size, unsigned long major, unsigned long minor, char *disk, char *prefix, int depth) {
~~~~~~~~~~~~~~^~~~~
collectors/proc.plugin/proc_diskstats.c:393:46: error: called object 'minor' is not a function or function pointer
if(major(sb.st_rdev) != major || minor(sb.st_rdev) != minor) {
^~~~~
collectors/proc.plugin/proc_diskstats.c:318:130: note: declared here
static inline int get_disk_name_from_path(const char *path, char *result, size_t result_size, unsigned long major, unsigned long minor, char *disk, char *prefix, int depth) {
~~~~~~~~~~~~~~^~~~~
Makefile:4684: recipe for target 'collectors/proc.plugin/proc_diskstats.o' failed
make[6]: *** [collectors/proc.plugin/proc_diskstats.o] Error 1
make[6]: Leaving directory '/store/buildbot/slave/shared-workdir/build/sdk/build_dir/target-arm_cortex-a9_musl_eabi/netdata-1.29.2'
Makefile:5366: recipe for target 'all-recursive' failed
make[5]: *** [all-recursive] Error 1

I propose to revert autoconf-lean until either the failing packages are somehow fixed, or the somehow faulty feature/header indicators in the auconf are fixed.

@openwrt-bot
Copy link
Author

bkuhls:

autoconf-lean also produces problems here:
ccache_cc -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -L/home/bernd/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-10.2.0_glibc/usr/lib -L/home/bernd/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-10.2.0_glibc/lib -o test test.o -lxnet -lutil -lrt -lresolv -lpthread -lm -ldl -lcrypt
/home/bernd/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-10.2.0_glibc/lib/gcc/x86_64-openwrt-linux-gnu/10.2.0/../../../../x86_64-openwrt-linux-gnu/bin/ld: cannot find -lxnet
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:389: test] Error 1
make[5]: Leaving directory '/home/bernd/openwrt/openwrt/build_dir/toolchain-x86_64_gcc-10.2.0_glibc/autoconf-lean-2012-09-01-bd812069/config-site-generator'

This patch fixes the problem
--- a/toolchain/autoconf-lean/config.site
+++ b/toolchain/autoconf-lean/config.site
@@ -1576,7 +1576,6 @@ ac_cv_lib_resolv_main=${ac_cv_lib_resolv_main=yes}
ac_cv_lib_rt_main=${ac_cv_lib_rt_main=yes}
ac_cv_lib_socket_main=${ac_cv_lib_socket_main=no}
ac_cv_lib_util_main=${ac_cv_lib_util_main=yes}
-ac_cv_lib_xnet_main=${ac_cv_lib_xnet_main=yes}
ac_cv_member_struct_dirent_d_ino=${ac_cv_member_struct_dirent_d_ino=yes}
ac_cv_member_struct_dirent_d_type=${ac_cv_member_struct_dirent_d_type=yes}
ac_cv_member_struct_stat_st_blocks=${ac_cv_member_struct_stat_st_blocks=yes}

but the build errors continue with other packages:, here with dropbear
:(.text+0x833): undefined reference to strlcpy' <artificial>:(.text.startup+0xfce): undefined reference to strlcat'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant