run cargo test
i get error of libBLAS (with env of library openblas)
dyld: Library not loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
Referenced from: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
Reason: Incompatible library version: vecLib requires version 1.0.0 or later, but libBLAS.dylib provides version 0.0.0
or error of libvDSP (with env of library of lapack)
dyld: Symbol not found: _cblas_dgemm
Referenced from: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
Expected in: /usr/local/opt/lapack/lib/libBLAS.dylib
in /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
case 2
comment out env of both openblas and lapack in ~/.bash_profile
= note: ld: warning: directory not found for option '-L /usr/local/opt/openblas/lib'
ld: warning: directory not found for option '-L /usr/local/opt/lapack/lib'
ld: library not found for -llapacke
clang: error: linker command failed with exit code 1 (use -v to see invocation)
warning: preprocessing_contrib (lib test) generated 6 warnings (6 duplicates)
error: could not compile preprocessing_contrib due to previous error; 6 warnings emitted
Problem
First, i install
openblas
andlapack
by brewcase 2
openblas
andlapack
in ~/.bash_profilerun
cargo test
i got error compile errorwarning:
preprocessing_contrib
(lib test) generated 6 warnings (6 duplicates) error: could not compilepreprocessing_contrib
due to previous error; 6 warnings emittedCaused by: process didn't exit successfully:
rustc --crate-name preprocessing_contrib --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 --test -C metadata=afa4a0be7d6ff698 -C extra-filename=-afa4a0be7d6ff698 --out-dir /Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps -C incremental=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/incremental -L dependency=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps --extern blas_src=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/libblas_src-9d74ad231a46e048.rlib --extern linfa=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/liblinfa-cb3ffd43d6b8eaa2.rlib --extern linfa_preprocessing=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/liblinfa_preprocessing-0a776c26ed2cfa7f.rlib --extern ndarray=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/libndarray-556145df8dd460d1.rlib --extern openblas_src=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/libopenblas_src-fc8092715b5adcea.rlib '-L /usr/local/opt/openblas/lib' '-L /usr/local/opt/lapack/lib' -L /usr/local/opt/openblas/lib
(exit status: 1)case 3
RUSTFLAGS
in project/.cargo/config.toml runcargo test
i got compile errorwarning:
preprocessing_contrib
(lib test) generated 6 warnings (6 duplicates) error: could not compilepreprocessing_contrib
due to previous error; 6 warnings emittedCaused by: process didn't exit successfully: `rustc --crate-name preprocessing_contrib --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 --test -C metadata=afa4a0be7d6ff698 -C extra-filename=-afa4a0be7d6ff698 --out-dir /Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps -C incremental=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/incremental -L dependency=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps --extern blas_src=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/libblas_src-9d74ad231a46e048.rlib --extern linfa=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/liblinfa-cb3ffd43d6b8eaa2.rlib --extern linfa_preprocessing=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/liblinfa_preprocessing-0a776c26ed2cfa7f.rlib --extern ndarray=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/libndarray-556145df8dd460d1.rlib --extern openblas_src=/Users/frankguo/workspace/rust/preprocessing_contrib/target/debug/deps/libopenblas_src-fc8092715b5adcea.rlib
more information
toolchains
config.toml
project file Cargo.toml
See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] ndarray = { version = "0.14",default-features = false, features = ["blas"] } ndarray-linalg = { version = "0.13", optional = true } blas-src = { version = "0.8", features = ["openblas"] } openblas-src = { version = "0.10", features = ["cblas", "system"] } linfa = {version = "0.4.0", features = ["openblas-system"]} linfa-preprocessing = {version = "0.4.0"}
How can I solve this problem ? How to use crate
openblas-src
link system'sopenblas dynamic library
in rust ?Steps
No response
Possible Solution(s)
No response
Notes
No response
Version