[Rd] Building package with R 2.6.0 on Windows/Cygwin gives error with tar

Kevin Wright kw.statr at gmail.com
Fri Oct 5 18:44:31 CEST 2007


I tried setenv TAR="tar --force-local" and also tried changing the
build script directly to
    R_system(join(" ",
		  ("tar --force-local -chf",
		   &shell_quote_file_path($filepath),
		   "$pkgname")));
but still had this error:
tar: Cannot execute remote shell: No such file or directory
tar: c\:/x/rpkgs/Drydown_1.41.tar: Cannot open: Input/Output error

Replacing R_system with print confirms that $filepath does not have
the backslash.

Curiously, at the bash prompt, this does work:
tar --force-local -chf "c:/X/Rpkgs/Drydown_1.41.tar" Drydown

Maybe a confusion between R_system and bash ???

I'm happy to help test this further, but with the hack reported at the
start of this thread I'm also content to let this drop (or go off
list).

Kevin Wright



On 10/5/07, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> Try setting TAR to 'tar --force-local'.
>
> This should be the default under Windows, but a typo was introduced in R
> 2.6.0 after it was tested.
>
> On Thu, 4 Oct 2007, Kevin Wright wrote:
>
> > My setup:
> > Windows XP, R-2.6.0, Cygwin (not the Rtools version)
> >
> > When I tried to build a package, I was given this message:
> > tar: c\:/X/Rpkgs/Drydown_1.41.tar: Cannot open: Input/Output error
> >
> > Even manually typing the following caused the same error:
> > tar chf 'c:/X/Rpkgs/Drydown_1.41.tar' Drydown
> >
> > I looked at the 2.5.1 and 2.6.0 build scripts.  After restoring this
> > section to the 2.6.0 build script:
> >  ## workaround for paths in Cygwin tar
> >  $filepath =~ s+^([A-Za-z]):+/cygdrive/\1+;
> >  }
> > then $filepath evaluates to
> >  /cygdrive/c/X/Rpkgs/Drydown_1.41.tar
> > and I was able to build packages again.
> >
> > (Posted in case someone else has the same problem and/or finds this useful.)
>
> It WOULD have been useful if you had tested in the alpha/beta/RC period
> and not immediately after release.  (I believe this has been asked of you
> before.)
>
> --
> 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
>



More information about the R-devel mailing list