[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
<http://cran.r-project.org/web/checks/check_results_mvnfast.html>.

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
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/RcppArmadillo.h:30:
In file included from
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/RcppArmadilloForward.h:37:
In file included from
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo:48:
/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() +
uint64_t(1)>::value;

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
`/cygdrive/d/temp/Rtmp8Se4FX/R.INSTALL234440b452a3/mvnfast/src-i386'
g++  -I"D:/Rcompile/recent/R-3.0.3/include" -DNDEBUG
 -I"d:/RCompile/CRANpkg/lib/3.0/Rcpp/include"
-I"d:/RCompile/CRANpkg/lib/3.0/RcppArmadillo/include"
-I"d:/Rcompile/CRANpkg/extralibs215/local215/include"
 -DARMA_DONT_USE_CXX11   -O2 -Wall  -mtune=core2 -c dmvnCpp.cpp -o dmvnCpp.o
In file included from
d:\compiler\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/random:35:0,
                 from mvnfast.h:5,
                 from dmvnCpp.cpp:20:
d:\compiler\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/bits/c++0x_warning.h:32:2:
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
Description?

Many thanks,

Matteo


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

> 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