ndarray-vision icon indicating copy to clipboard operation
ndarray-vision copied to clipboard

Error: linking with `link.exe` failed: exit code: 1120

Open RahulDas-dev opened this issue 3 years ago • 5 comments

Hi ,

I copy & paste the Example code provided in here and then did cargo run . Found Following Error error: linking with link.exe failed: exit code: 1120

MY Cargo.toml image

Error Screen Shot image

Here is the complete error Log nd-array-vision-error.txt

Rust Version - rustc 1.57.0 (f1edd0429 2021-11-29) Cargo Version - cargo 1.57.0 (b2e52d7ca 2021-10-21) Operating System -Windows, version 10.0.19042 X64

I would greatly appreciate your assistance if I am missing something.

RahulDas-dev avatar Dec 22 '21 18:12 RahulDas-dev

So it looks like you need to select a blas backend for ndarray-linalg (or disable the transform feature which is the only module that pulls it in).

You should be able to do this (provided I'm correct about cargo feature resolution by adding one of the following features to ndarray-vision: ndarray-linalg/netlib, ndarray-linalg/openblas, ndarray-linalg/intel-mkl. You can also add -static or -system as a suffix to any of those options if you want to statically link or have a system version installed already.

I think before I had intelmkl as default but it caused issue for some users on different operating systems - though maybe there's some benefit to adding them as top level features for ndarray-vision and documenting more (I'll do it or a PR would be appreciated :grin: )

xd009642 avatar Dec 22 '21 19:12 xd009642

Definitely I will Raise a PR.

RahulDas-dev avatar Dec 23 '21 14:12 RahulDas-dev

Hi I am testing your Suggestion , But Faceing This new Error image Complete log is here nd-array-vision-error.txt

this is the PR I submited.

here is the code base for testing the PR

my Cargo.toml

[dependencies]
ndarray = "0.15.4"
ndarray-vision = { git = "https://github.com/RahulDas-dev/ndarray-vision", branch = "master", features=["intel-mkl"] }

RahulDas-dev avatar Dec 28 '21 10:12 RahulDas-dev

Ah if you look at the ndarray-vision Cargo.toml there's this part in dev dependencies for the same Ok error, it seems anyhow is part of the public API and had some sort of breaking change:

# it is a dependency of intel-mkl-tool, we pin it to temporary solve
# https://github.com/rust-math/intel-mkl-src/issues/68
anyhow = "<1.0.49"

Also I saw the PR, I'll try and find some time to have a look later today :smile:

xd009642 avatar Dec 28 '21 11:12 xd009642

Thanks , It worked I added anyhow = "<1.0.49" in my Cargo.toml for the time being , Here is the Latest code for testing.

RahulDas-dev avatar Dec 29 '21 05:12 RahulDas-dev