From nashjc at uottawa.ca  Wed Dec 16 15:18:18 2009
From: nashjc at uottawa.ca (Prof. John C Nash)
Date: Wed, 16 Dec 2009 09:18:18 -0500
Subject: [Rd] [R] R CMD check when package directory is symlinked
In-Reply-To: <mailman.19.1260961209.29033.r-devel@r-project.org>
References: <mailman.19.1260961209.29033.r-devel@r-project.org>
Message-ID: <4B28EC2A.3010004@uottawa.ca>

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



[Rd] [R] R CMD check when package directory is symlinked
Prof. John C Nash