JuliaMath / IntelVectorMath.jl

Julia bindings for the Intel Vector Math Library
Other
73 stars 18 forks source link

symbol lookup error: undefined symbol: mkl_serv_getenv #12

Closed zsoerenm closed 4 years ago

zsoerenm commented 7 years ago

I have installed intel-mkl from arch aur repository: https://aur.archlinux.org/packages/intel-mkl/

After that I have linked the following: sudo ln -s /opt/intel/lib/* /usr/local/lib/

But I still get an error:

julia: symbol lookup error: /opt/intel/mkl/lib/intel64/libmkl_vml_avx.so: undefined symbol: mkl_serv_getenv

Googling does not help here unfortunately.

Djoop commented 6 years ago

The issue is old, but I ran into the same error recently, so I'm answering. I had this error when trying to use VML with a julia binary which had not been compiled with MKL. I don't understand how these libraries work, but I was thinking that maybe VML was an independent library that could be used without julia being compiled against MKL (although you need of course to download MKL to get the VML library). If being compiled against MKL is a requirement, maybe it should be written explicitly on the README, as it might not be obvious to all users? If this is not a requirement, then I have no clue on how to solve the problem. That being said, maybe you encounter the same error for a different reason.

KristofferC commented 6 years ago

I dont think there is an inherent reason why Julia has to be built using MKL for this package. The MKL library could just be opened, similar to how it is done in https://github.com/JuliaSparse/MKLSparse.jl/blob/ce41674f20ba38e8d2dbdfb5db559e962fd6904c/src/MKLSparse.jl#L5-L7.

WilliamTambellini commented 4 years ago

Perhaps the same error that is happening with python and java : mkl_core is dynamic loading the mkl libs which does nt always work well. Many are just LD_PRELOAD the mkl libs.

aminya commented 4 years ago

Could you test with the latest release (master branch)?

Crown421 commented 4 years ago

I had this error when I started working on it, the solution was adding some flags to the Libdl.dlopen command. I am successfully using https://aur.archlinux.org/packages/intel-mkl-slim/ on Manjaro, so I am closing this issue. Please comment if it is not working for you, then I will reopen and investigate.