From eed8bd27d297b87ab33bde76f7196bfa6ecfc76e Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 2 Nov 2026 19:47:01 -0500 Subject: [PATCH] Packaging: run the cross-built CLI's --version check without the malloc re-exec Co-Authored-By: Claude Opus 5.5 --- packaging/linux/package.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/linux/package.sh b/packaging/linux/package.sh index 8b6cf54abe..519bc850c6 100755 --- a/packaging/linux/package.sh +++ b/packaging/linux/package.sh @@ -208,7 +208,9 @@ fi if [[ -z "${CROSS_TARGET:-}" ]]; then "$STAGE/usr/bin/photocraft-cli" --version elif [[ -n "${EMULATOR:-}" ]]; then - "$EMULATOR" "$STAGE/usr/bin/photocraft-cli" --version + # Set, so malloc_tuning::apply doesn't re-execute the CLI (#8743): under qemu-user that exec goes + # to the host kernel, which can't run a $CROSS_ARCH binary, and glibc then hands it to /bin/sh. + MALLOC_TRIM_THRESHOLD_=131072 "$EMULATOR" "$STAGE/usr/bin/photocraft-cli" --version fi echo "==> done" ls -lh "$DIST"