From jfox at mcmaster.ca  Sat Apr 19 15:14:04 2008
From: jfox at mcmaster.ca (John Fox)
Date: Sat, 19 Apr 2008 09:14:04 -0400
Subject: [Rd] package building problem under Windows Vista
In-Reply-To: <alpine.LFD.1.10.0804191345090.23591@gannet.stats.ox.ac.uk>
References: <000701c8a213$d693fc00$83bbf400$@ca>
	<alpine.LFD.1.10.0804191345090.23591@gannet.stats.ox.ac.uk>
Message-ID: <000001c8a21f$3dbde480$b939ad80$@ca>

Dear Brian,

Actually, though it's irrelevant, I did set the environment variables TEMP
and TMP (and of course forgot that R uses TMPDIR instead).

Unfortunately, setting TMPDIR to d:\temp doesn't solve the problem:

------------ snip -------------

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

d:\R-packages>set TMPDIR
TMPDIR=d:\temp

d:\R-packages>R CMD build tradeCosts
* checking for file 'tradeCosts/DESCRIPTION' ... OK
* preparing 'tradeCosts':
* checking DESCRIPTION meta-information ... OK
* installing the package to re-build vignettes
installing R.css in d:/temp/Rinst542048336


---------- Making package tradeCosts ------------
  adding build stamp to DESCRIPTION
  installing NAMESPACE file and metadata
Error in file(file, "r") : unable to open connection
Calls: <Anonymous> -> parseNamespaceFile -> parse -> file
In addition: Warning message:
In file(file, "r") :
  cannot open file 'd:/temp/Rinst542048336/tradeCosts/NAMESPACE', reason
'Permis
sion denied'
Execution halted
make[2]: *** [nmspace] Error 1
make[1]: *** [all] Error 2
make: *** [pkg-tradeCosts] Error 2
*** Installation of tradeCosts failed ***

Removing 'd:/temp/Rinst542048336/tradeCosts'
* creating vignettes ... OK
* removing junk files
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'tradeCosts_0.3-0.tar.gz'


d:\R-packages>

------------ snip -------------

Thank you for the suggestion,
 John


> -----Original Message-----
> From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
> Sent: April-19-08 8:53 AM
> To: John Fox
> Cc: 'R-devel'
> Subject: Re: [Rd] package building problem under Windows Vista
> 
> John,
> 
> The environment variables are case-sensitive (not temp and tmp), and
> TMPDIR is the one used by 'R CMD build'. I think you need to set TMPDIR
> to
> somewhere known to have full control.  Why that is not true of
> C:/Users/JOHNFO~1/AppData/Local/Temp is unclear to me, but I don't
> think
> anything you said you did would have tried a different location.
> 
> Brian
> 
> On Sat, 19 Apr 2008, John Fox wrote:
> 
> > Dear list members,
> >
> > I've encountered the following problem trying to build a package
> under
> > Windows Vista (SP1). The problem occurs with both R 2.6.2 and R 2.7.0
> RC
> > (from which this output was produced). The package builds just fine
> on my XP
> > (SP2) machine. Please see some further comments below.
> >
> > ---------- snip -------------
> >
> > Microsoft Windows [Version 6.0.6001]
> > Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
> >
> > d:\R-packages>R CMD build tradeCosts
> > * checking for file 'tradeCosts/DESCRIPTION' ... OK
> > * preparing 'tradeCosts':
> > * checking DESCRIPTION meta-information ... OK
> > * installing the package to re-build vignettes
> > installing R.css in
> C:/Users/JOHNFO~1/AppData/Local/Temp/Rinst602447586
> >
> >
> > ---------- Making package tradeCosts ------------
> >  adding build stamp to DESCRIPTION
> >  installing NAMESPACE file and metadata
> > Error in file(file, "r") : unable to open connection
> > Calls: <Anonymous> -> parseNamespaceFile -> parse -> file
> > In addition: Warning message:
> > In file(file, "r") :
> >  cannot open file
> > 'C:/Users/JOHNFO~1/AppData/Local/Temp/Rinst602447586/tradeCos
> > ts/NAMESPACE', reason 'Permission denied'
> > Execution halted
> > make[2]: *** [nmspace] Error 1
> > make[1]: *** [all] Error 2
> > make: *** [pkg-tradeCosts] Error 2
> > *** Installation of tradeCosts failed ***
> >
> > Removing
> 'C:/Users/JOHNFO~1/AppData/Local/Temp/Rinst602447586/tradeCosts'
> > * creating vignettes ... OK
> > * removing junk files
> > * checking for LF line-endings in source and make files
> > * checking for empty or unneeded directories
> > * building 'tradeCosts_0.3-0.tar.gz'
> >
> >
> > d:\R-packages>
> >
> > ---------- snip -------------
> >
> > I believe that the error is related to the vignette in the package,
> since I
> > can build packages without a vignette. Clearly there is a file-
> permission
> > problem but: (1) I'm using an account with administrator privileges;
> (2) R
> > is installed into c:\R (and the problem persists even when I install
> R into
> > d:\R); (3) the problem persists when I run the command window and R
> itself
> > as administrator, and when I turn off account controls; (4) the
> problems
> > persists when I reset the environment variables temp and tmp to
> d:\temp and
> > set the permissions to d:\temp so that all groups and users have full
> > control over that directory.
> >
> > I'm tempted to dump Vista but I've been trying to persist with it
> since most
> > people (e.g., my students) buying new Windows machines will be
> getting it.
> > Although I've read section 2.24 of the R for Windows FAQ, it's quite
> > possible that I've missed something of relevance there.
> >
> > Any help would be appreciated.
> >
> > Thanks in advance,
> > John
> >
> > --------------------------------
> > John Fox, Professor
> > Department of Sociology
> > McMaster University
> > Hamilton, Ontario, Canada L8S 4M4
> > 905-525-9140x23604
> > http://socserv.mcmaster.ca/jfox
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> 
> --
> 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 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] package building problem under Windows Vista
John Fox