Skip to content

Commit 67294e9

Browse files
author
AppDevForAll
committed
fix(build-static): restore autoreconf -fi in tar/less pre_configure overrides
The static-flags overrides append a second termux_step_pre_configure(); in Bash the last definition wins, so they silently replaced upstream's function and dropped its 'autoreconf -fi'. tar's fix-linking-to-iconv.patch edits src/Makefile.am, so Makefile.in must be regenerated; without autoreconf, make falls back to maintainer-mode 'automake-1.16', which is absent in the new ubuntu:26.04 package-builder image (Automake 1.17) -> build fails on GitHub Actions. Same dropped autoreconf for less. Regenerating with the container's automake is version-independent and does not affect static linking (the -static flags are applied later, at ./configure). No termux-packages/image pin (run on ubuntu:26.04). Refs ADFA-4467
1 parent 64a61c3 commit 67294e9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎tools/proot-builder/build_static.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ termux_step_pre_configure() {
200200
CFLAGS+=" -Wno-error=implicit-function-declaration -Dlchmod=chmod"
201201
export gl_cv_func_lchown_works=yes
202202
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-year2038"
203+
204+
# fix-linking-to-iconv.patch edits src/Makefile.am, so Makefile.in must be
205+
# regenerated. Upstream's tar/build.sh does this in its own pre_configure; this
206+
# override REPLACES that function (Bash: last definition wins), so redo it here
207+
# as the LAST statement. Without it, make falls back to maintainer-mode
208+
# 'automake-1.16', absent in the ubuntu:26.04 builder image (Automake 1.17).
209+
# Safe for static binaries: -static flags above are applied later by
210+
# ./configure; autoreconf only regenerates the build system.
211+
autoreconf -fi
203212
}
204213
EOF
205214

@@ -278,6 +287,11 @@ termux_step_pre_configure() {
278287
mv $TERMUX_PREFIX/lib/libtinfo*.so* $TERMUX_PREFIX/lib/hidden_so/ 2>/dev/null || true
279288
280289
LDFLAGS+=" -static -ffunction-sections -fdata-sections -Wl,--gc-sections"
290+
291+
# Upstream less/build.sh regenerates the build system here; this override
292+
# replaces that function, so redo it (last statement). Same automake-1.16 vs
293+
# ubuntu:26.04 reasoning as tar. Does not affect static linking.
294+
autoreconf -fi
281295
}
282296
termux_step_post_make() {
283297
mv $TERMUX_PREFIX/lib/hidden_so/* $TERMUX_PREFIX/lib/ 2>/dev/null || true

0 commit comments

Comments
 (0)