Ian Schiller
2011-Mar-24 14:36 UTC
[R] R CMD build creates tar file instead of tar.gz file
Dear all, I'm trying to create my own package by following for instance http://epub.ub.uni-muenchen.de/6175/2/tr036.pdf In step 6 (page 19) it says that the command 'R CMD build <mypackage>' should result in a tar.gz file. However, after running the command I end up with a tar file only (no gz extension). I also get the following warnings in the command prompt C:\Program Files\R\R-2.12.2\src>R CMD build HSROC * checking for file 'HSROC/DESCRIPTION' ... OK * preparing 'HSROC': * checking DESCRIPTION meta-information ... OK cygwin warning: MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ 1.0.0.tar CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ 1.0.0.tar CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames * checking for LF line-endings in source and make files * checking for empty or unneeded directories * building 'HSROC_1.0.0.tar.gz' cygwin warning: MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ 1.0.0.tar CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ 1.0.0.tar CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames I have installed R-2.12.2 which should be the latest version. I also have the latest version of Rtools (Rtools212.exe). My operating system is Windows XP professional x64 edition if it can help. Any clues on how to solve this issue would be appreciated. Ian ****************************************************************************************************************************** IAN SCHILLER, M.Sc. Statistical research assistant, Division of Clinical Epidemiology, McGill University Health Center Assistant de recherche en statistiques, D?partement d'?pid?miologie Clinique, Centre Universitaire de Sant? Mcgill Tel: 514 934 1934 ext. 36925 Email: ian.schiller at clinepi.mcgill.ca
Duncan Murdoch
2011-Mar-24 14:57 UTC
[R] R CMD build creates tar file instead of tar.gz file
On 24/03/2011 10:36 AM, Ian Schiller wrote:> Dear all, > > I'm trying to create my own package by following for instance http://epub.ub.uni-muenchen.de/6175/2/tr036.pdf In step 6 (page 19) it says that the command 'R CMD build<mypackage>' should result in a tar.gz file. However, after running the command I end up with a tar file only (no gz extension). I also get the following warnings in the command prompt > > C:\Program Files\R\R-2.12.2\src>R CMD build HSROC > * checking for file 'HSROC/DESCRIPTION' ... OK > * preparing 'HSROC': > * checking DESCRIPTION meta-information ... OK > cygwin warning: > MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar > Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ > 1.0.0.tar > CYGWIN environment variable option "nodosfilewarning" turns off this warning.I think that might mean you are running the wrong version of tar. Did you put the Rtools/bin directory first in your path? What does tar --version give? The current Rtools version says tar (GNU tar) 1.21 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. but Cygwin is distributing a newer one. I do see some oddities with build in 2.12.2 in Windows 7: on my first attempt, I got all sorts of errors, e.g. * checking for file 'ellipse/DESCRIPTION' ... OK * preparing 'ellipse': * checking DESCRIPTION meta-information ... OK /cygdrive/c/Rtools/bin/tar: ellipse/.svn/prop-base: file changed as we read it /cygdrive/c/Rtools/bin/tar: ellipse/.svn/text-base: file changed as we read it /cygdrive/c/Rtools/bin/tar: ellipse/.svn/tmp: file changed as we read it /cygdrive/c/Rtools/bin/tar: ellipse/.svn: file changed as we read it /cygdrive/c/Rtools/bin/tar: ellipse/chm: file changed as we read it ... but on the second attempt it was fine. This may be an interaction with a virus checker; that's often a problem on Windows. Duncan Murdoch> Consult the user's guide for more details about POSIX paths: > http://cygwin.com/cygwin-ug-net/using.html#using-pathnames > cygwin warning: > MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar > Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ > 1.0.0.tar > CYGWIN environment variable option "nodosfilewarning" turns off this warning. > Consult the user's guide for more details about POSIX paths: > http://cygwin.com/cygwin-ug-net/using.html#using-pathnames > * checking for LF line-endings in source and make files > * checking for empty or unneeded directories > * building 'HSROC_1.0.0.tar.gz' > cygwin warning: > MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar > Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ > 1.0.0.tar > CYGWIN environment variable option "nodosfilewarning" turns off this warning. > Consult the user's guide for more details about POSIX paths: > http://cygwin.com/cygwin-ug-net/using.html#using-pathnames > cygwin warning: > MS-DOS style path detected: C:/Program Files/R/R-2.12.2/src/HSROC_1.0.0.tar > Preferred POSIX equivalent is: /cygdrive/c/Program Files/R/R-2.12.2/src/HSROC_ > 1.0.0.tar > CYGWIN environment variable option "nodosfilewarning" turns off this warning. > Consult the user's guide for more details about POSIX paths: > http://cygwin.com/cygwin-ug-net/using.html#using-pathnames > > > I have installed R-2.12.2 which should be the latest version. I also have the latest version of Rtools (Rtools212.exe). My operating system is Windows XP professional x64 edition if it can help. Any clues on how to solve this issue would be appreciated. > > Ian > > ****************************************************************************************************************************** > IAN SCHILLER, M.Sc. > > Statistical research assistant, > Division of Clinical Epidemiology, McGill University Health Center > Assistant de recherche en statistiques, > D?partement d'?pid?miologie Clinique, Centre Universitaire de Sant? Mcgill > > Tel: 514 934 1934 ext. 36925 > Email: ian.schiller at clinepi.mcgill.ca > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Ian Schiller
2011-Mar-24 17:28 UTC
[R] R CMD build creates tar file instead of tar.gz file
Ok guys. First thanks again for your help. It is very appreciated. Now here's the thing. I downloaded the Rcmd.bat and included in the path. I've also changed the location of the package source and ran R CMD build mypackage (Rcmd.bat is not working so I assume there is something I'm doing wrong). However, the warnings are now gone. The file produced is still a tar (and not tar.gz), but when I look at it within the command prompt windows using dir, it says that the file is a tar.gz. I don't know what is the meaning of that. Here is the output of the command prompt C:\R>R CMD build HSROC * checking for file 'HSROC/DESCRIPTION' ... OK * preparing 'HSROC': * checking DESCRIPTION meta-information ... OK * checking for LF line-endings in source and make files * checking for empty or unneeded directories * building 'HSROC_1.0.0.tar.gz' Directory of C:\R 03/24/2011 01:16 PM <DIR> . 03/24/2011 01:16 PM <DIR> .. 03/24/2011 01:08 PM <DIR> HSROC 03/24/2011 01:16 PM 47,976 HSROC_1.0.0.tar.gz 1 File(s) 47,976 bytes 3 Dir(s) 949,472,227,328 bytes free Ian ****************************************************************************************************************************** IAN SCHILLER, M.Sc. Statistical research assistant, Division of Clinical Epidemiology, McGill University Health Center Assistant de recherche en statistiques, D?partement d'?pid?miologie Clinique, Centre Universitaire de Sant? Mcgill Tel: 514 934 1934 ext. 36925 Email: ian.schiller at clinepi.mcgill.ca -----Original Message----- From: Gabor Grothendieck [mailto:ggrothendieck at gmail.com] Sent: Thursday, March 24, 2011 1:00 PM To: Ian Schiller Cc: Duncan Murdoch; r-help at r-project.org Subject: Re: [R] R CMD build creates tar file instead of tar.gz file On Thu, Mar 24, 2011 at 12:48 PM, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:> On Thu, Mar 24, 2011 at 12:36 PM, Ian Schiller > <Ian.Schiller at clinepi.mcgill.ca> wrote: >> Thanks for your prompt answer Mr. Ripley. ?It appears the version of tar I'm using is exactly the same as the one included in the latest Rtools. ?I noticed that the Rtools/bin directory was not first in path, so I corrected this. ?However, I'm still not able to create a tar.gz file with the R CMD build command. ? Then my question would be the following. ?If I submit my package to CRAN do you know if it needs to be tar.gz or will a tar file be accepted? >> > > A couple of things to try: > > - try re-installing Rtools and R > - put Rcmd.bat from http://batchfiles.googlecode.com on your path and > then try re-building > Rcmd.bat build mypackage > > Rcmd.bat will automatically find R and certain other files from the > registry and temporarily set certain environment variables that may > compensate for a mis-configured system.One other thing. I wouldn't use the R-2.12.2 tree for the package source. Put it somewhere else, e.g. in %userprofile%\R\mypackage There could be permissions problems if you try to use the \Program Files area. Then: cd %userprofile%\R Rcmd.bat build mypackage -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
I had an identical problem building in R.2.12 with the latest (last week's) Rtools. Interestingly I found that if I used a DOS path in rcmd build (eg rcmd build 0.9\pkg) I got a .tar, but if I replaced it with the unix-like path as in rcmd build 0.9/pkg I got a .tar.gz Weird but workable. S Ellison LGC -- View this message in context: http://r.789695.n4.nabble.com/R-CMD-build-creates-tar-file-instead-of-tar-gz-file-tp3402687p3427046.html Sent from the R help mailing list archive at Nabble.com.