From a36634c4b447d843bbb27126fda912d801e54d84 Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Fri, 13 Feb 2026 10:04:18 -0800 Subject: [PATCH] Fixed CI runner failure when executing tests --- Makefile | 2 -- vendor/vectorscan-rs/vectorscan-rs-sys/build.rs | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 005f7d7..3067d5c 100644 --- a/Makefile +++ b/Makefile @@ -143,8 +143,6 @@ ubuntu-x64: setup-zig # ensures Zig & cargo-zigbuild exist @. $$HOME/.cargo/env && \ rustup target add x86_64-unknown-linux-musl && \ export PKG_CONFIG_ALLOW_CROSS=1 && \ - export CFLAGS_x86_64_unknown_linux_musl="-DHAVE_UNISTD_H=1 -DHAVE_POSIX_MEMALIGN=1" && \ - export CXXFLAGS_x86_64_unknown_linux_musl="-DHAVE_UNISTD_H=1 -DHAVE_POSIX_MEMALIGN=1" && \ cargo zigbuild --release --target x86_64-unknown-linux-musl @echo "🗜️ Packaging archive …" diff --git a/vendor/vectorscan-rs/vectorscan-rs-sys/build.rs b/vendor/vectorscan-rs/vectorscan-rs-sys/build.rs index 9708caf..24efe33 100644 --- a/vendor/vectorscan-rs/vectorscan-rs-sys/build.rs +++ b/vendor/vectorscan-rs/vectorscan-rs-sys/build.rs @@ -262,6 +262,16 @@ fn main() { .define("BUILD_SVE2_BITPERM", "OFF"); } + // Under cargo-zigbuild for x86_64-unknown-linux-musl, Vectorscan's + // configure-time probes can incorrectly miss posix_memalign/unistd. + // Scope this workaround to musl targets only to avoid impacting + // unrelated native dependencies. + let target = env("TARGET"); + if target.ends_with("-musl") { + cfg.define("HAVE_UNISTD_H", "1") + .define("HAVE_POSIX_MEMALIGN", "1"); + } + let dst = cfg.build(); println!("cargo:rustc-link-lib=static=hs"); println!("cargo:rustc-link-search={}", dst.join("lib").display());