From stefan.theussl at wu-wien.ac.at  Tue Apr 29 10:37:27 2008
From: stefan.theussl at wu-wien.ac.at (Stefan Theussl)
Date: Tue, 29 Apr 2008 10:37:27 +0200
Subject: [Rd] R-Forge SVN repositories: R CMD build/check error on
 Windows machines
In-Reply-To: <48163158.2050802@stats.uwo.ca>
References: <4815F9C8.80209@wu-wien.ac.at> <48163158.2050802@stats.uwo.ca>
Message-ID: <4816DE47.1030401@wu-wien.ac.at>

Duncan Murdoch wrote:
> On 28/04/2008 12:22 PM, Stefan Theussl wrote:
>> Dear R-devel,
>>
>> One of our R-Forge developers pointed out that it is not possible to 
>> build packages under Windows using the R-Forge repository structure: 
>> a package resides in ./pkg - not in a directory with the same name as 
>> the package name.
>>
>> Under Linux 'R CMD build pkg' or 'R CMD check pkg' work pretty well 
>> (I think Kurt Hornik fixed that in R 2.5.1 or so) whereas under 
>> Windows one gets the following error (this is the example sent by the 
>> user):
>>
>> c:\work\packages\spdep>R CMD check pkg
>> * checking for working pdflatex ... OK
>> * using log directory 'C:/work/packages/spdep/pkg.Rcheck'
>> * using R version 2.7.0 (2008-04-22)
>> * using session charset: ISO8859-1
>> * checking for file 'pkg/DESCRIPTION' ... OK
>> * this is package 'spdep' version '0.4-21'
>> * package encoding: latin1
>> * checking package name space information ... OK
>> * checking package dependencies ... OK
>> * checking if this is a source package ... WARNING
>> Subdirectory 'pkg/src' contains object files.
>> * checking whether package 'spdep' can be installed ... ERROR
>> Installation failed.
>> See 'C:/work/packages/spdep/pkg.Rcheck/00install.out' for details.
>>
>> which is:
>>
>> installing R.css in C:/work/packages/spdep/pkg.Rcheck
>>
>>
>> ---------- Making package pkg ------------
>>   adding build stamp to DESCRIPTION
>>   installing NAMESPACE file and metadata
>>   making DLL ...
>>   ... DLL made
>>   installing DLL
>>   installing R files
>>   installing inst files
>>   installing data files
>>   preparing package pkg for lazy loading
>> Loading required package: tripack
>> Loading required package: sp
>> ...
>> Error in findpack(package, lib.loc) : *there is no package called 'pkg'*
>> Calls: <Anonymous> -> findpack
>> Execution halted
>> make[2]: *** [lazyload] Error 1
>> make[1]: *** [all] Error 2
>> make: *** [pkg-pkg] Error 2
>> *** Installation of pkg failed ***
>>
>> I could verify this on our 'Windows package building machine' not 
>> only for this package but also for others.
>> Therefore, it seems to me that the (Windows) R CMD build/check 
>> scripts are not considering the package name in the DESCRIPTION file 
>> but rather take the directory name as package name.
>>
>> Or are we just doing something completely wrong?
>
> You're right, on Windows there's an assumption that package foo is in 
> directory foo.  But I don't see why this is a big problem.  Can't you 
> just check out pkg into foo, e.g.
>
> svn co svn://svn.r-forge.r-project.org/svnroot/foo/pkg foo
>
> (Not that I'd be against accepting a patch to remove this restriction; 
> occasionally it might be nice to have two versions of the same package 
> side-by-side.)
Yes, you're right. Actually we do it this way when exporting the R-Forge 
packages. We just look for the package name in the DESCRIPTION file and 
do an 'svn export' using this information. The other possibility on 
R-Forge would be to have the package in a directory ./pkg/foo in the 
repository. This is supported by our build process.
Therefore this is no problem at all for us.

Nevertheless, I think that this is a useful convenience feature (indeed 
I use that very often under Linux). E.g., one wants to have his or her 
packages in different directories like foo-devel, foo-release and just 
say R CMD build/check on them.

Best,
Stefan
>
> Duncan Murdoch
>
>>
>> I used R-patched 2.7.0 on R-Forge to reproduce this error.
>>
>> Best regards,
>> Stefan
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] R-Forge SVN repositories: R CMD build/check error on Windows machines
Stefan Theussl