[Rcpp-devel] C++11 in Windows R package

Dirk Eddelbuettel edd at debian.org
Thu May 29 00:18:14 CEST 2014


Hi Matteo,

On 28 May 2014 at 22:58, Matteo Fasiolo wrote:
| Dear Rcpp developers,
| 
|  I am working on a package which uses Rcpp/RcppArmadillo, OpenMP and C++11.
|
| Everything works fine under Linux: the package passes R CMD check --as-cran,
| while tests and vignettes work fine.

Nice.
 
| I uploaded the package on win-builder, but I keep getting the error at the
| bottom.
| 
| I have included the line CXX_STD = CXX11 in makefile.win as written in "Writing
| R extensions". I have read comments on SO regarding Rtools not supporting many
| C++11
| features. Is that the reason for the error or am I missing something?

That could a bug of my making.  Look at the sources -- on Unix / OS X we run
the (standard script configure) which moves RcppArmadilloLapack.h.in to
RcppArmadilloLapack.h and adjust one setting (based on which BLAS / LAPACK
libraries are used; this is due to a change from last fall).  I am wondering
if I overlooked something for Windows here...

Could so a simple check with a smaller package without any of the other added
complexities (maybe even via RcppArmadillo.package.skeleton()) and see if
that works?   If it does, try adding the other pieces one by one and see
where it breaks.

It may well be a little unlikely that I broke all Windows builds or I would
have heard from Uwe, but it still seems somewhat probably that this is related.

Dirk
 
| Thanks,
| 
| Matteo
| 
| 
| *** arch - i386
| g++  -std=c++0x -I"D:/RCompile/recent/R-3.1.0/include" -DNDEBUG    -I"d:/RCompile/CRANpkg/lib/3.1/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include" -I"d:/Rcompile/CRANpkg/extralibs215/local215/include"     -O2 -Wall  -mtune=core2 -c dmvnCpp.cpp -o dmvnCpp.o
| In file included from d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloForward.h:28:0,
|                  from d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadillo.h:30,
|                  from mvnfast.h:4,
|                  from dmvnCpp.cpp:1:
| d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloConfig.h:90:35: fatal error: RcppArmadilloLapack.h: No such file or directory
| compilation terminated.
| make: *** [dmvnCpp.o] Error 1
| Warning: running command 'make -f "Makevars.win" -f "D:/RCompile/recent/R-3.1.0/etc/i386/Makeconf" -f "D:/RCompile/recent/R-3.1.0/etc/i386/Makevars.site" -f "D:/RCompile/recent/R-3.1.0/share/make/winshlib.mk" CXX='$(CXX1X) $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)' SHLIB="mvnfast.dll" OBJECTS="dmvnCpp.o mahaCpp.o msCpp.o rmvnCpp.o"' had status 2
| g++  -std=c++0x -I"D:/RCompile/recent/R-3.1.0/include" -DNDEBUG    -I"d:/RCompile/CRANpkg/lib/3.1/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include" -I"d:/Rcompile/CRANpkg/extralibs215/local215/include"     -O2 -Wall  -mtune=core2 -c dmvnCpp.cpp -o dmvnCpp.o
| In file included from d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloForward.h:28:0,
|                  from d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadillo.h:30,
|                  from mvnfast.h:4,
|                  from dmvnCpp.cpp:1:
| d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloConfig.h:90:35: fatal error: RcppArmadilloLapack.h: No such file or directory
| compilation terminated.
| make: *** [dmvnCpp.o] Error 1
| Warning: running command 'make -f "Makevars.win" -f "D:/RCompile/recent/R-3.1.0/etc/i386/Makeconf" -f "D:/RCompile/recent/R-3.1.0/etc/i386/Makevars.site" -f "D:/RCompile/recent/R-3.1.0/share/make/winshlib.mk" CXX='$(CXX1X) $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)' SHLIB="mvnfast.dll" OBJECTS="dmvnCpp.o mahaCpp.o msCpp.o rmvnCpp.o" symbols.rds' had status 2
| ERROR: compilation failed for package 'mvnfast'
| * removing 'd:/RCompile/CRANguest/R-release/lib/mvnfast'
| 
| 
| 
| 
| _______________________________________________
| 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

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list