[R] building packages in Windows under R 1.2.1

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jan 22 10:15:21 CET 2001

On Sun, 21 Jan 2001, John Fox wrote:

> Dear list members,
> I'm experiencing difficulty in building a package in R 1.2.1 under Windows
> 2000, using, as far as I can tell, the same approach that I used
> successfully in R 1.2.0.
> More specifically, "rcmd build" produces the following error:
> 	C:\rw1021\src\library>c:\rw1021\bin\rcmd build car
> 	Please set TMPDIR to a valid temporary directory
> It looked to me as if "rcmd build" wanted an environment variable called
> TMPDIR, so I set one, but this didn't help.

Yes, it does (and did under 1.2.0 unless c:/TEMP exists, which I think it
usually does under Windows 2000).  In this version it actually tests for
the existence of the directory.

Which Perl version do you have?  I am baffled: this works for me under NT
and 98 with three different Perl versions.  The symptom is that whatever
Perl things $TMPDIR is does not exist.  Can you print out and check via

    $tmpdir = R_getenv("TMPDIR", "/TEMP");
    print "tmpdir is $tmpdir\n"; # added line
    die "Please set TMPDIR to a valid temporary directory\n"
        unless (-d $TMPDIR);

> Curiously, "rcmd build" under R.1.2.0 (which is also on my system) still works:
> 	C:\rw1021\src\library>c:\rw1020\bin\rcmd build car
> 	* checking for file `car/DESCRIPTION' ... OK
> 	* preparing `car':
> 	* checking whether `INDEX' is up-to-date ... NO
> 	* creating new INDEX
> 	* checking whether `data/00Index' is up-to-date ... NO
> 	* creating new data/00Index
> 	* removing junk files
> 	* building `car_0.6-0.tar.gz'
> After this, I can use "rcmd check" and "rcmd install" from version 1.2.1 to
> finish the job:
> 	C:\rw1021\src\library>c:\rw1021\bin\rcmd check car
> 	* checking for working latex ... OK
> 	* using log directory C:/rw1021/src/library/car.Rcheck
> 	. . .

Well, one usually does check before build, and check contains identical
code for the test, so I am even more baffled.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list