summaryrefslogtreecommitdiff
path: root/tools/rockboxdev.sh
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2024-08-26 15:03:21 +0100
committerAidan MacDonald <amachronic@protonmail.com>2024-08-26 16:44:42 +0100
commitec8fb871f0e1ef72c1f3f84f689d17d5978b6ca9 (patch)
treefbecb659c5371838ac7b36369a9bcb848f464d88 /tools/rockboxdev.sh
parenteca00638aeab59cf03287b9f298c86a6de1b5a9a (diff)
downloadrockbox-ec8fb871f0e1ef72c1f3f84f689d17d5978b6ca9.tar.gz
rockbox-ec8fb871f0e1ef72c1f3f84f689d17d5978b6ca9.zip
rockboxdev: fix glib compile error on hosts with Python 3.12 (FS#13471)
On hosts running Python 3.12, building the hosted MIPS toolchain fails on glib with the error Traceback (most recent call last): File "<string>", line 2, in <module> ModuleNotFoundError: No module named 'imp' gmake[6]: *** [Makefile:982: install-codegenPYTHON] Error 1 gmake[6]: Leaving directory '/tmp/rbdev-build/build-glib-2.46.2/gio/gdbus-2.0/codegen' due to 'imp' being removed from Python 3.12 after a long deprecation period. The module is imported by automake's py-compile script, but in newer versions of automake this has been updated to use 'importlib' instead, so running autoreconf fixes this. We need to patch m4macros/glib-gettext.m4 to avoid an error running autoreconf (see: https://gitlab.gnome.org/GNOME/glib/-/issues/1159): ac-wrapper: autoreconf: warning: auto-detected versions not found ( 2.69 2.69); falling back to latest available autoreconf-2.71: export WARNINGS= autoreconf-2.71: Entering directory '.' autoreconf-2.71: configure.ac: not using Gettext autoreconf-2.71: running: aclocal --force -I m4macros ${ACLOCAL_FLAGS} am-wrapper: aclocal: warning: auto-detected versions not found (1.15); falling back to latest available m4macros/glib-gettext.m4:39: error: m4_copy: won't overwrite defined macro: glib_DEFUN m4macros/glib-gettext.m4:39: the top level autom4te-2.71: error: /usr/bin/m4 failed with exit status: 1 aclocal-1.16: error: /usr/bin/autom4te-2.71 failed with exit status: 1 autoreconf-2.71: error: aclocal failed with exit status: 1 This problem goes away in glib 2.47.5 when they switched to using upstream gettext. Change-Id: I878a9d7086d17c6de43470b6e5f14917f0ae1bb9
Diffstat (limited to 'tools/rockboxdev.sh')
-rwxr-xr-xtools/rockboxdev.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 63b1a1f5a1..f8e9ab2140 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -378,8 +378,14 @@ buildtool() {
378 $config_opt 378 $config_opt
379 elif [ "$config_opt" != "NO_CONFIGURE" ]; then 379 elif [ "$config_opt" != "NO_CONFIGURE" ]; then
380 echo "ROCKBOXDEV: $toolname/configure" 380 echo "ROCKBOXDEV: $toolname/configure"
381 cflags='-U_FORTIFY_SOURCE -fgnu89-inline -O2'
382 if [ "$tool" == "glib" ]; then
383 run_cmd "$logfile" sed -i -e 's/m4_copy/m4_copy_force/g' "$cfg_dir/m4macros/glib-gettext.m4"
384 run_cmd "$logfile" autoreconf -fiv "$cfg_dir"
385 cflags="$cflags -Wno-format-nonliteral -Wno-format-overflow"
386 fi
381 # NOTE glibc requires to be compiled with optimization 387 # NOTE glibc requires to be compiled with optimization
382 CFLAGS='-U_FORTIFY_SOURCE -fgnu89-inline -O2' CXXFLAGS="$CXXFLAGS" run_cmd "$logfile" \ 388 CFLAGS="$cflags" CXXFLAGS="$CXXFLAGS" run_cmd "$logfile" \
383 "$cfg_dir/configure" "--prefix=$prefix" \ 389 "$cfg_dir/configure" "--prefix=$prefix" \
384 --disable-docs $config_opt 390 --disable-docs $config_opt
385 fi 391 fi