From 380e042e44eabbacab7a07a81c839b7c9df532ae Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Mon, 24 Aug 2026 05:15:53 +0200 Subject: [PATCH] build.sh: FP6IMG_NO_CROSSDIRECT=1 escape hatch for local builds crossdirect's /native bridge breaks under local podman (cc: cannot execute cc1: posix_spawnp ENOENT in meson setup) while qemu-only builds work fine; the env flag routes the affected packages (libqmi/MM/libcamera + a new explicit imsd pre-build, since install has no per-package flag) through --no-cross. Identical package output, slower build; kernel stays cross-native. CI behavior unchanged when the env is unset. Co-Authored-By: Claude Fable 5 --- build.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 27d5dfc..4dc613b 100755 --- a/build.sh +++ b/build.sh @@ -226,16 +226,29 @@ pmbootstrap checksum libqmi pmbootstrap checksum modemmanager pmbootstrap checksum libcamera +# FP6IMG_NO_CROSSDIRECT=1: for local (podman) environments where +# crossdirect's /native bridge breaks ("cc: cannot execute cc1: +# posix_spawnp: No such file or directory" during meson setup); the +# affected packages then build qemu-only — slower, identical output. The +# kernel is unaffected either way (cross-native, no crossdirect). +NOCROSS=${FP6IMG_NO_CROSSDIRECT:+--no-cross} + # pmbootstrap's install-time build plan is not dependency-ordered (it tried # building modemmanager before the libqmi its makedepends require); build # the GNSS stack bottom-up explicitly. 'pmbootstrap build' is a no-op when # the package is already current. -retry "build libqmi" pmbootstrap build --arch aarch64 libqmi -retry "build modemmanager" pmbootstrap build --arch aarch64 modemmanager +retry "build libqmi" pmbootstrap $NOCROSS build --arch aarch64 libqmi +retry "build modemmanager" pmbootstrap $NOCROSS build --arch aarch64 modemmanager # libcamera is no makedepend of anything here - build it explicitly so the # patched -r2 exists for the publish step even if the install set resolves # it before the overlay is considered. -retry "build libcamera" pmbootstrap build --arch aarch64 libcamera +retry "build libcamera" pmbootstrap $NOCROSS build --arch aarch64 libcamera +# imsd is the one crossdirect build left to the install phase, which has no +# per-package flag — pre-build it here in no-crossdirect mode so install +# finds it current. +if [ -n "$NOCROSS" ]; then + retry "build imsd" pmbootstrap $NOCROSS build --arch aarch64 imsd +fi # --- 4. build the image ------------------------------------------------------- # Same default credentials as the official postmarketOS images.