[Bioc-devel] New BioC 3.21 settings for R 4.5.0
Jennifer Wokaty
Jenn||er@Wok@ty @end|ng |rom @ph@cuny@edu
Mon Nov 11 19:08:57 CET 2024
>From 11/13, we will add new settings to Bioconductor 3.21 to prepare for R 4.5.0.
From Kurt Hornik:
For the upcoming R 4.5.0 release, we would like to make two changes
which remove API legacy convenience features which keep causing
problems.
Specifically:
One, defining STRICT_R_HEADERS to 1 which removes
- the legacy definition of PI (use POSIX's M_PI, available in R fer ever).
- the RS.h declarations for Calloc, Realloc, Free (use R_ forms i
available since R 3.4.0).
The aim is to clean the namespace: in particular having a definition
for Free has conflicted with some packages' C++ code.
Two, compiling C++ code with R_NO_REMAP defined. See chapter "The R
API: entry points for C code" in "Writing R Extensions" for more
information.
We could like to switch to using STRICT_R_HEADERS and R_NO_REMAP by
default later this year.
For now, one can get these defined via setting env vars
_R_USE_STRICT_R_HEADERS_=true
_R_CXX_USE_NO_REMAP_=true
(using a recent enough version of R-devel, of course).
...
Fixing errors from _R_USE_STRICT_R_HEADERS_=true typically is very
simple: one needs to change Calloc/Realloc/Free to the corresponding R_
forms, which can be done via variants of
perl -pi -e 's/Calloc\(/R_Calloc\(/g' *
in the package src directory. (Similarly for replacing PI by M_PI.)
Fixing errors from _R_CXX_USE_NO_REMAP_=true can similarly use e.g.
perl -pi -e 's/allocList\(/Rf_allocList\(/g' *
but it is more effort as one does not know in advance what to replace
(well, everything in the API which is no longer remapped, of course) and
one only gets the errors for the first compilation unit one at a time.
We will also add _R_CHECK_EXCESSIVE_IMPORTS_=20 following CRAN's standard: https://cran.r-project.org/doc/manuals/r-release/R-ints.html#index-_005fR_005fCHECK_005fEXCESSIVE_005fIMPORTS_005f.
Jennifer Wokaty (they/them)
Waldron Lab at CUNY SPH
Bioconductor Core Team
[[alternative HTML version deleted]]
More information about the Bioc-devel
mailing list