Skip to content

The agent that grows with you

fix(termux): upgrade libc++ in the wheelhouse builder so cmake starts

ethernetd6284c675ea8
diff --git a/scripts/termux/termux-builder.Dockerfile b/scripts/termux/termux-builder.Dockerfile
index 95b0918a2af..c6548f5fcd6 100644
--- a/scripts/termux/termux-builder.Dockerfile
+++ b/scripts/termux/termux-builder.Dockerfile
@@ -23,12 +23,16 @@ ENV PREFIX=/data/data/com.termux/files/usr
ENV PATH="${PREFIX}/bin:/usr/bin:/bin"
ENV DEBIAN_FRONTEND=noninteractive
+# libc++ is named on purpose. The base image ships libc++ 29, apt's cmake needs a newer
+# build, and cmake's `Depends: libc++` has no version bound, so apt keeps the old one and
+# cmake fails to start. scikit-build-core then reads that as "no cmake" and compiles one
+# from PyPI source, which dies in its bootstrap (pillow -> pybind11 sdist build).
RUN printf '%s\n' "deb https://packages.termux.dev/apt/termux-main stable main" \
> "${PREFIX}/etc/apt/sources.list" \
&& rm -f "${PREFIX}/etc/apt/sources.list.d/"*.list \
&& (apt update || apt update) \
&& apt install -y \
- clang rust make git patchelf binutils pkg-config protobuf cmake ninja \
+ libc++ clang rust make git patchelf binutils pkg-config protobuf cmake ninja \
autoconf automake libtool \
libandroid-posix-semaphore libandroid-support libbz2 libffi \
libjpeg-turbo libpng freetype libtiff libwebp openjpeg littlecms \
diff --git a/scripts/termux/termux_build.sh b/scripts/termux/termux_build.sh
index 8dc9e82794b..c0b20bd2136 100755
--- a/scripts/termux/termux_build.sh
+++ b/scripts/termux/termux_build.sh
@@ -68,7 +68,9 @@ if [ "${1:-}" = "--in-container" ]; then
rm -f "$PREFIX/etc/apt/sources.list.d"/*.list 2>/dev/null || true
apt update || apt update \
|| fail "apt update failed in the container"
- apt install -y clang rust make git patchelf binutils pkg-config protobuf cmake ninja autoconf automake libtool \
+ # libc++ is named so apt upgrades it: cmake needs a newer one than the base image ships
+ # (see termux-builder.Dockerfile).
+ apt install -y libc++ clang rust make git patchelf binutils pkg-config protobuf cmake ninja autoconf automake libtool \
libandroid-posix-semaphore libandroid-support libbz2 libffi \
libjpeg-turbo libpng freetype libtiff libwebp openjpeg littlecms \
libheif \