arrayfire / arrayfire-r

R wrapper for ArrayFire
BSD 3-Clause "New" or "Revised" License
22 stars 5 forks source link

link issues with libnvvm #6

Closed ogamimusashi closed 9 years ago

ogamimusashi commented 9 years ago

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.

pavanky commented 9 years ago

@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
pavanky commented 9 years ago

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.

ogamimusashi commented 9 years ago

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.

pavanky commented 9 years ago

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