Skip to content

Fix Windows OpenBLAS backend selection for ndarray-linalg - #825

Closed
PretaxE63 wants to merge 2 commits into
ruvnet:mainfrom
PretaxE63:fix/windows-openblas-system-backend
Closed

PretaxE63 wants to merge 2 commits into
ruvnet:mainfrom
PretaxE63:fix/windows-openblas-system-backend

Conversation

@PretaxE63

Copy link
Copy Markdown
Contributor

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.

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

PretaxE63 added 2 commits May 27, 2026 09:45
## 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.

## 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`
@PretaxE63
PretaxE63 marked this pull request as ready for review May 27, 2026 04:20
Copilot AI review requested due to automatic review settings May 27, 2026 04:20
ruvnet added a commit that referenced this pull request Nov 11, 2026
#2530)

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 <usattha@gmail.com>
@ruvnet

ruvnet commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Thank you @PretaxE63 for tracking this down and for the clear write-up. The Windows fix was still needed on main, so it has landed as #2530 (merged as 48f8091), with your commit authorship and a Co-authored-by trailer preserved.

It is not merged verbatim for one reason: the target-specific ndarray-linalg entries were non-optional, so cargo tree -p wifi-densepose-signal --no-default-features -i ndarray-linalg found it on both Windows and Linux (main finds nothing). That would have put BLAS back into every default-features = false consumer (sensing-server, cli, mat, train, the python wheel) and undone #366/#415. #2530 keeps both target entries optional = true. The Linux feature graphs are byte-identical to main, --no-default-features has no BLAS on either target, and only the Windows default graph changes from openblas-static to openblas-system. The unrelated regenerated Tauri schema hunk was dropped. Closing in favour of #2530.

@ruvnet ruvnet closed this Nov 11, 2026
github-actions Bot pushed a commit to lucidiousgibs/RuView that referenced this pull request Nov 12, 2026
…igenvalue feature (ruvnet#2530)

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 ruvnet#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 <usattha@gmail.com> 48f8091
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants