Skip to content

building packages in Windows under R 1.2.1

6 messages · Peter Dalgaard, Brian Ripley, Yves Gauvreau +1 more

#
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.

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

	. . .


	C:\rw1021\src\library>c:\rw1021\bin\rcmd install car

	make: Entering directory `/rw1021/src/gnuwin32'
	make DLLNM=  EXTRADOCS= \

	. . .

The package in question includes no compiled code.

Any help you might offer would be appreciated.

Thanks,
  John


________________________________
  John Fox
  Department of Sociology
  McMaster University
  email: jfox at McMaster.ca
  web: www.socsci.mcmaster.ca/jfox
________________________________

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
John Fox <jfox at mcmaster.ca> writes:
But did you make it contain the name of a valid temporary directory?

The default for TMPDIR is c:/TEMP, so maybe that doesn't exist?
#
On Sun, 21 Jan 2001, John Fox wrote:

            
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

if($WINDOWS){
    $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);
Well, one usually does check before build, and check contains identical
code for the test, so I am even more baffled.
#
Hi,

Could it be because of is PATH and/or RHOME. He says it still works with R
1.2.0.

Yves Gauvreau
B.E.F.P. Universite du Quebec a Montreal
cyg at sympatico.ca
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Mon, 22 Jan 2001, Yves Gauvreau wrote:

            
The code is new in 1.2.1, and identical code in Rcmd clean works. It looks
like a Windows Perl bug.  On my machines under NT4 and 98 this works
because -d foo seems to be always true!  It is probably different on 2000.

Try changing the line

        unless (-d $TMPDIR);

to
        unless (-e $tmpdir);

It may also depend on the Perl version.  We know that system() is broken
in builds later than ca 619, for example.

It's strange that after years of problems with the make and shell, Perl
is now misbehaving.
#
Dear Brian,
At 12:46 PM 22/01/2001 +0000, you wrote:

            
Yes, this does the trick for me.

For the record, I have version v5.6.0 of Perl; I do have a c:\temp 
directory; and I did explicitly set TMPDIR to a valid directory when I 
first encountered the problem.

Thanks to Brian for the solution, and to Peter Dalgaard for trying to help.

John

________________________________
  John Fox
  Department of Sociology
  McMaster University
  email: jfox at McMaster.ca
  web: www.socsci.mcmaster.ca/jfox
________________________________

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._