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

Dirk Eddelbuettel edd at debian.org
Tue Jan 29 12:25:05 CET 2013


Hi Fabien,

On 29 January 2013 at 09:11, Fabien Ors wrote:
| Hi Dirk,
| 
| Thank you for your answer. My package is called RGeoS (case sensitive).
| Maybe could you try it downloading it from our website ?
| http://rgeos.free.fr/forum/viewtopic.php?f=2&t=48
| 
| I can reproduce the problem on Ubuntu 12 and Fedora 17 when I install 
| Rcpp and RGeoS without root rights (in a directory of mine like 
| /home/fors/R-Packs for instance)
| 
| What should contain ld.so.conf and how to keep it sync, please ?
| Thanks in advance.

I guessed in my previous email that this was likely to be YOUR problem in
using or setting up your package.  This confirms it.

You are shipping linux 32 and 64 bit binary packages. Why?  

No other CRAN package does this.  _Installation happens from source_.  In

  edd at max:/tmp$ tar tvfz RGeoS_9.0.7_linux64.tar.gz | grep so
  -rwxr-xr-x isatis-cg/geosciences 1616960 2013-01-22 15:40 RGeoS/libs/RGeoS.so
  edd at max:/tmp$ 

the path of the build machine will likely be reflected in the RGeoS.so so it
gets issue on the machine you try to use it on.

You are distributing a package in a non-standard, and I may add non-open
source, way.  That may be by accident (so see the manual) or on purpose, but
either way the wound is self-inflicted.  You are simply using R packages the
wrong way.  But this has nothing to do with Rcpp, so please allow me to stop
this thread here, and to direct you to the "Writing R Extensions" manual for
instructions on how to do this correctly.

Cheers, Dirk

| 
| Best regards,
| 
| Fabien Ors,
| Mines-ParisTech/Géosciences/Géostatistique,
| Tel : (33) +1 64 69 47 79
| 
| Le 29/01/2013 00:01, Dirk Eddelbuettel a écrit :
| > Salut Fabien,
| >
| > This is not a reproducible report ...
| >
| > On 28 January 2013 at 10:19, Fabien Ors wrote:
| > | 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.
| >
| > That would indicate there is no problem per se with your or our code, but
| > rather with the setup of your computer. Maybe /etc/ld.so.conf is out of sync
| > with where you keep dynamic libraries -- hard to say without anything
| > reproducible.
| >
| > Dirk
| >
| > | Any help would be greatly appreciated.
| > |
| > | Thanks.
| > | Fabien
| > | _______________________________________________
| > | Rcpp-devel mailing list
| > | Rcpp-devel at lists.r-forge.r-project.org
| > | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
| >
| 

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list