[Rd] [R] R CMD check when package directory is symlinked

Prof. John C Nash nashjc at uottawa.ca
Wed Dec 16 15:18:18 CET 2009


I've done a couple of searches and not found mention of the issue below, though some older 
scripts mention getting absolute paths for R CMD check. If the issue is "new" or 
unfamiliar I'll be happy to follow up and document it, but suspect it is in some sense 
already known and I've missed the right search strategy. The workaround is pretty simple 
-- copy the files to a new absolute directory. However, if I can save some grief for 
others, I will.

I run Ubuntu Jaunty 9.04, but until recently was running Hardy 8.04. I symlinked my 
R-optimtest directory from /home/john/ to my "old" home directory's version. When I 
changed a package and tried R CMD check I got the following.

> * checking whether the package can be loaded ... ERROR
> Error in dyn.load(file, DLLpath = DLLpath, ...) : 
>   unable to load shared library '/media/lnx804/home/john/R-optimtest/work/minqa.Rcheck/minqa/libs/minqa.so':
>   /media/lnx804/home/john/R-optimtest/work/minqa.Rcheck/minqa/libs/minqa.so: failed to map segment from shared object: Operation not permitted
> Error : .onLoad failed in 'loadNamespace' for 'minqa'
> Error: package/namespace load failed for 'minqa'
> Execution halted

I copied the entire minqa tree to a new "localR" directory and things work fine. So it 
looks like R is unhappy with the expanded directory name i.e., from 
/home/john/R-optimtest/work/... to /media/lnx804/home/john/R-optimtest/work/...


Cheers, JN



More information about the R-devel mailing list