openblas-src
openblas-src copied to clipboard
Openblas-src fails to compile on Windows
Self-contained examples:
https://github.com/acgetchell/rust-lapack/actions/runs/5255185673/jobs/9494761522#step:4:178
https://github.com/acgetchell/rust-blas/actions/runs/5251640672/jobs/9486785353#step:4:178
Error message:
Compiling openblas-src v0.10.8
Running `rustc --crate-name build_script_build --edition=2018 C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openblas-src-0.10.8\build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no --cfg "feature=\"cblas\"" --cfg "feature=\"default\"" --cfg "feature=\"lapacke\"" -C metadata=7c3e534e6bdefbdc -C extra-filename=-7c3e534e6bdefbdc --out-dir D:\a\rust-blas\rust-blas\target\debug\build\openblas-src-7c3e534e6bdefbdc -L dependency=D:\a\rust-blas\rust-blas\target\debug\deps --extern dirs=D:\a\rust-blas\rust-blas\target\debug\deps\libdirs-78c0907c5cd4a510.rlib --extern openblas_build=D:\a\rust-blas\rust-blas\target\debug\deps\libopenblas_build-e342eaca75b6d864.rlib --extern vcpkg=D:\a\rust-blas\rust-blas\target\debug\deps\libvcpkg-d90afdd57114e126.rlib --cap-lints allow -L native=C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.42.2\lib -L native=C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.48.0\lib`
Running `D:\a\rust-blas\rust-blas\target\debug\build\openblas-src-7c3e534e6bdefbdc\build-script-build`
error: failed to run custom build command for `openblas-src v0.10.8`
Caused by:
process didn't exit successfully: `D:\a\rust-blas\rust-blas\target\debug\build\openblas-src-7c3e534e6bdefbdc\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Non-vcpkg builds are not supported on Windows. You must use the 'system' feature.', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openblas-src-0.10.8\build.rs:103:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 1.
Also discussed here:
https://github.com/blas-lapack-rs/blas/issues/39
My next attempt uses vcpkg
to build OpenBLAS ahead of time, and then use this package with the system
feature.
https://github.com/acgetchell/rust-blas/blob/main/.github/workflows/windows.yml
As suggested by:
https://github.com/acgetchell/rust-blas/actions/runs/5285947746/jobs/9564907076#step:7:133