Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support R 3.3.0 Windows new toolchain #451

Merged
merged 2 commits into from
Mar 27, 2016

Conversation

qinwf
Copy link
Contributor

@qinwf qinwf commented Mar 27, 2016

Tested with R-3.3.0 alpha build for Windows with Rtools 3.3.

if (isGcc49) {
env$RTOOLS <- .rtoolsPath(rToolsPath)
binpref <- ifelse(identical(R.Version()$arch, "x86_64"), "mingw_64", "mingw_32")
env$BINPREF <- file.path(env$RTOOLS, binpref, "bin//", fsep = "/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checking -- is the double slash, in "bin//", really necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, without //, then will show this:

c:/Rtools//mingw_64/bing++  -I"C:/PROGRA~1/R/R-33~1.0AL/include" -DNDEBUG     -I"C:/Users/outwen/Documents/R/win-library/3.3/Rcpp/include" -I"C:/Users/outwen/AppData/Local/Temp/RtmpWk5CaT"  -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c file2680116e76f7.cpp -o file2680116e76f7.o
c:/Rtools//mingw_64/bing++: not found
make: *** [file2680116e76f7.o] Error 127
Warning message:
running command 'make -f "C:/PROGRA~1/R/R-33~1.0AL/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.0AL/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="sourceCpp_1.dll" WIN=64 TCLBIN=64 OBJECTS="file2680116e76f7.o"' had status 2 
Error in sourceCpp(code = "\n  #include <Rcpp.h>\n\n  // [[Rcpp::export]]\n  int fibonacci(const int x) {\n    if (x == 0) return(0);\n    if (x == 1) return(1);\n    return (fibonacci(x - 1)) + fibonacci(x - 2);\n  }") : 
  Error 1 occurred building shared library.

WARNING: The tools required to build C++ code for R were not found.

Please download and install the appropriate version of Rtools:

http://cran.r-project.org/bin/windows/Rtools/

@qinwf
Copy link
Contributor Author

qinwf commented Mar 27, 2016

Also tested with R 3.2.4 for Windows with Rtools 3.3.

qinwf pushed a commit to qinwf/Rcpp that referenced this pull request Mar 27, 2016
@jjallaire
Copy link
Member

You can actually include the $(WIN) argument within BINPREF to have R
substitute the architecture automatically, here's what we do in RStudio:

https://github.com/rstudio/rstudio/blob/01d519c07e78672864ab63be9b3257aa54789f65/src/cpp/core/r_util/RToolsInfo.cpp#L159-L161

On Sun, Mar 27, 2016 at 2:28 AM, qinwf notifications@github.com wrote:

Also tested with R 3.2.4 for Windows with Rtools 3.3.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#451 (comment)

qinwf added 2 commits March 27, 2016 18:22
R 3.3.0  Windows uses a new toolchain based on gcc 4.9.3 and mingw-w64
v3.
@qinwf
Copy link
Contributor Author

qinwf commented Mar 27, 2016

Thanks @jjallaire , just update it.

@jjallaire jjallaire merged commit 799b76e into RcppCore:master Mar 27, 2016
@eddelbuettel
Copy link
Member

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants