Background: ?? ?--I already had the latest 64 bit cygwin (1.7.28) installed on my Windows 7 box ?? ?--I am a new R user; I just installed the latest 64 bit R today (3.0.3) ?? ?--a coworker told me that I also need to install RTools, so, I also installed the latest RTools (3.1) from ?? ??? ?http://cran.r-project.org/bin/windows/Rtools/ ?? ?--during RTools installation, I accepted all the defaults, including "Cygwin DLLs" ?? ?--the sole additional item is that I checked to modify my PATH system env var ~~~~~~~~~~ So what's my concern?? That modifed PATH system env var.? After installation, PATH looks like ?? ?c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;...;<my cygwin 64 bit path> So the RTools stuff is before my original cygwin path. This choice means that RTools should work just fine. ***But will it screw up my normal cygwin sessions?*** In particular, if during a cygwin session a command is needed and a command with that name is found in Rtools, I assume that that version will be used.? But it may not be the newer one expected by cygwin--could that cause problems? Warren Young's very detailed answer here ?? ?https://stackoverflow.com/questions/18329233/is-it-advisable-to-switch-from-cygwin-32bit-to-cygwin-64bit indicates that 32 and 64 bit cygwin do not mix well... ~~~~~~~~~~ Some more info. I accepted the installer's default to include "Cygwin DLLs", even tho I already had 64 bit cygwin installed, because of this note: ?? ?"The Cygwin tools have been updated to versions current as of November 19, 2013. Cygwin now builds separate 32 bit and 64 bit versions; we include 32 bit versions of the tools. If your system only has 64 bit Cygwin DLLs installed, you will need to add our Cygwin DLLs to your path (or install the 32 bit Cygwin DLLs into Cygwin)." ?? ?http://cran.r-project.org/bin/windows/Rtools/ But while web searching this issue, I came across a contrary recommendation: ?? ?"Some of the R tools use the Cygwin DLLs, which are included.? If you already have Cygwin installed, you should not install these" ?? ?http://cran.r-project.org/bin/windows/Rtools/Rtools.txt (That last instruction, by the way, goes back many years, at least to 2008: ?? ?http://www.r-bloggers.com/wp-content/uploads/2008/12/Rtools1.txt ) So, which instruction should I follow? ~~~~~~~~~~ I apologize in advance if this issues has already been discussed before, but all attempts today to search this email list's archives at ?? ?http://tolstoy.newcastle.edu.au/R/ always return 404 errors. I found a 2008 discussion of this issue here ?? ?http://www.r-bloggers.com/rtools-and-cygwin-on-ms-windows/ which suggests temporarily hacking your PATH when launching RTools.
Richard M. Heiberger
2014-Mar-12 04:52 UTC
[R] RTools and previous Cygwin installation--conflict?
when I am on Windows, I use the msdos cmd shell and the Rtools when I am building an R package. It doesn't know anything about cygwin, doesn't need to know anything about cygwin, and bypasses the need to coordinate the two. For everything else I use the cygwin bash. the cygwin shell doesn't know about the Rtools. Rich On Wed, Mar 12, 2014 at 12:10 AM, Brent <yhbrent at yahoo.com> wrote:> Background: > --I already had the latest 64 bit cygwin (1.7.28) installed on my Windows 7 box > --I am a new R user; I just installed the latest 64 bit R today (3.0.3) > --a coworker told me that I also need to install RTools, so, I also installed the latest RTools (3.1) from > http://cran.r-project.org/bin/windows/Rtools/ > --during RTools installation, I accepted all the defaults, including "Cygwin DLLs" > --the sole additional item is that I checked to modify my PATH system env var > > ~~~~~~~~~~ > > So what's my concern? That modifed PATH system env var. After installation, PATH looks like > c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;...;<my cygwin 64 bit path> > So the RTools stuff is before my original cygwin path. > > This choice means that RTools should work just fine. > > ***But will it screw up my normal cygwin sessions?*** > > In particular, if during a cygwin session a command is needed and a command with that name is found in Rtools, I assume that that version will be used. But it may not be the newer one expected by cygwin--could that cause problems? > > Warren Young's very detailed answer here > https://stackoverflow.com/questions/18329233/is-it-advisable-to-switch-from-cygwin-32bit-to-cygwin-64bit > indicates that 32 and 64 bit cygwin do not mix well... > > ~~~~~~~~~~ > > Some more info. > > I accepted the installer's default to include "Cygwin DLLs", even tho I already had 64 bit cygwin installed, because of this note: > > "The Cygwin tools have been updated to versions current as of November 19, 2013. Cygwin now builds separate 32 bit and 64 bit versions; we include 32 bit versions of the tools. If your system only has 64 bit Cygwin DLLs installed, you will need to add our Cygwin DLLs to your path (or install the 32 bit Cygwin DLLs into Cygwin)." > http://cran.r-project.org/bin/windows/Rtools/ > > But while web searching this issue, I came across a contrary recommendation: > > "Some of the R tools use the Cygwin DLLs, which are included. If you already have Cygwin installed, you should not install these" > http://cran.r-project.org/bin/windows/Rtools/Rtools.txt > > (That last instruction, by the way, goes back many years, at least to 2008: > http://www.r-bloggers.com/wp-content/uploads/2008/12/Rtools1.txt > ) > > So, which instruction should I follow? > > ~~~~~~~~~~ > > I apologize in advance if this issues has already been discussed before, but all attempts today to search this email list's archives at > http://tolstoy.newcastle.edu.au/R/ > always return 404 errors. > > I found a 2008 discussion of this issue here > http://www.r-bloggers.com/rtools-and-cygwin-on-ms-windows/ > which suggests temporarily hacking your PATH when launching RTools. > > ______________________________________________ > 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.
Gabor Grothendieck
2014-Mar-12 09:14 UTC
[R] RTools and previous Cygwin installation--conflict?
On Wed, Mar 12, 2014 at 12:10 AM, Brent <yhbrent at yahoo.com> wrote:> Background: > --I already had the latest 64 bit cygwin (1.7.28) installed on my Windows 7 box > --I am a new R user; I just installed the latest 64 bit R today (3.0.3) > --a coworker told me that I also need to install RTools, so, I also installed the latest RTools (3.1) from > http://cran.r-project.org/bin/windows/Rtools/ > --during RTools installation, I accepted all the defaults, including "Cygwin DLLs" > --the sole additional item is that I checked to modify my PATH system env var > > ~~~~~~~~~~ > > So what's my concern? That modifed PATH system env var. After installation, PATH looks like > c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;...;<my cygwin 64 bit path> > So the RTools stuff is before my original cygwin path. > > This choice means that RTools should work just fine. > > ***But will it screw up my normal cygwin sessions?*** > > In particular, if during a cygwin session a command is needed and a command with that name is found in Rtools, I assume that that version will be used. But it may not be the newer one expected by cygwin--could that cause problems? > > Warren Young's very detailed answer here > https://stackoverflow.com/questions/18329233/is-it-advisable-to-switch-from-cygwin-32bit-to-cygwin-64bit > indicates that 32 and 64 bit cygwin do not mix well... > > ~~~~~~~~~~ > > Some more info. > > I accepted the installer's default to include "Cygwin DLLs", even tho I already had 64 bit cygwin installed, because of this note: > > "The Cygwin tools have been updated to versions current as of November 19, 2013. Cygwin now builds separate 32 bit and 64 bit versions; we include 32 bit versions of the tools. If your system only has 64 bit Cygwin DLLs installed, you will need to add our Cygwin DLLs to your path (or install the 32 bit Cygwin DLLs into Cygwin)." > http://cran.r-project.org/bin/windows/Rtools/ > > But while web searching this issue, I came across a contrary recommendation: > > "Some of the R tools use the Cygwin DLLs, which are included. If you already have Cygwin installed, you should not install these" > http://cran.r-project.org/bin/windows/Rtools/Rtools.txt > > (That last instruction, by the way, goes back many years, at least to 2008: > http://www.r-bloggers.com/wp-content/uploads/2008/12/Rtools1.txt > ) > > So, which instruction should I follow?I use a script that temporarily sets the paths to R and to Rtools only when R is being used in order to avoid conflicts. Change your path back and grab this: https://batchfiles.googlecode.com/svn/trunk/R.bat or this alternative which temporarily converts the paths on the current Windows console session only and is less automated but works on more systems: https://batchfiles.googlecode.com/svn/trunk/Rpathset.bat Associated links are: Documentation: https://batchfiles.googlecode.com/svn/trunk/batchfiles.md Convert documentation from markdown to PDF (optional, assumes pandoc installed): https://batchfiles.googlecode.com/svn/trunk/make-batchfiles-pdf.bat Home page: https://code.google.com/p/batchfiles/ Discussion (use the sqldf discussion group for discussion): https://groups.google.com/forum/?fromgroups#!forum/sqldf -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
Duncan Murdoch
2014-Mar-12 11:33 UTC
[R] RTools and previous Cygwin installation--conflict?
On 14-03-12 12:10 AM, Brent wrote:> Background: > --I already had the latest 64 bit cygwin (1.7.28) installed on my Windows 7 box > --I am a new R user; I just installed the latest 64 bit R today (3.0.3) > --a coworker told me that I also need to install RTools, so, I also installed the latest RTools (3.1) from > http://cran.r-project.org/bin/windows/Rtools/ > --during RTools installation, I accepted all the defaults, including "Cygwin DLLs" > --the sole additional item is that I checked to modify my PATH system env var > > ~~~~~~~~~~ > > So what's my concern? That modifed PATH system env var. After installation, PATH looks like > c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;...;<my cygwin 64 bit path> > So the RTools stuff is before my original cygwin path. > > This choice means that RTools should work just fine. > > ***But will it screw up my normal cygwin sessions?*** > > In particular, if during a cygwin session a command is needed and a command with that name is found in Rtools, I assume that that version will be used. But it may not be the newer one expected by cygwin--could that cause problems? > > Warren Young's very detailed answer here > https://stackoverflow.com/questions/18329233/is-it-advisable-to-switch-from-cygwin-32bit-to-cygwin-64bit > indicates that 32 and 64 bit cygwin do not mix well...My testing is done on 32 bit Cygwin. Most of our tools are copies taken from the 32 bit Cygwin build, but a few of them have local modifications: file, make, sh and tar. See the README.txt file for the discussion. Those ones will need 32 bit Cygwin DLLs available, and the last time I tested several years ago, R would not build with the Cygwin versions of those tools. So my advice to you would be one of the following: 1. Just use 32 bit Cygwin all the time with Rtools first in the path, and things should work unless you really need the true Cygwin versions of those 4 tools mentioned above. 2. Set up a separate shell to use when using the R tools. I would guess the R tools would work in a 64 bit bash shell with Rtools first on the path, but I haven't tested. I would not trust the advice in the stackoverflow article: in particular, do not use any Cygwin version of R. We do not support them and as far as I know they do not pass the self tests. You can use the native 64 bit Windows build of R as long as Windows supports 64 bit executables; it doesn't matter whether it is launched by 32 or 64 bit Cygwin. So for almost everyone, (1) would be the best choice. You only need 64 bit Cygwin if you are building 64 bit Cygwin programs and they need lots of memory.> > ~~~~~~~~~~ > > Some more info. > > I accepted the installer's default to include "Cygwin DLLs", even tho I already had 64 bit cygwin installed, because of this note: > > "The Cygwin tools have been updated to versions current as of November 19, 2013. Cygwin now builds separate 32 bit and 64 bit versions; we include 32 bit versions of the tools. If your system only has 64 bit Cygwin DLLs installed, you will need to add our Cygwin DLLs to your path (or install the 32 bit Cygwin DLLs into Cygwin)." > http://cran.r-project.org/bin/windows/Rtools/ > > But while web searching this issue, I came across a contrary recommendation: > > "Some of the R tools use the Cygwin DLLs, which are included. If you already have Cygwin installed, you should not install these" > http://cran.r-project.org/bin/windows/Rtools/Rtools.txt >That should be updated to say "if you already have 32 bit Cygwin installed". Duncan Murdoch> (That last instruction, by the way, goes back many years, at least to 2008: > http://www.r-bloggers.com/wp-content/uploads/2008/12/Rtools1.txt > ) > > So, which instruction should I follow? > > ~~~~~~~~~~ > > I apologize in advance if this issues has already been discussed before, but all attempts today to search this email list's archives at > http://tolstoy.newcastle.edu.au/R/ > always return 404 errors. > > I found a 2008 discussion of this issue here > http://www.r-bloggers.com/rtools-and-cygwin-on-ms-windows/ > which suggests temporarily hacking your PATH when launching RTools. > > ______________________________________________ > 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. >
Duncan: so good to get a reply from the RTools maintainer! I decided for now to go with your simplest suggestion 1.? So, I deinstalled 64 bit cygwin, reinstalled the 32 bit version, and hope that the RTools versions of the commands which will get picked up earlier in the PATH will not cause my cygwin any problems. Gabor: if I ever find Duncan's suggestion 1 inadequate, such as if I really need 64 bit cygwin, then I will adapt one of your scripts.? Your scripts, by the way, deserve special commendation: the code is beautiful, which is no easy feat in DOS...