The difference is in INSTALL, not build/check.

You are right that the Unix INSTALL was changed in r25808 (Aug 2003), but AFAICS this was not documented at the time in [O]NEWS, nor anywhere else.

Can you point me to the documentation you used to implement this?


On Mon, 28 Apr 2008, 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.)

Duncan Murdoch


I used R-patched 2.7.0 on R-Forge to reproduce this error.

Best regards,
Stefan

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


--
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to