0

I'm having issues getting Rtools to function. I've searched around SO and other sites, and still can't get to the bottom of this.

I'm using R version 3.6.1, and trying to install Rtools 35. I'm using RStudio 1.0.143, but running the code in R console doesn't produce different results.

I've installed Rtools with Administrative Rights, in C:\Rtools Rtools\bin, Rtools\mingw_32\bin, and Rtools\mingw_64\bin are all in PATH. The gcc compilers were installed in the mingw_32 and ming_64 binaries, and I copied the one from the mingw_32 folder and put it in Rtools\bin (as suggested by one post.

Running:

Sys.getenv('PATH')

> C:\\Users\\robin.ghertner\\Documents\\R\\R-3.6.1\\bin\\x64;C:\\oracle\\product\\11.2.0\\client_1\\BIN;C:\\Program Files (x86)\\Common
> Files\\Oracle\\Java\\javapath;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program
> Files (x86)\\HID Global\\ActivClient\\;C:\\Program Files\\HID
> Global\\ActivClient\\;C:\\Program Files
> (x86)\\Sennheiser\\SoftphoneSDK\\;C:\\Program Files (x86)\\Common
> Files\\Roxio Shared\\DLLShared\\;C:\\Program Files (x86)\\Common
> Files\\Roxio Shared\\10.0\\DLLShared\\;C:\\Program Files
> (x86)\\CheckPoint\\Endpoint Security\\Endpoint Common\\bin;C:\\Program
> Files\\SASHome\\Secure\\ccme4;C:\\Program
> Files\\SASHome\\x86\\Secure\\ccme4;C:\\Users\\robin.ghertner\\Documents\\R\\R-3.6.1\\bin;C:\\Rtools\\bin;C:\\Rtools\\mingw_32\\bin;C:\\Rtools\\mingw_64\\bin;C:\\Users\\robin.ghertner\\AppData\\Local\\Microsoft\\WindowsApps

Following RStudio not finding RTools ,

`Sys.which("ls.exe")`

> C:\\Rtools\\bin\\ls.exe

Sys.which("gcc.exe")

> "C:\\Rtools\\bin\\gcc.exe"

It looks like RTools is installed:

library(devtools)
find_rtools()

> [1] TRUE

However, doing a simple evaluation in Rcpp throws an error. Running:

library(Rcpp)
evalCpp("1+1",showOutput = T)

> C:/Users/ROBIN~1.GHE/DOCUME~1/R/R-36~1.1/bin/x64/R CMD SHLIB -o
> "sourceCpp_6.dll" "" "file319c51e36fba.cpp"  
> C:/Rtools/mingw_64/bin/g++ 
> -I"C:/Users/ROBIN~1.GHE/DOCUME~1/R/R-36~1.1/include" -DNDEBUG   -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/Rcpp/include/"  -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/RcppEigen/include/"
> -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/RcppEigen/include/unsupported"
> -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/BH/include" -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/StanHeaders/include/src/"
> -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/StanHeaders/include/"
> -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS -std=c++1y  -I"C:/Users/robin.ghertner/Documents/R/R-3.6.1/library/Rcpp/include" -I"C:/Users/robin.ghertner/AppData/Local/Temp/RtmpSCAQxh/sourceCpp-x86_64-w64-mingw32-1.0.2"
> -march=native     -O2 -Wall  -mtune=generic -c file319c51e36fba.cpp -o file319c51e36fba.o
>       1 [main] make 14624 C:\Rtools\bin\make.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x1200000
> - 0x1400000, (child has 0xC00000 - 0xE00000), Win32 error 487
>     389 [main] make 14624 cygwin_exception::open_stackdumpfile: Dumping stack trace to make.exe.stackdump
>       0 [main] make 14852 fork: child -1 - forked process 14624 died unexpectedly, retry 0, exit code 0x100, errno 11 make: fork: Resource
> temporarily unavailable Error in sourceCpp(code = code, env = env,
> rebuild = rebuild, cacheDir = cacheDir,  :    Error 1 occurred
> building shared library.

I've restarted my computer, and tried reinstalling Rtools a couple of times. I'm at a loss of what to try next.

  • Are you on a 32 bit or 64 bit machine? You should probably only include the one on your path that's relevant for your machine architecture. This might help you determine which you have: https://support.microsoft.com/en-us/help/827218/how-to-determine-whether-a-computer-is-running-a-32-bit-version-or-64 – MrFlick Oct 29 '19 at 20:10
  • 3
    The Eigen/BH/Stan/... includes are *not* added by Rcpp when you do `evalCpp()` -- which is why that is a good litmus test. Maybe your `~/.R/Makevars` is borked? – Dirk Eddelbuettel Oct 29 '19 at 20:12
  • 2
    Also make sure your Rtools PATH setting is at the front. Else a wrong tool may get picked up. I used to write myself batch files that just pre-pended the R paths when I needed them. – Dirk Eddelbuettel Oct 29 '19 at 20:15

1 Answers1

0
  1. you need to check your folder name(C:/Rtools40/usr/bin)

  2. you need to check which bit you used. (32bit or 64bit)

  3. https://github.com/r-windows/docs/blob/master/rtools40.md#readme --> you should open pacman and follow pacman command

  4. If you still have error then you need to check Bioconductor version so that you can figure it out..maybe

 if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.11")
Euijin
  • 11
  • 2