Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust GNU toolchain in windows not able to compile #59

Open
selvavm opened this issue Apr 5, 2021 · 3 comments
Open

Rust GNU toolchain in windows not able to compile #59

selvavm opened this issue Apr 5, 2021 · 3 comments

Comments

@selvavm
Copy link

selvavm commented Apr 5, 2021

I am using NDArray Linalg (https://github.com/rust-ndarray/ndarray-linalg) with intel-mkl-static feature. It is working in msvc toolchain perfectly.

However, when I switch to GNU toolchain, I am getting below error,

could not find native static library `mkl_intel_lp64`, perhaps an -L flag is missing?

Any idea why?

@aleon1138
Copy link
Contributor

aleon1138 commented Jun 5, 2021

I just ran into this same problem just now. This is also happening on Linux. It seems you cant build a static library with iomp5. So for example:

[dependencies]
intel-mkl-src = { version = "0.6", default-features = false, features = ["mkl-static-ilp64-iomp"] }

Will fail to compile, but mkl-static-ilp64-seq or mkl-dynamic-ilp64-iomp will work just fine. This seems to be an issue with the build script somewhere.

@aleon1138
Copy link
Contributor

aleon1138 commented Jun 5, 2021

Ok I found a work-around: the libmkl_core.a library is in a different directory than libiomp5.a. So what I did is just create a symlink:

$ ls 
libiomp5.a -> ../../../compiler/lib/intel64_lin/libiomp5.a
libmkl_core.a
....

... and it now compiles and works.

FYI - my MKL install is under /opt/intel/ and I'm on Ubuntu 18.04

@aleon1138
Copy link
Contributor

I've pushed a potential fix #63

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

No branches or pull requests

2 participants