Watch out for this part: Le 5 juin 2014 à 15:05, Gabor Grothendieck <ggrothendi...@gmail.com> a écrit :
> installing to C:/Users/Gabor/Documents/R/win-library/3.1/Rcpp/libs/x64 > Warning in file.copy(files, dest, overwrite = TRUE) : > problem copying .\Rcpp.dll to > C:\Users\Gabor\Documents\R\win-library\3.1\Rcpp\libs\x64\Rcpp.dll: > Permission denied I guess you tried to install from github while Rcpp was already loaded in your R session, so it has not really been installed. Romain > ** R > ** inst > ** tests > ** preparing package for lazy loading > ** help > *** installing help indices > ** building package indices > ** installing vignettes > ** testing if installed package can be loaded > *** arch - i386 > *** arch - x64 > * DONE (Rcpp) >> 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, rebuild = TRUE) >> useCpp11() > [1] 6 >> R.version.string > [1] "R version 3.1.0 Patched (2014-05-09 r65562)" >> > > > On Thu, Jun 5, 2014 at 4:21 AM, JJ Allaire <jj.alla...@gmail.com> wrote: >> I couldn't reproduce this on Windows 7 with R 3.1 (which should have been >> using USE_CXX1X="yes" under the hood resulting in -std=c++0x passed to gcc). >> >> However, I have this change which should make the cpp11 plugin automatically >> pass -std=c++0x when on R <= 3.0: >> >> https://github.com/RcppCore/Rcpp/pull/148 >> >> Does that work for you? You can install with: >> >> devtools::install_github("RcppCore/Rcpp", ref = "feature/windows-c++0x") >> >> >> On Thu, Jun 5, 2014 at 3:36 AM, Gabor Grothendieck <ggrothendi...@gmail.com> >> wrote: >>> >>> On Wed, Jun 4, 2014 at 11:21 PM, Dirk Eddelbuettel <e...@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 >>> _______________________________________________ >>> Rcpp-devel mailing list >>> Rcpp-devel@lists.r-forge.r-project.org >>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >> >> > > > > -- > Statistics & Software Consulting > GKX Group, GKX Associates Inc. > tel: 1-877-GKX-GROUP > email: ggrothendieck at gmail.com > _______________________________________________ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel