robin.datadrivers
robin.datadrivers

Reputation: 595

Trouble installing Rtools

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.

Upvotes: 0

Views: 1135

Answers (1)

Euijin
Euijin

Reputation: 11

  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")

Upvotes: 0

Related Questions