[Rcpp-devel] Rcpp release candidate

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jun 5 09:36:12 CEST 2014


On Wed, Jun 4, 2014 at 11:21 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> Rcpp 0.11.2 should be ready.
>
> If anybody wants to jump in and do last minute testing, please do so now.
>
> I ran two complete tests against CRAN last weekend, the results are
> summarized as usual in the GitHub repo at
>
>    https://github.com/RcppCore/rcpp-logs
>
> Of 215 CRAN packages, all but 18 passed. Of those 18 a number where due to
> package sirt not building because ... I use FC='ccache gfortran' which is not
> gfortran so its configure failed. Grrr. I would pass next time.
>
> Anyway, 195 packages passed just fine, so we should be good.  But if there is
> something anyone of you would like to test, now would be a good time as I may
> upload the current version to CRAN in the next few days unless I hear
> objections.
>

There seems to be a problem using Rcpp::plugins("cpp11") on Windows
8.1.  It gives the error:
cc1plus.exe: error: unrecognized command line option '-std=c++11'

I am using Rtools 3.1.0.1942 (which is the latest version) and for
that it needs -std=c++0x or -std=gnu++0x

If I remove the plugins line and instead issue this line first then it
all works (except as per prior email I built Rcpp without vignettes to
get around that problem):
Sys.setenv("PKG_CXXFLAGS"="-std=c++0x") # for gcc 4.6.3

> code <- '
+ // [[Rcpp::plugins("cpp11")]]
+
+ #include <Rcpp.h>
+ #include <boost/range/irange.hpp>
+
+ using boost::irange;
+
+ // [[Rcpp::depends(BH)]]
+
+ // [[Rcpp::export]]
+ int useCpp11() {
+     auto sum(0);
+     for(const auto& i : irange(0,4)) { sum += i; }
+     return sum;
+ }
+ '
> library(Rcpp)
> sourceCpp(code = code)
g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG
-I"C:/Users/Gabor/Documents/R/win-library/3.1/Rcpp/include"
-I"C:/Users/Gabor/Documents/R/win-library/3.1/BH/include"
-I"d:/RCompile/CRANpkg/extralibs64/local/include"  -std=c++11    -O2
-Wall  -mtune=core2 -c file18a42f7f546e.cpp -o file18a42f7f546e.o
cc1plus.exe: error: unrecognized command line option '-std=c++11'
make: *** [file18a42f7f546e.o] Error 1 Warning message: running
command 'make -f "C:/PROGRA~1/R/R-3.1/etc/x64/Makeconf" -f
"C:/PROGRA~1/R/R-3.1/share/make/winshlib.mk"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="sourceCpp_83768.dll" WIN=64 TCLBIN=64
OBJECTS="file18a42f7f546e.o"' had status 2
Error in sourceCpp(code = code) :
  Error 1 occurred building shared library.
> useCpp11()
Error: could not find function "useCpp11"
> sourceCpp(code = code, verbose = TRUE)

Generated extern "C" functions
--------------------------------------------------------


#include <Rcpp.h>

RcppExport SEXP sourceCpp_37333_useCpp11() {
BEGIN_RCPP
    SEXP __sexp_result;
    {
        Rcpp::RNGScope __rngScope;
        int __result = useCpp11();
        PROTECT(__sexp_result = Rcpp::wrap(__result));
    }
    UNPROTECT(1);
    return __sexp_result;
END_RCPP
}

Generated R functions
-------------------------------------------------------

`.sourceCpp_37333_DLLInfo` <-
dyn.load('C:/Users/Gabor/AppData/Local/Temp/RtmpmUpJdX/sourcecpp_18a41e263c3c/sourceCpp_77519.dll')

useCpp11 <- Rcpp:::sourceCppFunction(function() {}, FALSE,
`.sourceCpp_37333_DLLInfo`, 'sourceCpp_37333_useCpp11')

rm(`.sourceCpp_37333_DLLInfo`)

Building shared library
--------------------------------------------------------

DIR: C:/Users/Gabor/AppData/Local/Temp/RtmpmUpJdX/sourcecpp_18a41e263c3c

C:/PROGRA~1/R/R-3.1/bin/x64/R CMD SHLIB -o "sourceCpp_77519.dll"
"file18a42f7f546e.cpp"
g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG
-I"C:/Users/Gabor/Documents/R/win-library/3.1/Rcpp/include"
-I"C:/Users/Gabor/Documents/R/win-library/3.1/BH/include"
-I"d:/RCompile/CRANpkg/extralibs64/local/include"  -std=c++11    -O2
-Wall  -mtune=core2 -c file18a42f7f546e.cpp -o file18a42f7f546e.o
cc1plus.exe: error: unrecognized command line option '-std=c++11'
make: *** [file18a42f7f546e.o] Error 1
Warning message:
running command 'make -f "C:/PROGRA~1/R/R-3.1/etc/x64/Makeconf" -f
"C:/PROGRA~1/R/R-3.1/share/make/winshlib.mk"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="sourceCpp_77519.dll" WIN=64 TCLBIN=64
OBJECTS="file18a42f7f546e.o"' had status 2
Error in sourceCpp(code = code, verbose = TRUE) :
  Error 1 occurred building shared library.




-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com


More information about the Rcpp-devel mailing list