r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.4k stars 758 forks source link

Devtools not detecting that Rtools is the correct version with Microsoft R #1852

Closed mattfidler closed 6 years ago

mattfidler commented 6 years ago

For some reason there are people who install Rtools to a non-standard directory with microsoft R and add it to their path, it says it is a non-supported version of Rtools. This is reported here:

https://github.com/nlmixrdevelopment/nlmixr/issues/70

I'm letting you know for awareness. At the very least, the error message does not make sense:

#WARNING: Rtools 3.5 found on the path at C:/Apps/R/Rtools_3.5/Rtools is not compatible with R 3.5.1.

#Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/, remove the incompatible version from your PATH.
#Installation failed: Could not find build tools necessary to build RxODE
nholford commented 6 years ago

How can anybody think that forcing users to install in the root directory is an acceptable practice? I don't think you should describe the C:\Rtools directory as the standard directory. It should be described as non-standard and forced on users by bad programming practices.

Do you think this is a devtools programming error? Do you know if anybody ever got devtools to work with Rtools not in C:\?

jimhester commented 6 years ago

The directory Rtools is installed is not the problem and devtools does not even require that Rtools be on your PATH.

I believe this is simply a duplicate of https://github.com/r-lib/devtools/issues/1772, please try that workaround or updating to the development version of devtools and see if that fixes your issue.

mattfidler commented 6 years ago

Thank you @jimhester . Hopefully it makes it on CRAN soon.

luckygoh commented 6 years ago

Hi,

the workaround seems like not working for me. or there is something i did wrong.

I used the code below as mentioned by previously and get a TRUE.

but the error still occurs.

`

find_rtools() [1] TRUE devtools::install_github("sneumann/xcms") Downloading GitHub repo sneumann/xcms@master from URL https://api.github.com/repos/sneumann/xcms/zipball/master WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.

Installing xcms "C:/PROGRA~ 1/R/R-35~ 1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD \ INSTALL \ "C:/Users/UM/AppData/Local/Temp/Rtmp2LXJjL/devtools26081b46695c/sneumann-xcms-f1eecf6" \ --library="C:/Users/UM/Documents/R/win-library/3.5" --install-tests installing source* package 'xcms' ... * libs Warning in system(cmd) : 'make' not found ERROR: compilation failed for package 'xcms' removing 'C:/Users/UMSBIOTECH/Documents/R/win-library/3.5/xcms' *restoring previous 'C:/Users/UMSBIOTECH/Documents/R/win-library/3.5/xcms' In R CMD INSTALL Installation failed: Command failed (1) `

KoichiHashikawa commented 5 years ago

yes, I also got the same error as @luckygoh. In my case, find_rtools gave TRUE, but whenever I tried to install packages through GitHub using devtools, it installed other packages (such as Rcpp) and crashed R.

lock[bot] commented 5 years ago

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/