Question

I am trying to make a R development environment in my computer. During last hour, I could successfully install RTools and RCpp. But when I tried the last element RInside package, I get following error. I can see the reason is because g++ or make does not recognize path including space (Program Files -> Files) But how can I change the make file or batter question is ... where is the make file producing following compilation?

> install.packages(c("RInside"),type="source")
trying URL 'http://cran.revolutionanalytics.com/src/contrib/RInside_0.2.8.tar.gz'
Content type 'application/x-gzip' length 61012 bytes (59 Kb)
opened URL
downloaded 59 Kb

* installing *source* package 'RInside' ...
** package 'RInside' successfully unpacked and MD5 sums checked
** libs
cygwin warning:
  MS-DOS style path detected: C:/PROGRA~1/R/R-215~1.1/etc/i386/Makeconf
  Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-215~1.1/etc/i386/Makeconf
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
C:/PROGRA~1/R/R-215~1.1/bin/i386/Rscript.exe tools/RInsideAutoloads.r > RInsideAutoloads.h
C:/PROGRA~1/R/R-215~1.1/bin/i386/Rscript.exe tools/RInsideEnvVars.r   > RInsideEnvVars.h
g++  -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -I../inst/include/   -I"C:/Program Files/R/R-2.15.1/library/Rcpp/include"      -O2 -Wall  -mtune=core2 -c MemBuf.cpp -o MemBuf.o
g++  -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -I../inst/include/   -I"C:/Program Files/R/R-2.15.1/library/Rcpp/include"      -O2 -Wall  -mtune=core2 -c RInside.cpp -o RInside.o
g++ -shared -s -static-libgcc -o RInside.dll tmp.def MemBuf.o RInside.o C:/Program Files/R/R-2.15.1/library/Rcpp/lib/i386/libRcpp.a -LC:/PROGRA~1/R/R-215~1.1/bin/i386 -lR
g++.exe: error: Files/R/R-2.15.1/library/Rcpp/lib/i386/libRcpp.a: No such file or directory
ar qc libRInside.a MemBuf.o RInside.o
cp libRInside.a ../inst/lib/i386
g++  -Wl,--export-all-symbols -shared -o libRInside.dll MemBuf.o RInside.o C:/Program Files/R/R-2.15.1/library/Rcpp/lib/i386/libRcpp.a   -L"C:/PROGRA~1/R/R-215~1.1/bin/i386" -lR  -lws2_32
g++.exe: error: Files/R/R-2.15.1/library/Rcpp/lib/i386/libRcpp.a: No such file or directory
make: *** [libRInside.dll] Error 1
ERROR: compilation failed for package 'RInside'
* removing 'C:/Program Files/R/R-2.15.1/library/RInside'

The downloaded source packages are in
        ‘C:\Users\Administrator\AppData\Local\Temp\Rtmp6lSKly\downloaded_packages’
Warning messages:
1: running command 'C:/PROGRA~1/R/R-215~1.1/bin/i386/R CMD INSTALL -l "C:/Program Files/R/R-2.15.1/library"   C:\Users\ADMINI~1\AppData\Local\Temp\Rtmp6lSKly/downloaded_packages/RInside_0.2.8.tar.gz' had status 1 
2: In install.packages(c("RInside"), type = "source") :
  installation of package ‘RInside’ had non-zero exit status
> 
Was it helpful?

Solution

Install in a path that does not include spaces -- I like C:/opt/R/R-library/ for my R packages.

The final link command fails because of the space.

This question has been asked and answered numerous times before here and on the rcpp-devel list.

OTHER TIPS

It looks like this page has a link to a binary version of RInside for Windows. I downloaded it and it seems to also include source.

http://cran.r-project.org/web/packages/RInside/index.html

Windows binary: RInside_0.2.8.zip

http://cran.r-project.org/bin/windows/contrib/r-release/RInside_0.2.8.zip

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top