Skip to content

Accommodate R-devel changes to Rmath library symbol prefixing #1351

@eddelbuettel

Description

@eddelbuettel

@mmaechler made some recent changes summarized e.g. at the R-devel Daily NEWS feed for Dec 20 as

Enable defining ‘R_NO_REMAP_RMATH’ and calling ‘Rf_*()’ as has been documented in WRE for a while, fixing PR#18800 thanks to Mikael Jagan and Suharto Anggono.

CRAN found sizeable side-effects (even more sizeable via recursive dependencies) from this for Rcpp. Specifically our file sugar/undoRmath.h needs conditional protection, and we have been in email exchange since. @kurthornik has already hot-patched two packages which are now up at CRAN, and I have been running reverse depends checks.

A viable strategy appears to be to (for now) also condition the R-devel change on defined(RCPP_SUGAR_UNDORMATH_H) so that our header gets skipped, and add a version guard in the file. My pending changes also need check for R_Version being undefined (sigh...) but we check for that in one other place already. So a simple PR should be forthcoming.

Needless to say, with nearly 3000 reverse dependencies just at CRAN we are hitting other issues. Two packages appear to have flattened namespace via using. In one example a call is made via a (global, not namespace protected) Rf_runif() (expecting a double in return) so this likely be R::runif() instead. We are trying to sort the corner cases out now, basic PR forthcoming once the reverse-depends run finishes in a few hours.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions