[Rcpp-devel] Problem loading a binary package which links dynamically with Rcpp

Fabien Ors fabien.ors at mines-paristech.fr
Mon Jan 28 10:19:18 CET 2013


Hi,

I develop a binary R package (let's call it MyPack) which is not on the 
CRAN and which depends from Rcpp (0.10.2).
This package is built in-house under linux using the "R CMD INSTALL 
--build" and a "Makevars" file containing :

PKG_CPPFLAGS = -I"$(R_HOME)/include" -I"$(R_HOME)/library/Rcpp/include"
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`

The problem is that I cannot load my package on another linux computer:

 > library(MyPack)
Loading required package: Rcpp
Error in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Path/To/R_Packs/MyPack/libs/MyPack.so':
libRcpp.so: cannot open shared object file: No such file or directory
Error: package/namespace load failed for ‘MyPack’

Both Rcpp and MyPack have been installed using:
R CMD INSTALL Rcpp_0.10.2.tar.gz -l /Path/To/R_Packs/
R CMD INSTALL MyPack_1.0.0.tar.gz -l /Path/To/R_Packs/

And the path to R_Packs have been added to R_LIBS environment variable, so:
 > .libPaths()
[1] "/Path/To/R_Packs" "/usr/local/lib64/R/library"

If I install both packages as root (inside /usr/local/lib64/R/library/), 
there is no problem.
Any help would be greatly appreciated.

Thanks.
Fabien


More information about the Rcpp-devel mailing list