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

Matteo Fasiolo matteo.fasiolo at gmail.com
Thu May 29 15:27:32 CEST 2014


Hi Dirk,

 hopefully this is what you meant: I have searched the sources of
RcppArmadillo, Rcpp and R-3.1.0
for the string "#undef WIN32", but I didn't find anything.

I used for example: grep -rnw 'RcppArmadillo' -e '#undef WIN32'

Matteo


On Thu, May 29, 2014 at 1:31 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 29 May 2014 at 12:42, Matteo Fasiolo wrote:
> | Hello,
> |
> |  I have tried win-builder on a basic package constructed
> | with RcppArmadillo.package.skeleton() and
> | adding the line:
> |
> | CXX_STD = CXX11
> |
> | to Makevars.win triggers the error:
> |
> |
> d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloConfig.h:90:35:
> fatal error: RcppArmadilloLapack.h: No such file or directory
> |
> | Does this help?
>
> So WIN32 gets undefined when CXX_STD, invalidating the check I have there.
> Can you have a look at the sources and see where WIN32 gets undefined?
>
> Dirk
>
> | Matteo
> |
> |
> |
> | On Wed, May 28, 2014 at 11:47 PM, Matteo Fasiolo <
> matteo.fasiolo at gmail.com>
> | wrote:
> |
> |     Hi Dirk,
> |
> |      many thanks for the prompt reply.
> |
> |     Tomorrow I will simplify the package to locate the origin of the bug
> (which
> |     should
> |     be caused by one of the dependencies I guess).
> |
> |     Matteo
> |
> |
> |     On Wed, May 28, 2014 at 11:23 PM, Dirk Eddelbuettel <edd at debian.org>
> wrote:
> |
> |
> |         Matteo,
> |
> |         I may have found it. It is not as broken as I feared.  At the
> end of
> |         RcppArmadilloConfig.h we have
> |
> |         // R can be built with its own Rlapack library, or use an
> external
> |         // one. Only the latter has zgesdd, a complex-valued SVD using
> |         divide-and-conquer
> |         #ifdef WIN32
> |           // on Windows we do not assume ZGESDD
> |           #define ARMA_DONT_USE_CX_GESDD 1
> |         #else
> |           // on the other OSs we test via LAPACK_LIBS (in configure)
> which
> |           // updates this include file
> |           #include <RcppArmadilloLapack.h>
> |         #endif
> |
> |         so it was supposed to only include the library
> RcppArmadilloLapack.h if
> |         NOT
> |         on Windows.  Somehow your configuration has undefined WIN32.
> |
> |         We need to figure out why / who / where and correct it, and / or
> find a
> |         better #ifdef here.
> |
> |         Dirk
> |
> |         --
> |         Dirk Eddelbuettel | edd at debian.org |
> http://dirk.eddelbuettel.com
> |
> |
> |
> |
>
> --
> 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/20140529/f35f3379/attachment.html>


More information about the Rcpp-devel mailing list