Ted Byers
2010-Sep-21 20:11 UTC
[Rd] trouble compiling RMySQL (and others) for 64 bit windows.
I have a 64 bit machine running 64 bit windows 7 pro, 64 bit MySQL, and 64 bit R 2.11.1. I have also installed RTools for 64 bit windows for this version of R (archive name is oldWin64toolchain.zip; the install path for its contents is C:\RTools, if that matters). I can open up a commandline window and invoke any of the programs in both bin directories (both added to the system path). There are several packages for which I could not find 64 bit binaries RMySQL, RPostgreSQL, RQRMlib, &c. While I don't have time at present to develop ne packages for R, these packages are things I routinely use on my 32 bit machine (where, thankfully, all seems to be working fine). Therefore, my only interest is in getting or making the 64 bit binaries for these packages so I can duplicate on the new 64 bit machine what I had been doing on the old 32 bit machine. Note, I routinely develop new software using MS VS (originally v 6, and then VS 2005, and now vs 2010), and if I need to work up code to run on some flavour of unix, I use the cygwin environment. Therefore, I have no qualms about compiling programs I use from source. I just prefer not to if there is already a binary distribution for whatever platform I happen to be using. I began by trying to follow the instructions provided on http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL, and found a couple issues. First, there was no Renviron.site in C:/Program Files/R/R-2.11.1-x64/etc so I made one and placed in it the following: MYSQL_HOME=C:\PROGRA~1\MySQL\MYSQLS~1.1 The full path to the installation of MySQL is: C:\Program Files\MySQL\MySQL Server 5.1 Unlike what is said on the biostat.mc.vanderbilt.edu pages, MYSQL_HOME is still empty:> Sys.getenv('MYSQL_HOME')MYSQL_HOME "" This is when I start R AFTER having made the Renviron.site file. Something I notice, though, that may have a bearing on this is that although Emacs finds my new Renviron.site file when I navigate to that directory, it does not appear in Windows Explorer. I am wondering if Windows 7 is somehow blocking access to it. If that guess is correct, the question becomes, how do I fix that? If it isn't correct, what should I check? This is not an insurmountable problem, though as I can always set that environment variable at the beginning of a session. I do that already on other systems that are 32 bit clients that have to talk to 64 bit servers. It is just mildly disturbing that R does not seem to know about the Renviron.site file I made for it. Second, I read in the instructions the following:> 3. *Re-start R and execute install.packages('RMySQL',type='source')* at > the R prompt. > > As long as you followed the above steps correctly, RMySQL<https://mail.google.com/wiki/Main/RMySQL>will install cleanly and you will be able to immediately load it and use it. >However, when I follow this instruction I get:> install.packages('RMySQL',type='source')Warning in install.packages("RMySQL", type = "source") : argument 'lib' is missing: using 'C:\Users\Ted\Documents/R/win64-library/2.11' --- Please select a CRAN mirror for use in this session --- trying URL 'http://probability.ca/cran/src/contrib/RMySQL_0.7-5.tar.gz' Content type 'application/x-gzip' length 160769 bytes (157 Kb) opened URL downloaded 157 Kb * installing *source* package 'RMySQL' ... Warning in system("sh ./configure.win") : sh not found ERROR: configuration failed for package 'RMySQL' * removing 'C:/Users/Ted/Documents/R/win64-library/2.11/RMySQL' The downloaded packages are in ‘C:\Users\Ted\AppData\Local\Temp\Rtmp7xg8yb\downloaded_packages’ Warning message: In install.packages("RMySQL", type = "source") : installation of package 'RMySQL' had non-zero exit status>It is clearly failing before it could choke on the MYSQL_HOME value. On reading it, it is no surprise to me that it failed to find sh as I recognize that as one of several unix shells. What I don't know is how I should alter the instructions provided on the vanderbilt site so that the install works on Windows 7. I know I have access to sh in cygwin, but I really don't want to confound my cygwin environment with what I use for R. While I have not used RTools before, I would assume that whatever issues I am presently facing would impact any package for which I need to build 64 bit binaries for Windows 7. So what do I need to know in order to effectively use RTools on compiling an arbitrary package, perhaps using RMySQL as an example (since that is the first one I need to compile). Thanks Ted [[alternative HTML version deleted]]
Uwe Ligges
2010-Nov-13 18:47 UTC
[Rd] trouble compiling RMySQL (and others) for 64 bit windows.
I just found this obviously unanswered message: Yes, you need Rtools installed as described in the manual "R Installation and Administration" which explains what to do in more detail. It makes sense to upgrade to R-2.12.0 if you have not already done so. Best, Uwe Ligges On 21.09.2010 22:11, Ted Byers wrote:> I have a 64 bit machine running 64 bit windows 7 pro, 64 bit MySQL, and 64 > bit R 2.11.1. > > I have also installed RTools for 64 bit windows for this version of R > (archive name is oldWin64toolchain.zip; the install path for its contents > is C:\RTools, if that matters). I can open up a commandline window and > invoke any of the programs in both bin directories (both added to the system > path). > There are several packages for which I could not find 64 bit binaries > RMySQL, RPostgreSQL, RQRMlib,&c. While I don't have time at present to > develop ne packages for R, these packages are things I routinely use on my > 32 bit machine (where, thankfully, all seems to be working fine). > Therefore, my only interest is in getting or making the 64 bit binaries for > these packages so I can duplicate on the new 64 bit machine what I had been > doing on the old 32 bit machine. > > Note, I routinely develop new software using MS VS (originally v 6, and then > VS 2005, and now vs 2010), and if I need to work up code to run on some > flavour of unix, I use the cygwin environment. Therefore, I have no qualms > about compiling programs I use from source. I just prefer not to if there > is already a binary distribution for whatever platform I happen to be using. > > I began by trying to follow the instructions provided on > http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL, and found a couple > issues. > > > > First, there was no Renviron.site in C:/Program Files/R/R-2.11.1-x64/etc so > I made one and placed in it the following: > > MYSQL_HOME=C:\PROGRA~1\MySQL\MYSQLS~1.1 > > The full path to the installation of MySQL is: C:\Program Files\MySQL\MySQL > Server 5.1 > > Unlike what is said on the biostat.mc.vanderbilt.edu pages, MYSQL_HOME is > still empty: > > >> Sys.getenv('MYSQL_HOME') > MYSQL_HOME > "" > This is when I start R AFTER having made the Renviron.site file. > > Something I notice, though, that may have a bearing on this is that although > Emacs finds my new Renviron.site file when I navigate to that directory, it > does not appear in Windows Explorer. I am wondering if Windows 7 is somehow > blocking access to it. If that guess is correct, the question becomes, how > do I fix that? If it isn't correct, what should I check? This is not an > insurmountable problem, though as I can always set that environment variable > at the beginning of a session. I do that already on other systems that are > 32 bit clients that have to talk to 64 bit servers. It is just mildly > disturbing that R does not seem to know about the Renviron.site file I made > for it. > > Second, I read in the instructions the following: > > >> 3. *Re-start R and execute install.packages('RMySQL',type='source')* at >> the R prompt. >> >> As long as you followed the above steps correctly, RMySQL<https://mail.google.com/wiki/Main/RMySQL>will install cleanly and you will be able to immediately load it and use it. >> > However, when I follow this instruction I get: >> install.packages('RMySQL',type='source') > Warning in install.packages("RMySQL", type = "source") : > argument 'lib' is missing: using > 'C:\Users\Ted\Documents/R/win64-library/2.11' > --- Please select a CRAN mirror for use in this session --- > trying URL 'http://probability.ca/cran/src/contrib/RMySQL_0.7-5.tar.gz' > Content type 'application/x-gzip' length 160769 bytes (157 Kb) > opened URL > downloaded 157 Kb > * installing *source* package 'RMySQL' ... > Warning in system("sh ./configure.win") : sh not found > ERROR: configuration failed for package 'RMySQL' > * removing 'C:/Users/Ted/Documents/R/win64-library/2.11/RMySQL' > The downloaded packages are in > ?C:\Users\Ted\AppData\Local\Temp\Rtmp7xg8yb\downloaded_packages? > Warning message: > In install.packages("RMySQL", type = "source") : > installation of package 'RMySQL' had non-zero exit status >> > > It is clearly failing before it could choke on the MYSQL_HOME value. On > reading it, it is no surprise to me that it failed to find sh as I recognize > that as one of several unix shells. What I don't know is how I should alter > the instructions provided on the vanderbilt site so that the install works > on Windows 7. I know I have access to sh in cygwin, but I really don't want > to confound my cygwin environment with what I use for R. > > While I have not used RTools before, I would assume that whatever issues I > am presently facing would impact any package for which I need to build 64 > bit binaries for Windows 7. So what do I need to know in order to > effectively use RTools on compiling an arbitrary package, perhaps using > RMySQL as an example (since that is the first one I need to compile). > > Thanks > > Ted > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel