From 65e8421908068ef8f3e774349e7458b81b5d2955 Mon Sep 17 00:00:00 2001 From: Uxsshann Date: Wed, 11 Nov 2026 11:49:56 -0500 Subject: [PATCH] fix(signal): use system OpenBLAS on Windows for the eigenvalue feature openblas-src rejects its static build on Windows ("Non-vcpkg builds are not supported on Windows"), so a default-feature build of wifi-densepose-signal could not compile there. Declare ndarray-linalg per target: openblas-system on Windows, openblas-static elsewhere. Both stay optional, so --no-default-features still drops BLAS entirely. Ported from #825 by @PretaxE63, keeping the dependency optional (the original made it unconditional, which re-added BLAS to every default-features = false consumer) and dropping an unrelated regenerated Tauri schema. Co-authored-by: Uxsshann Co-Authored-By: claude-flow --- v2/Cargo.toml | 1 - v2/crates/wifi-densepose-signal/Cargo.toml | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/v2/Cargo.toml b/v2/Cargo.toml index 182e638386..c331ff7416 100644 --- a/v2/Cargo.toml +++ b/v2/Cargo.toml @@ -199,7 +199,6 @@ burn-cuda = { version = "0.21", default-features = false, features = ["std"] } # Signal processing ndarray = { version = "0.17", features = ["serde"] } -ndarray-linalg = { version = "0.18", features = ["openblas-static"] } rustfft = "6.1" num-complex = "0.4" num-traits = "0.2" diff --git a/v2/crates/wifi-densepose-signal/Cargo.toml b/v2/crates/wifi-densepose-signal/Cargo.toml index 3e9b7a0870..9317fe7230 100644 --- a/v2/crates/wifi-densepose-signal/Cargo.toml +++ b/v2/crates/wifi-densepose-signal/Cargo.toml @@ -29,7 +29,7 @@ chrono = { version = "0.4", features = ["serde"] } # Signal processing ndarray = { workspace = true } -ndarray-linalg = { workspace = true, optional = true } +# ndarray-linalg (optional, `eigenvalue` feature) is declared per target below. rustfft.workspace = true num-complex.workspace = true num-traits.workspace = true @@ -103,3 +103,14 @@ harness = false [[bin]] name = "calibration_proof_runner" path = "src/bin/calibration_proof_runner.rs" + +# BLAS backend for the optional `eigenvalue` feature (PR #825). +# openblas-src does not support its bundled/static build on Windows +# ("Non-vcpkg builds are not supported on Windows"), so Windows links the +# system/vcpkg OpenBLAS instead. Other targets keep the static build. +# Both stay `optional`: `--no-default-features` still drops BLAS entirely. +[target.'cfg(windows)'.dependencies] +ndarray-linalg = { version = "0.18", optional = true, features = ["openblas-system"] } + +[target.'cfg(not(windows))'.dependencies] +ndarray-linalg = { version = "0.18", optional = true, features = ["openblas-static"] }