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

Matteo Fasiolo matteo.fasiolo at gmail.com
Mon Jun 9 12:11:12 CEST 2014

Hi All,

 I have put the package on CRAN
<http://cran.r-project.org/web/packages/mvnfast/index.html>, but I get errors
on some platform

In particular, on
 r-devel-linux-x86_64-fedora-clang, r-devel-osx-x86_64-clang and
r-release-osx-x86_64-mavericks I get:

In file included from rmvnCpp.cpp:20:
In file included from ./mvnfast.h:4:
In file included from
In file included from
In file included from
/usr/local/include/c++/v1/random:3641:44: error: non-type template argument
is not a constant expression
    const size_t __logR = __log2<uint64_t, _URNG::max() - _URNG::min() +

Which I don't know how to interpret, but maybe you do.

On the other hand on r-oldrel-windows-ix86+x86_64, I get:

* installing *source* package 'mvnfast' ...
** package 'mvnfast' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
make[1]: Entering directory
g++  -I"D:/Rcompile/recent/R-3.0.3/include" -DNDEBUG
 -DARMA_DONT_USE_CXX11   -O2 -Wall  -mtune=core2 -c dmvnCpp.cpp -o dmvnCpp.o
In file included from
                 from mvnfast.h:5,
                 from dmvnCpp.cpp:20:
error: #error This file requires compiler and library support for the
upcoming ISO C++ standard, C++0x. This support is currently experimental,
and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

Could it be that the flag CXX_STD = CXX11 was not supported by this older
windows release? Can I solve this issue by using Depends R(>= something) in

Many thanks,


On Tue, Jun 3, 2014 at 6:09 PM, Matteo Fasiolo <matteo.fasiolo at gmail.com>

> Dirk,
>  no problem, in any case I can always get the new RcppArmadillo from
> Github
> and use that to build my package on Windows.
> I am quite sure yesterday my package was working on win-builder and I might
> have read 0.4.300.8.0 somewhere. Then today it wasn't working any more
> so I got confused.
> Thanks for the clarification.
> Matteo
> On Tue, Jun 3, 2014 at 5:57 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>> Matteo,
>> On 3 June 2014 at 17:24, Matteo Fasiolo wrote:
>> |  could it be that yesterday the official RccpArmadillo version on CRAN
>> | was 0.4.300.7.0 (the one with the new armadillo macro),
>> | while today it's 0.4.300.0? Or did I dream about it? :)
>> :-/
>> You were dreaming.  Or maybe you saw it in the incoming/ directory.
>> I did pretty extensive tests on 0.4.300.7.0 (which passes R CMD check for
>> 64
>> out of 67 CRAN packages using RcppArmadillo; a few details in the
>> rcpp-logs
>> repo on GitHub) and submitted it.  CRAN bemoaned a bashism in the small
>> little configure script, as well as something to setup temporary files for
>> unit tests (which has not changed in ages), so I fixed both of these
>> issues
>> and resubmitted.  And keep waiting.
>> In the meantime Conrad rolled up 4.300.8 so I created 0.4.300.8.0 and
>> submitted that.  And keep waiting.
>> One day...   In the meantime, you get the sources from GitHub but for
>> windows
>> builds at CRAN, and the win-builder service, we have to wait.  FWIW I have
>> also been waiting for three weeks now to have an additional static library
>> (hiredis, used by RcppRedis) installed on win-builder.
>> Sometimes, our hands are tied and there is nuttin' we can do.  Sorry.
>> Dirk
>> --
>> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140609/096328fb/attachment.html>

More information about the Rcpp-devel mailing list