Glib2 update causes build failure on macos for irqbalance

Since https://github.com/openwrt/packages/commit/1e2f4f1bf7d5b5851ff2a569b8305ec26ed08769 I am unable to get a complete build if I have language support disabled (.config # CONFIG_BUILD_NLS is not set)

Reverting the above mentioned commit allows a build to complete.

This is under macos so I appreciate a limited audience for this issue.

nWrt-libtool: link: ccache_cc -I/Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/include/glib-2.0 -I/Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/lib/glib-2.0/include -I/Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/include -O2 -pipe -march=btver2 -fno-caller-saves -fno-plt -march=btver2 -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -I/Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/lib/libiconv-stub/include -fmacro-prefix-map=/Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/irqbalance-1.9.0=irqbalance-1.9.0 -Wformat -Werror=format-security -DPIC -fpic -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wl,-rpath-link=/Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/lib/libiconv-stub/lib -DPIC -fpic -specs=/Volumes/CaseSense/wrt/include/hardened-ld-pie.specs -znow -zrelro -o irqbalance activate.o bitmap.o classify.o cputree.o irqbalance.o irqlist.o numa.o placement.o procinterrupts.o -Wl,-rpath-link=/Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/lib/libiconv-stub/lib  -L/Volumes/CaseSense/wrt/staging_dir/toolchain-x86_64_gcc-12.1.0_musl/usr/lib -L/Volumes/CaseSense/wrt/staging_dir/toolchain-x86_64_gcc-12.1.0_musl/lib -L/Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/lib/libiconv-stub/lib /Volumes/CaseSense/wrt/staging_dir/target-x86_64_musl/usr/lib/libglib-2.0.a -liconv -lm
/Volumes/CaseSense/wrt/staging_dir/toolchain-x86_64_gcc-12.1.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.1.0/../../../../x86_64-openwrt-linux-musl/bin/ld: /Volumes/CaseSense/wrt/tmp/ccyjgQ3w.ltrans0.ltrans.o: in function `glib_gettext':
<artificial>:(.text+0x751c): undefined reference to `g_libintl_dgettext'
/Volumes/CaseSense/wrt/staging_dir/toolchain-x86_64_gcc-12.1.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.1.0/../../../../x86_64-openwrt-linux-musl/bin/ld: <artificial>:(.text+0x7546): undefined reference to `g_libintl_bindtextdomain'
/Volumes/CaseSense/wrt/staging_dir/toolchain-x86_64_gcc-12.1.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.1.0/../../../../x86_64-openwrt-linux-musl/bin/ld: <artificial>:(.text+0x7556): undefined reference to `g_libintl_bind_textdomain_codeset'
/Volumes/CaseSense/wrt/staging_dir/toolchain-x86_64_gcc-12.1.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.1.0/../../../../x86_64-openwrt-linux-musl/bin/ld: <artificial>:(.text+0x759b): undefined reference to `g_libintl_textdomain'
/Volumes/CaseSense/wrt/staging_dir/toolchain-x86_64_gcc-12.1.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.1.0/../../../../x86_64-openwrt-linux-musl/bin/ld: <artificial>:(.text+0x75ab): undefined reference to `g_libintl_gettext'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:565: irqbalance] Error 1
make[5]: Leaving directory '/Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/irqbalance-1.9.0'
make[4]: *** [Makefile:652: all-recursive] Error 1
make[4]: Leaving directory '/Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/irqbalance-1.9.0'
make[3]: *** [Makefile:461: all] Error 2
make[3]: Leaving directory '/Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/irqbalance-1.9.0'
make[2]: *** [Makefile:83: /Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/irqbalance-1.9.0/.built] Error 2
make[2]: Leaving directory '/Volumes/CaseSense/wrt/feeds/packages/utils/irqbalance'
time: package/feeds/packages/irqbalance/compile#10.64#3.82#16.57
    ERROR: package/feeds/packages/irqbalance failed to build.
make[1]: *** [package/Makefile:116: package/feeds/packages/irqbalance/compile] Error 1
make[1]: Leaving directory '/Volumes/CaseSense/wrt'
make: *** [/Volumes/CaseSense/wrt/include/toplevel.mk:230: package/irqbalance/compile] Error 2

See PR from @neheb

I've applied that PR and the referenced patch...which gets irqbalance building, now python3 fails aaarrghhhhh :slight_smile:

# Adding the lib-dynload folder (even just empty) suppresses 2 warnings when starting Python
install -d -m0755 /Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/Python-3.10.5/ipkg-x86_64/libpython3/usr/lib/python3.10/lib-dynload/
cp -fpR /Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/Python-3.10.5/ipkg-install/usr/lib/libpython3.10.so* /Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/Python-3.10.5/ipkg-x86_64/libpython3/usr/lib/
find /Volumes/CaseSense/wrt/build_dir/target-x86_64_musl/Python-3.10.5/ipkg-x86_64/libpython3 -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package libpython3 is missing dependencies for the following libraries:
libintl.so.8
make[2]: *** [Makefile:399: /Volumes/CaseSense/wrt/bin/packages/x86_64/packages/libpython3-3.10_3.10.5-1_x86_64.ipk] Error 1
make[2]: Leaving directory '/Volumes/CaseSense/wrt/feeds/packages/lang/python/python3'
time: package/feeds/packages/python3/compile#38.91#39.59#92.33
    ERROR: package/feeds/packages/python3 failed to build.
make[1]: *** [package/Makefile:116: package/feeds/packages/python3/compile] Error 1
make[1]: Leaving directory '/Volumes/CaseSense/wrt'
make: *** [/Volumes/CaseSense/wrt/include/toplevel.mk:230: package/python3/compile] Error 2

Funny thing about that is that the Makefile has logic in there to avoid that libintl dependency on macOS. I would post an issue.

I wonder why it shows up now though. Python does not use glib2 in any way. Maybe it's from the transition to python 10 that this broke and nobody has seen it since then...