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

libmkl_core.so: cannot open shared object file: No such file or directory #16

Open
krzjoa opened this issue Dec 11, 2019 · 4 comments
Open

Comments

@krzjoa
Copy link

krzjoa commented Dec 11, 2019

I installed ArrayFire via ArrayFire-v3.6.4_Linux_x86_64.sh script downloaded from the ArrayFire site. Then, I have tried to pass through RcppArrayFire installation procedure. Unfortunately, it fails with the following communicate:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RcppArrayFire’ in dyn.load(file, DLLpath = DLLpath, ...):
cannot open shared object file '/home/krzysztof/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-RcppArrayFire/00new/RcppArrayFire/libs/RcppArrayFire.so':
libmkl_core.so: cannot open shared object file: No such file or directory

I saw a previous issue which seemed to be similar at glance, but it did't give my relevant answer to my question.

The environment I use looks like this:

R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS:   /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=pl_PL.UTF-8       LC_NUMERIC=C               LC_TIME=pl_PL.UTF-8        LC_COLLATE=pl_PL.UTF-8    
 [5] LC_MONETARY=pl_PL.UTF-8    LC_MESSAGES=pl_PL.UTF-8    LC_PAPER=pl_PL.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] drat_0.1.5     compiler_3.6.1 tools_3.6.1   

I hope I'll be able to install this great project on my machine 😎

@rstub
Copy link
Member

rstub commented Dec 11, 2019

This sounds a lot like arrayfire/arrayfire#2372. Does it help to add the LD_PRELOAD statement from the last comment? I generally use ArrayFire compiled from source, which removes this issue with linking to MKL.

@rstub
Copy link
Member

rstub commented Dec 12, 2019

The error messages are different, though. What is the output of these commands?

ldconfig --print-cache | grep libaf
ldconfig --print-cache | grep libmkl
ldd </path/to/libaf.so>

@krzjoa
Copy link
Author

krzjoa commented Dec 12, 2019

Thank you for quick answers!
I installed ArrayFire from source too.

Commands

ldconfig --print-cache | grep libaf
ldconfig --print-cache | grep libmkl

print nothing.

The last one, i.e:

ldd /usr/local/lib64/libaf.so

gives me following output:

   linux-vdso.so.1 (0x00007fff450f7000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f84125c2000)
    libmkl_core.so => not found
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f84123a3000)
    libmkl_intel_lp64.so => not found
    libmkl_gnu_thread.so => not found
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f8412174000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8411dd6000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8411bbe000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f84117cd000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8412dbf000)

@rstub
Copy link
Member

rstub commented Dec 13, 2019

I installed ArrayFire from source too.

Originally you mentioned ArrayFire-v3.6.4_Linux_x86_64.sh, which installs a pre-compiled binary. Are you still using that?

Anyway, ldconfig not knowing about libaf is bad. Please have a look at this SO answer. Does that help?

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