Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eddelbuettel opened this issue Dec 22, 2024 · 3 comments
Open

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

eddelbuettel opened this issue Dec 22, 2024 · 3 comments
Assignees

Comments

@eddelbuettel
Copy link
Member

@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.

@eddelbuettel
Copy link
Member Author

Looks like this good reverted in R-devel -- which is the right move as this affected a fair number of other packages.

@mmaechler
Copy link

I have reopened the bugzilla issue; current plan is a smaller change, with practically no change if R_NO_REMAP_RMATH is not defined (i.e. probably for all CRAN packages).

@eddelbuettel
Copy link
Member Author

Thanks for the follow-up @mmaechler ! In that case Rcpp should hopefully not require changes. R now follows along and does what we started to do in 2009 (ie turn on R_NO_REMAP) and no change for Rmath (which we wrapped explicitly in the R:: namespace) so things should just continue to work as they have before. We will keep on eye on it.

Also, it is January when we make changes to Rcpp. The current RC is what is in the main branch, and we are effectively feature-frozen. The next change window wold be July.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants