0

I need to use some c++ code in order to speed up some computation. In order to do this I need Rtools.

I went to : https://cran.r-project.org/bin/windows/Rtools/ and installed the latest stable version (Rtools35.exe (recommended)). Insallation seems fine.

Then I launch find_rtools from package devtools. After an initial error like this Is Rtools incompatible with R version 3.5.1? I managed to fix it thanks to that answer.

Now find_rtools return TRUE.

I try then to source my cpp code and this error still pop up:

C:/Rtools/mingw_64/bin/g++ -I"C:/Users/MARCO~1.FUM/DOCUME~1/R/R-35~1.0/include" -DNDEBUG -I"C:/Users/marco.fumagalli/Documents/R/R-3.5.0/library/Rcpp/include" -I"C:/Users/marco.fumagalli/CustomerNavigation/src/features" -O2 -Wall -mtune=generic -c bDist.cpp -o bDist.o 10 [main] make 20472 child_copy: stack write copy failed, 0x65ABA0..0x660000, done 0, windows pid 20472, Win32 error 5 482 [main] make 20472 fork: child 14912 - pid 14912, exitval 0x103, errno 11 make: fork: Resource temporarily unavailable Error in sourceCpp("src/features/bDist.cpp") : Error 1 occurred building shared library. trying URL

Then it pops up a window saying that I need a c++ compiler (?!).

As pointed out here Rcpp can't find Rtools: "Error 1 occurred building shared library" I 've already added to PATH the suggested bin path.

My R version info

platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          5.0                         
year           2018                        
month          04                          
day            23                          
svn rev        74626                       
language       R                           
version.string R version 3.5.0 (2018-04-23)
nickname       Joy in Playing  

I'm on windows 10.

Thanks

Marco Fumagalli
  • 2,307
  • 3
  • 23
  • 41
  • Is the file `src/features/bDist.cpp`existing? The errors message tells you it can not find it. And yes you need a c++ compiler, why are you surprised? While R code is interpreted, c++ requires compilation – Chelmy88 Oct 07 '19 at 10:30
  • Because I've already installed a c++ compiler. It seems that it isn't able to find the path for the c++ compiler or is searching for the compiler in the wrong path ? – Marco Fumagalli Oct 07 '19 at 10:41
  • 1
    I managed to make it work. A simple reboot of windows make everything worked. :) – Marco Fumagalli Oct 07 '19 at 10:42

0 Answers0