Hello All, I have a Linux computer and do all of my work from it. However, I teach also, which means that many of my students use windows. Hence, I need to create packages that work under windows as well as Linux. I have tried to follow the directions at http://cran.r-project.org/doc/contrib/cross-build.pdf which is the document "Building Microsoft Windows Versions of R and R packages under Intel Linux". This has been very helpful. However, the file R_Tcl.zip is no longer available, so I cannot compile R for Windows using the "make R" command as described in the document. Is it necessary to have the Tcl sources in there? If it is, how should the directions be modified to enable the complete compilation of R? None of my code contains C, Fortran, or any other language. It is just plain R code. I would think that this would be easier to convert over. Is it? I tried the following and it seems to work, but I'd like to know if it is safe. 1. Build package with "pre-compiled binary package" option "R CMD build --binary pkgname" 2. convert the resulting tar.gz file to a zip archive. 3. Install it on a windows machine. This process successfully works when I install it on a windows machine, but I have no idea how safe it is. -- ***************************************************************** Scott K. Hyde Assistant Professor of Statistics and Mathematics School of Computing Brigham Young University -- Hawaii
An alternative to cross-compiling when you have a source package is to use the Win-builder facility at win-builder.R-project.org Thanks to Uwe for providing this facility. I find it much, much easier than trying to cross-compile or to set up a Windows computer for compiling R packages. On 9/14/07, Scott Hyde <hydes at byuh.edu> wrote:> Hello All, > > I have a Linux computer and do all of my work from it. However, I > teach also, which means that many of my students use windows. Hence, > I need to create packages that work under windows as well as Linux. I > have tried to follow the directions at > > http://cran.r-project.org/doc/contrib/cross-build.pdf > > which is the document "Building Microsoft Windows Versions of R and R > packages under Intel Linux". This has been very helpful. However, > the file R_Tcl.zip is no longer available, so I cannot compile R for > Windows using the "make R" command as described in the document. Is > it necessary to have the Tcl sources in there? If it is, how should > the directions be modified to enable the complete compilation of R? > > None of my code contains C, Fortran, or any other language. It is > just plain R code. I would think that this would be easier to convert > over. Is it? I tried the following and it seems to work, but I'd > like to know if it is safe. > > 1. Build package with "pre-compiled binary package" option "R CMD > build --binary pkgname" > 2. convert the resulting tar.gz file to a zip archive. > 3. Install it on a windows machine. > > This process successfully works when I install it on a windows > machine, but I have no idea how safe it is. > > -- > ***************************************************************** > Scott K. Hyde > Assistant Professor of Statistics and Mathematics > School of Computing > Brigham Young University -- Hawaii > > ______________________________________________ > 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. >
On Fri, 14 Sep 2007, Scott Hyde wrote:> Hello All, > > I have a Linux computer and do all of my work from it. However, I > teach also, which means that many of my students use windows. Hence, > I need to create packages that work under windows as well as Linux. I > have tried to follow the directions at > > http://cran.r-project.org/doc/contrib/cross-build.pdfI believe that is some years' old: current instructions are in the R-admin manual.> which is the document "Building Microsoft Windows Versions of R and R > packages under Intel Linux". This has been very helpful. However, > the file R_Tcl.zip is no longer available, so I cannot compile R for > Windows using the "make R" command as described in the document. Is > it necessary to have the Tcl sources in there? If it is, how should > the directions be modified to enable the complete compilation of R?The files have been available at http://www.stats.ox.ac.uk/pub/Rtools. I've just added user-visible links to them. You could work around needing the Tcl sources, but you cannot work around needing iconv.dll in R-2.6.0.> None of my code contains C, Fortran, or any other language. It is > just plain R code. I would think that this would be easier to convert > over. Is it? I tried the following and it seems to work, but I'd > like to know if it is safe. > > 1. Build package with "pre-compiled binary package" option "R CMD > build --binary pkgname" > 2. convert the resulting tar.gz file to a zip archive. > 3. Install it on a windows machine. > > This process successfully works when I install it on a windows > machine, but I have no idea how safe it is.This is just a more cumbersome version of the procedure described in README.packages: If your package has no compiled code it is possible that zipping up the installed package on Linux will produce an installable package on Windows. (It has always worked for us, but failures have been reported.) However, you don't get the (default) CHM help this way, which you could by using Uwe Ligges' autobuilder. -- 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