[R-pkg-devel] RcppEigen and -Wno-ignored-attributes flag
edd @ending from debi@n@org
Mon Sep 10 16:00:38 CEST 2018
On 10 September 2018 at 16:27, Τόλης Χαλκής wrote:
| Dear all,
| I am developing a R package using RcppEigen on Ubuntu 18.04. Since update
| 0.3.3.4.0 I get hundreds of warnings but if I add PKG_CXXFLAGS =
| -Wno-ignored-attributes in Makevars the warnings disappear and the compile
| time reduces a lot.
| devtools::check() gives the warning below:
| checking compilation flags in Makevars ... WARNING
| Non-portable flags in variable 'PKG_CXXFLAGS':
| I know I can only address the flag via my local compiler options. But
| should I mentioned it to the package README? Is there anything else I could
| do to overcome the problem with the hundreds of warning messages for the
| other users that install the package for the first time?
It is a common problem with Eigen and g++. But as you saw, you cannot solve
it via PKG_CXXFLAGS. A better way is to use CXXFLAGS via ~/.R/Makevars as
this remains local and does not add a non-portable flag to your package.
PS FWIW I disagree with this 'no non-portable flags' choice by CRAN, but I
just like you I don't get to make the rules.
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel