arrayfire/arrayfire-r

link issues with libnvvm

Closed this issue · 4 comments

Hello again,

Install fails for arrayfire_r.

Reproduce:

1/clone arrayfire from git then build and install: pass (default directories)
2/clone arrayfire_r and run sudo R CMD INSTALL arrayfire_r from home directory (the documentation says from arrayfire_r root but doing so gives an invalid package ‘arrayfire_r’ error)

At the "testing if installed package can be loaded" step it produces the following error:

"unable to load shared object '/usr/lib/R/library/arrayfire/libs/arrayfire.so':
libnvvm.so.2: cannot open shared object file: No such file or directory"

Actually there's no usr/lib/R/library/arrayfire folder at all.

@ogamimusashi

Thanks for pointing this out. I will update the README with the fixes.
You will need to run the following before running the examples

export LD_LIBRARY_PATH=/usr/local/cuda/nvvm/lib64

The warning from R seems weird. I saw a similar message when I was developing yesterday. The arrayfire.so path should be pointing to your R_libs path. I am not entirely sure why.

Following the fixed readme it didn't work with sudo R CMD INSTALL but it worked in local user (without sudo).

However when in R, doing library("arrayfire") makes an error "there's no arrayfire package". This is not surprising since R_libs is not my usual directory for packages... So i did (in R, with devtools package) install('/home/ogami/R_libs/arrayfire') and it installed it in the correct directory. However doing library("arrayfire") brings again the libnvvm error.

I updated the README to reflect the changes required to build arrayfire.so.