Skip to content

Rcpp compiles using -std=gnu++11 but not -std=c++11. Is this a toolchain issue or an Rcpp issue? #360

@aadler

Description

@aadler

Whilst trying to test the new Windows toolchains based on GCC 4.9.x, I have come across an interesting issue. When I compile Rcpp with either nothing or std=gnu++11, Rcpp compiles without any issues. However, when I pass std=c++11 I get:

* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** libs
g++ -m64 -I"C:/R/R-PATC~2/include" -DNDEBUG -I../inst/include/    -I"C:/R/RLocalSoft/extsoft/include"     -std=c++11 -O2 -mtune=ivybridge -pipe -c Date.cpp -o Date.o
g++ -m64 -I"C:/R/R-PATC~2/include" -DNDEBUG -I../inst/include/    -I"C:/R/RLocalSoft/extsoft/include"     -std=c++11 -O2 -mtune=ivybridge -pipe -c Module.cpp -o Module.o
g++ -m64 -I"C:/R/R-PATC~2/include" -DNDEBUG -I../inst/include/    -I"C:/R/RLocalSoft/extsoft/include"     -std=c++11 -O2 -mtune=ivybridge -pipe -c Rcpp_init.cpp -o Rcpp_init.o
g++ -m64 -I"C:/R/R-PATC~2/include" -DNDEBUG -I../inst/include/    -I"C:/R/RLocalSoft/extsoft/include"     -std=c++11 -O2 -mtune=ivybridge -pipe -c api.cpp -o api.o
api.cpp:40:30: fatal error: execinfo.h: No such file or directory
         #include <execinfo.h>
                              ^
compilation terminated.
make: *** [api.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/R/R-PATC~2/etc/x64/Makeconf" -f "C:/R/R-PATC~2/share/make/winshlib.mk" -f "\\[REDACTED]/.R/Makevars" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Rcpp.dll" WIN=64 TCLBIN=64 OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o"' had status 2
ERROR: compilation failed for package 'Rcpp'
* removing 'C:/R/R-patched/library/Rcpp'

The downloaded source packages are in
        ‘C:\R\temp\Rtmp4mtdWr\downloaded_packages’
Warning messages:
1: running command '"C:/R/R-patched/bin/x64/R" CMD INSTALL --byte-compile -l "C:\R\R-patched\library" C:\R\temp\Rtmp4mtdWr/downloaded_packages/Rcpp_0.12.0.tar.gz' had status 1 
2: In install.packages("Rcpp", type = "source", INSTALL_opts = "--byte-compile") :
  installation of package ‘Rcpp’ had non-zero exit status

Is this a toolchain issue, or an issue with Rcpp being built under Windows?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions