[Rcpp-devel] Rcpp release candidate
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Jun 5 15:06:39 CEST 2014
Just to clarify the C++11 part is working now but the choking on the
vignette is still a problem.
On Thu, Jun 5, 2014 at 9:05 AM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
> I am using "R version 3.1.0 Patched (2014-05-09 r65562)" but its
> working now so perhaps you changed more than described.
>
>> devtools::install_github("RcppCore/Rcpp", ref = "feature/windows-c++0x",
> + build_vignette=FALSE)
> Installing github repo Rcpp/feature/windows-c++0x from RcppCore
> Downloading windows-c++0x.zip from
> https://github.com/RcppCore/Rcpp/archive/feature/windows-c++0x.zip
> Installing package from
> C:\Users\Gabor\AppData\Local\Temp\RtmpkNGNb7/windows-c++0x.zip
> Installing Rcpp
> "C:/PROGRA~1/R/R-3.1/bin/x64/R" --vanilla CMD INSTALL \
> "C:\Users\Gabor\AppData\Local\Temp\RtmpkNGNb7\devtools1d74220c82c\Rcpp-feature-windows-c-0x"
> \
> --library="C:/Users/Gabor/Documents/R/win-library/3.1" --install-tests
>
> * installing *source* package 'Rcpp' ...
> ** libs
>
> *** arch - i386
> g++ -m32 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c Date.cpp -o Date.o
> g++ -m32 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c Module.cpp -o Module.o
> g++ -m32 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c Rcpp_init.cpp -o Rcpp_init.o
> g++ -m32 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c api.cpp -o api.o
> g++ -m32 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c attributes.cpp -o attributes.o
> g++ -m32 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c barrier.cpp -o barrier.o
> g++ -m32 -shared -s -static-libgcc -o Rcpp.dll tmp.def Date.o Module.o
> Rcpp_init.o api.o attributes.o barrier.o
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib
> -LC:/PROGRA~1/R/R-3.1/bin/i386 -lR
> installing to C:/Users/Gabor/Documents/R/win-library/3.1/Rcpp/libs/i386
>
> *** arch - x64
> g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c Date.cpp -o Date.o
> g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c Module.cpp -o Module.o
> g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c Rcpp_init.cpp -o Rcpp_init.o
> g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c api.cpp -o api.o
> g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c attributes.cpp -o attributes.o
> g++ -m64 -I"C:/PROGRA~1/R/R-3.1/include" -DNDEBUG -I../inst/include/
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c barrier.cpp -o barrier.o
> g++ -m64 -shared -s -static-libgcc -o Rcpp.dll tmp.def Date.o Module.o
> Rcpp_init.o api.o attributes.o barrier.o
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib
> -LC:/PROGRA~1/R/R-3.1/bin/x64 -lR
> 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
> ** 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.allaire at 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 <ggrothendieck at gmail.com>
>> wrote:
>>>
>>> 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
>>> _______________________________________________
>>> Rcpp-devel mailing list
>>> Rcpp-devel at 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
--
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