diff --git a/packaging/build_linux.sh b/packaging/build_linux.sh index 5a4cdaccca..61171586a2 100755 --- a/packaging/build_linux.sh +++ b/packaging/build_linux.sh @@ -67,6 +67,27 @@ rm -rf "$GUI/src-tauri/binaries/sidecar" "$GUI/src-tauri/binaries/openworker-ser cp -RL "$HERE/dist/openworker-server" "$GUI/src-tauri/binaries/sidecar" chmod +x "$GUI/src-tauri/binaries/sidecar/openworker-server" +# whisper.cpp (via whisper-rs-sys) compiles its CPU backend during the Rust build below, and +# ggml's default is to tune for the *build host*. That is wrong for a distributable bundle in two +# ways. First, a host-tuned artifact can die with SIGILL on an older user CPU. Second, the feature +# probe trusts flags independently: a clean Ubuntu 24.04 VM here advertised `avx2` but not `fma`, +# ggml enabled its AVX2 path anyway, and the build failed outright on an FMA intrinsic: +# error: inlining failed in call to 'always_inline' '_mm256_fmadd_ps': target specific option mismatch +# Default every feature OFF so the shipped binary runs anywhere; builders who want a host-optimised +# local package can still override any of these from the environment. +export GGML_NATIVE="${GGML_NATIVE:-OFF}" +export GGML_AVX="${GGML_AVX:-OFF}" +export GGML_AVX2="${GGML_AVX2:-OFF}" +export GGML_AVX_VNNI="${GGML_AVX_VNNI:-OFF}" +export GGML_AVX512="${GGML_AVX512:-OFF}" +export GGML_AVX512_VBMI="${GGML_AVX512_VBMI:-OFF}" +export GGML_AVX512_VNNI="${GGML_AVX512_VNNI:-OFF}" +export GGML_AVX512_BF16="${GGML_AVX512_BF16:-OFF}" +export GGML_BMI2="${GGML_BMI2:-OFF}" +export GGML_F16C="${GGML_F16C:-OFF}" +export GGML_FMA="${GGML_FMA:-OFF}" +export GGML_SSE42="${GGML_SSE42:-OFF}" + echo "==> [3/3] tauri build (--bundles $BUNDLES)" # Auto-update artifacts (.deb/.AppImage + minisign .sig): produced only when the updater # signing key is available — from the env (CI secret TAURI_SIGNING_PRIVATE_KEY), or from