[R-pkg-devel] Compilation used the "non-portable flag"
On Wed, 15 May 2019 at 13:16, Dirk Eddelbuettel <edd at debian.org> wrote:
On 15 May 2019 at 11:49, G?bor Cs?rdi wrote: | Thinking about this a bit more, I think this might be a bug in R CMD | check, actually. | | I understand that these flags are not portable, and yes, they should | be reported if they are specified in the packages's Makevars* files. | But in this case they are coming from the Ubuntu system's Makevars | setup, and surely, they do work there. I would even say that it is | actually good practice to include them in the system setup. | | I can probably provide a patch for this. See discussions on r-sig-debian -- in essence I had the same thouht and this has been taken care of now in R 3.6.0-2. We add this to Renviron.site ## edd May 2019 ## ## Debian (and its derivatives) impose a set of compiler flags to prevent some known ## security issues with compiled code. These flags then become defaults for R as well ## (see eg /etc/R/Makeconf) but nevertheless confuse R as warnings get triggers. Users, ## on the other hand, are often stumped about these. So with this variable we declare ## these options as known for the local checks on the machine this file is on. ## ## See Section 8 of the R Internals manual for many more options to customize tests. _R_CHECK_COMPILATION_FLAGS_KNOWN_='-Wformat -Werror=format-security -Wdate-time' It may eventually move to Renviron now that Kurt kindly fixed an Renviron parser buglet with `=` assignments in r-devel So please add the environment variable now on all Debian and Ubuntu flavours, and/or upgrade to 3.6.0-2.
Fedora adds these flags too, plus -D_GLIBCXX_ASSERTIONS since Fedora 28, see: https://stat.ethz.ch/pipermail/r-package-devel/2018q2/002754.html This last one is particularly difficult to conceal, because the resulting code includes calls to abort, for which R complains. I?aki