From ripley at stats.ox.ac.uk  Wed Jan 21 12:20:35 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed Jan 21 12:19:26 2004
Subject: [Rd] Re: [R] problem with rcmd build R-devel
In-Reply-To: <Pine.LNX.4.44.0401210815230.2432-100000@gannet.stats>
Message-ID: <Pine.LNX.4.44.0401211116440.3465-100000@gannet.stats>

On further investigation, the problem goes away if you change the usages 
of system() in build to R_system().  The latter was introduced to avoid 
exactly the sort of shell-dependent quoting hell that has happened here.

On Wed, 21 Jan 2004, Prof Brian Ripley wrote:

> `R-devel' is said to be Under development (unstable), so please don't 
> report problems to R-help.  (There is an R-devel list to which I have 
> diverted this).
> 
> The problem is a problem in trying to cope with TMPDIR with spaces in,
> now fixed, I hope (since it depended on the exact toolset in use).
> 
> On Tue, 20 Jan 2004, James MacDonald wrote:
> 
> > Hi All,
> > 
> > I am having a problem with Rcmd build using R-devel on WinXP. If I try
> > to build a package using the --binary flag, I get the following error:
> > 
> > Error: cannot change to directory ' 'c:/TEMP/Rbuild.XXXX'  '
> > 
> > Where XXXX is some number. I can get Rcmd build to work using R-1.7.1
> > and R-1.8.0, so I don't think it is a permission problem. I looked at
> > the build file, and the relevant portion appears to be the same in all
> > versions:
> 
> Notice that is *not* the same error message, and it is not relevant.
> 
> The clue is the set of quotes around the directory name.  Had you copied 
> an actual example such as
> 
> Error: cannot change to directory `'c:/TEMP/Rbuild.3796''
> 
> I would have got there a lot sooner.  As the FAQ asks, please report what 
> actually happened, not hypotheses.
> 
> >  if($opt_binary) {
> > 	my $libdir = "${R::Vars::TMPDIR}/Rbuild.$$";
> > 	mkdir("$libdir", 0755)
> > 	    or die "Cannot create directory '$libdir'\n";
> 
> > If I do Rcmd install --build, I get a built .zip file, but it appears
> > that the temp directory is never used.
> 
> It is INSTALL not install!
> 
> 

-- 
Brian D. Ripley,                  ripley@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] Re: [R] problem with rcmd build R-devel
Prof Brian Ripley