[R-pkg-devel] Compiled code checks raise a WARNING in Fedora 28

Iñaki Úcar i@uc@r86 @ending from gm@il@com
Wed May 23 17:22:24 CEST 2018


Hi,

For other Fedora users that may be struggling with this too...

Fedora 28 introduced new hardening flags for compiled code (see [1]).
Particularly, -D_GLIBCXX_ASSERTIONS is added to the default CXXFLAGS
(verify the output of 'R CMD config CXXFLAGS'), which enables range
checks for C++ arrays, vectors and strings. As a consequence, you may
see the following after running 'R CMD check' on your package with C++
code:

checking compiled code ... WARNING
Found ‘abort’, possibly from ‘abort’ (C)
Found ‘printf’, possibly from ‘printf’ (C)

I'm not sure whether this is a false positive or not. Anyway, a quick
workaround is to disable this flag by including -U_GLIBCXX_ASSERTIONS
in your local Makevars.

Regards,
Iñaki

[1] https://fedoraproject.org/wiki/Changes/HardeningFlags28



More information about the R-package-devel mailing list