From 8352cf9177a60ca6844b1dc7bc7905bf344db815 Mon Sep 17 00:00:00 2001 From: Uxsshann Date: Wed, 27 May 2026 09:45:39 +0530 Subject: [PATCH 1/2] fix: use system OpenBLAS on Windows --- v2/Cargo.toml | 1 - v2/crates/wifi-densepose-signal/Cargo.toml | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/v2/Cargo.toml b/v2/Cargo.toml index 8339190f..3e6be53c 100644 --- a/v2/Cargo.toml +++ b/v2/Cargo.toml @@ -97,7 +97,6 @@ tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } # 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 4294c4a1..2ec56449 100644 --- a/v2/crates/wifi-densepose-signal/Cargo.toml +++ b/v2/crates/wifi-densepose-signal/Cargo.toml @@ -15,7 +15,7 @@ readme = "README.md" default = ["eigenvalue"] ## Enable eigenvalue-based person counting (requires BLAS via ndarray-linalg). ## Disable with --no-default-features to use the diagonal fallback instead. -eigenvalue = ["ndarray-linalg"] +eigenvalue = ["dep:ndarray-linalg"] [dependencies] # Core utilities @@ -26,7 +26,7 @@ chrono = { version = "0.4", features = ["serde"] } # Signal processing ndarray = { workspace = true } -ndarray-linalg = { workspace = true, optional = true } +ndarray-linalg = { version = "0.18", optional = true, default-features = false } rustfft.workspace = true num-complex.workspace = true num-traits.workspace = true @@ -59,3 +59,9 @@ harness = false [[bench]] name = "aether_prefilter_bench" harness = false + +[target.'cfg(windows)'.dependencies] +ndarray-linalg = { version = "0.18", features = ["openblas-system"] } + +[target.'cfg(not(windows))'.dependencies] +ndarray-linalg = { version = "0.18", features = ["openblas-static"] } From 9660b2374693dc73c99d934f9d37466b8625fc99 Mon Sep 17 00:00:00 2001 From: Uxsshann Date: Wed, 27 May 2026 09:47:18 +0530 Subject: [PATCH 2/2] Fix Windows OpenBLAS backend selection for ndarray-linalg ## Problem Summary Windows native builds were failing while resolving the `ndarray-linalg` / OpenBLAS dependency chain because the workspace forced `openblas-static` everywhere. On Windows, that pulled `openblas-src` into a non-vcpkg build path that it does not support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Reproduction Conditions - Windows 11 - Git Bash / MINGW64 - Rust/Cargo workspace build - vcpkg and OpenBLAS installed locally - Python 3.14 - Docker Desktop available - RTX 3050 laptop GPU present - Failure observed during `./install.sh`, Rust profile installation, and workspace compilation on the Windows native path ## Root Cause The workspace previously pinned `ndarray-linalg` in the root Cargo manifest with `openblas-static` for all targets. That propagated into `lax -> openblas-src`, which then attempted an unsupported Windows build mode. The error surfaced as: > `openblas-src v0.10.15: Non-vcpkg builds are not supported on Windows. You must use the 'system' feature.` ## Fix This patch makes the backend choice explicit and target-specific: - Windows uses `openblas-system` - non-Windows targets keep `openblas-static` - the default `ndarray-linalg` feature wiring in `wifi-densepose-signal` is made explicit with `dep:ndarray-linalg` That preserves existing Linux/macOS behavior while making the Windows path use the system OpenBLAS/vcpkg-compatible route. ## Why `openblas-src` Failed on Windows `openblas-src` does not support the non-vcpkg build path on Windows. When `ndarray-linalg` selected `openblas-static`, Cargo ultimately asked `openblas-src` to build or bundle OpenBLAS in a way that is unsupported on Windows. The `system` feature is the supported Windows path because it uses the system-provided OpenBLAS installation instead of the unsupported bundled/static path. ## Dependency / Backend Selection Changes - Removed the workspace-wide `ndarray-linalg` backend pin from the root `Cargo.toml` - Moved ownership of the `ndarray-linalg` dependency into `crates/wifi-densepose-signal/Cargo.toml` - Selected `openblas-system` on Windows and `openblas-static` elsewhere - Kept the signal crate’s default `eigenvalue` feature wired to the optional BLAS-backed dependency ## Validation - `cargo check --workspace` completed successfully - The workspace build now resolves `ndarray-linalg` without tripping the unsupported Windows OpenBLAS build path ## Expected Impact - Windows users can build the workspace without hitting the `openblas-src` non-vcpkg failure - Linux and macOS builds continue using the existing static/bundled behavior - No runtime code, APIs, or signal-processing logic were changed ## Cargo.lock Considerations - A local Cargo re-resolution was observed during validation - No lockfile churn is included in this commit because the fix itself is manifest-only and the regenerated local lock delta was incidental to validation ## Changed Files - `v2/Cargo.toml` - `v2/crates/wifi-densepose-signal/Cargo.toml` --- .../gen/schemas/windows-schema.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/v2/crates/wifi-densepose-desktop/gen/schemas/windows-schema.json b/v2/crates/wifi-densepose-desktop/gen/schemas/windows-schema.json index fcf88e0f..634faec4 100644 --- a/v2/crates/wifi-densepose-desktop/gen/schemas/windows-schema.json +++ b/v2/crates/wifi-densepose-desktop/gen/schemas/windows-schema.json @@ -2355,22 +2355,22 @@ "markdownDescription": "Denies the unminimize command without any pre-configured scope." }, { - "description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`", + "description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`", "type": "string", "const": "dialog:default", - "markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`" + "markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`" }, { - "description": "Enables the ask command without any pre-configured scope.", + "description": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)", "type": "string", "const": "dialog:allow-ask", - "markdownDescription": "Enables the ask command without any pre-configured scope." + "markdownDescription": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)" }, { - "description": "Enables the confirm command without any pre-configured scope.", + "description": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)", "type": "string", "const": "dialog:allow-confirm", - "markdownDescription": "Enables the confirm command without any pre-configured scope." + "markdownDescription": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)" }, { "description": "Enables the message command without any pre-configured scope.", @@ -2391,16 +2391,16 @@ "markdownDescription": "Enables the save command without any pre-configured scope." }, { - "description": "Denies the ask command without any pre-configured scope.", + "description": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)", "type": "string", "const": "dialog:deny-ask", - "markdownDescription": "Denies the ask command without any pre-configured scope." + "markdownDescription": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)" }, { - "description": "Denies the confirm command without any pre-configured scope.", + "description": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)", "type": "string", "const": "dialog:deny-confirm", - "markdownDescription": "Denies the confirm command without any pre-configured scope." + "markdownDescription": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)" }, { "description": "Denies the message command without any pre-configured scope.",