Skip to content

Moving towards defining STRICT_R_HEADERS in Rcpp.h #1158

@eddelbuettel

Description

@eddelbuettel

As previously discussed in the (preliminary, unmerged) pull requests #613 and #615 as well as in issues #612 and (at much greater length) in issue #898, it is desirable for compilations of R extensions to define STRICT_R_HEADERS so that terms like ERROR or MESSAGE do not clash due to a redefinition, or that PI remains undefined, and of course so that Calloc(), Realloc() or Free() are not defined.

However, as the use of the definition has always been an opt-in, some packages have been making use of the definitions that would otherwise have been defined away -- so that we now cannot simply define it as they would then error. The issue ticket #898 discusses two attempts at quantifying just how extended the damage at CRAN would be: about 58 packages in late Sep 2018, about 62 packages in Jul 2019, and and around 51 earlier this month. Based on the earlier discussions some packages did make changes, and that is greatly appreciated.

And after some more discussion in #898 today, the time seems right to try to address this, one-by-one, in the affected packages. There is no rush: if this takes us six or eight or ten months, so be it. It would be nice to get it done, so let's try to make a start.

What follows is a list by package. The list may be wrong, and if a package is included by accident or error in our process we will remove it. The list may be incomplete: if we find other packages we will add them. Otherwise it will list the names of packages that did come up as failing to pass R CMD check when STRICT_R_HEADERS was defined by us, and the error is almost always one of an immediate failure to compile. A simple re-definition of the affected symbols will be the solution, and we will aim to provide pull requests as we go along. Help in that process would be appreciated.

So give this list, the suggested plan is to submit PRs. And then to follow-up as PRs are folded in addressing the issue, and to 'tick off' each package and maybe mark the version of the package containing the fix and PR. Let's see how it goes, and discuss below what we learn.

  • activegp (1.0.5) -- not on GitHub, patch emailed 2021-04-25, ack from maintainer 2021-04-25, 'real soon', on CRAN 2021-11-30
  • atakrig (0.9.7) -- not on GitHub at maoguihu/atakrig, patch emailed 2021-04-25, PR #1 send 2021-04-26 too, ack from maintainer 2021-04-26, 'soon', 0.9.8 on CRAN 2021-04-30
  • basad (0.2.0) -- not on GitHub, patch emailed 2021-04-25; at qingdan/basad, pull request sent 2021-11-02, on CRAN 2021-11-17
  • Benchmarking (0.29) -- not on GitHub, patch emailed 2021-04-26, ack from maintainer 2021-04-26, 'done locally', 'CRAN later...'
  • BGVAR (2.1.5) -- at mboeck11/BGVAR (2.2.0), PR #4 sent 2021-04-26, merged 2021-04-26
  • bigmemory (4.5.36) -- at kaneplusplus/bigmemory, PR #104 sent 2021-04-26, merged 2021-06-14
  • binnednp (0.4.0) -- not on GH, patch emailed 2021-04-27, removed from CRAN 2022-01-28
  • biwavelet (0.20.19) -- at tgouhier/biwavelet, PR #96 sent 2021-04-27; heard back via email 2021-05-24, merged, "upload soon", on CRAN 2021-05-26
  • blatent (0.1.1) -- at jonathantemplin/blatent, PR #1 sent 2021-04-27, heard via email 2021-05-24, "soon"
  • cbinom (1.5) -- not on GH, patch emailed 2021-04-27, heard back 2021-04-27 "soon", on CRAN 2021-04-28
  • circumplex (0.3.6) -- at jmgirard/circumplex, PR #13 sent on 2021-04-28, merged 2021-04-28, on CRAN 2021-05-28
  • collapse (1.5.3) -- at SebKrantz/collapse, PR #149 sent on 2021-04-29; merged 2021-05-01
  • compas (0.1) -- at wongswk/compass, PR #1 sent on 2021-04-29, merged 2022-01-08, on CRAN 2022-01-09
  • dfphase1 (1.1.3) -- not on GH, patch emailed 2021-04-29, on CRAN 2021-12-01
  • emIRT (0.0.11) -- at kosukeimai/emIRT, PR #6 sent 2021-04-30. merged 2021-05-12, removed from CRAN 2022-01-28
  • facilitation (0.5.2) -- at Lobz/facilitation and already fixed since 2018 (!!) via Lobz/facilitation@130ac76, removed from CRAN 2022-01-28
  • fad (0.3-3) -- at somakd/fad, PR #4 filed 2021-04-30, merged 2021-07-04
  • fasteraster (1.1.1) -- not on GH, patch emailed 2021-05-01, removed from CRAN 2022-01-28
  • fixest (0.8.4) -- at lrberge/fixest, PR #138 filed 2021-05-01, merged 2021-05-01
  • FORTLS (1.0.2) -- at Molina-Valero/FORTLS, PR #2 filed 2021-05-01, applied to branch 2021-05-24, on CRAN 2021-09-03
  • fracture (0.1.2) -- at rossellhayes/fracture, PR #1 filed 2021-05-01, merged 2021-05-24
  • frailtySurv (1.3.6) -- at vmonaco/frailtySurv, PR #8 filed 2021-05-01, merged 2021-05-04, on CRAN 2021-09-13
  • Gmisc (2.0.1) -- at gforge/Gmisc, PR #55 filed 2021-05-02, merged 2021-05-03, on CRAN 2021-05-04
  • huge (1.3.4.1) -- at HMJiangGatech/huge, PR #14 filed 2021-05-02, merged 2021-05-24, CRAN "soon"
  • IFC (0.1.1) -- at gitdemont/IFC, PR #1 filed 2021-05-02, merged 2021-05-06, on CRAN 2021-10-13
  • lavacreg (0.1-1) -- at chkiefer/lavacreg, PR #1 filed 2021-05-02, merged 2021-05-02, on CRAN 2021-08-19
  • matrixprofiler (0.1.4) -- at matrix-profile-foundation/matrixprofiler, PR #15 filed 2021-05-03; email back 2021-05-23 'merge and CRAN soon', on CRAN 2021-05-26
  • mcmcsae (0.6.0) -- not on GH, patch emailed 2021-05-03, heard back 2021-05-05, merged, on CRAN 2021-10-10
  • medfate (1.1.0) -- not on GH at vegmod/medfate, patch emailed 2021-05-03, heard back 2021-05-04, merged
  • multivariance (2.4.0) -- not on GH, patch emailed 2021-05-03, on CRAN 2021-10-06
  • mwaved (1.1.7) -- at jrwishart/mwaved, PR #2 filed 2021-05-03, merged 2021-05-07
  • nnlib2Rcpp (0.1.6) -- at VNNikolaidis/nnlib2Rcpp, PR #11 file 2021-05-04, merged 2021-05-05, on CRAN 2021-05-05
  • npsf (0.8.0) -- not on GH, patch emailed 2021-05-10, heard back in email 2021-05-24: 'soon'
  • oce (1.4-0) -- at dankelley/oce, PR #1822 filed 2021-05-04, merged 2021-05-05, on CRAN 2022-01-08
  • OpenMx (2.19.5) at OpenMx/OpenMx, PR #319 filed 2021-05-04, merged 2021-05-04
  • PAFit (1.0.1.8) at thongphamthe/PAFit, PR #3 filed 2021-05-05, merged 2021-05-11, on CRAN 2021-05-12
  • partialCI (1.2.0) not on GH, patch emailed 2021-05-05, removed from CRAN 2022-01-28
  • PoissonBinomial (1.2.3) not on GH, patch emailed 2021-05-05, heard back 2021-05-05, "soon"
  • precrec (0.12.5) at evalclass/precrec, PR #17 filed 2021-05-05, merged 2021-05-25
  • rayrender (0.21.2) at tylermorganwall/rayrender, PR #25 filed 2021-05-06, merged 2021-06-25
  • rcosmo (1.1.2) at frycast/rcosmo, PR #3 filed 2021-05-06, merged 2021-05-10, on CRAN 2021-12-01
  • read.gt3x (1.0.2) at THLfi/read.gt3x, PR #39 filed 2021-05-06, merged 2021-11-16
  • recmap (1.0.7) at cpanse/recmap, PR #20 filed 2021-05-06, merged 2021-05-07, on CRAN 2021-05-10
  • robustlmm (2.4-3) at kollerma/robustlmm, PR #7 filed 2021-05-07, heard back via GH on 2021-05-24, merged, "soon to CRAN"
  • rpf (1.0.5) at jpritikin/rpf, PR #15 filed 2021-05-07, merged 2021-05-07, on CRAN 2021-08-11
  • rstpm2 (1.5.2) at mclements/rstpm2, PR #20 filed 2021-05-07, merged 2021-05-07
  • rtdists (0.11-2) at rtdists/rtdists, PR #14 filed 2021-05-07, merged 2021-05-12
  • shrinkTVP (2.0.1) not on GH, patch emailed 2021-05-08, on CRAN 2021-05-13
  • smam (0.5.4) at ChaoranHu/smam, PR #1 filed 2021-05-08, merged 2021-05-24
  • supc (0.2.2) at wush978/supc, PR #33 filed 2021-05-08; heard back 2021-09-21, on CRAN 2021-09-22
  • unmarked (1.0.1) -- at rbchan/unmarked, fixed by maintainer in PR #202
  • s2 (1.0.5) -- at r-spatial/s2, PR #118 filed 2021-06-02, merged 2021-06-02
  • bcf, not on GH, patch emailed 2021-06-10, on CRAN 2022-01-18
  • biglasso, at YaohuiZeng/biglasso, PR #40 filed 2021-06-10, merged 2022-01-06, removed from CRAN 2022-01-28
  • blockmodels, not on GH, patch emailed 2021-06-10, merged and on CRAN 2021-12-01, also at jb-leger/blockmodels
  • DGM, at schw4b/DGM, PR #14 filed 2021-06-10, merged and on CRAN 2021-12-05
  • EMVS, not on GH, patch emailed 2021-06-10, on CRAN 2021-10-13
  • eulerrr, at jolars/eulerr, PR #82 filed 2021-06-10, merged 2021-06-11, fixed on CRAN 2021-09-06
  • fctbases, at naolsen/fctbases, PR #1 filed 2021-06-10, merged 2021-08-13, removed from CRAN 2022-01-28
  • GAS, at LeopoldoCatania/GAS PR #14 filed 2021-06-11, removed from CRAN 2022-01-28
  • gcKrig, not on GH, patch emailed 2021-06-11, heard back 2021-06-14: "soon"
  • gfilmm, at stla/gfilmm, PR #1 filed 2021-06-12, merged 2021-06-25
  • goffda, at egarpor/goffda, PR #5 filed 2021-06-12, merged 2021-06-26; fixed on CRAN
  • GWmodel, not on GH, patch emailed 2021-06-13, heard back 2021-06-15: "asap", on CRAN 2021-10-09
  • HDTSA, at Linc2021/HDTSA, PR #1 filed 2021-06-13, merged 2021-06-28, on CRAN 2021-11-08
  • ideq, at eastonhuch/ideq, PR #1 filed 2021-06-13, merged 2021-11-23, removed from CRAN 2022-01-28
  • jackalope, at lucasnell/jackalope, PR #15 filed 2021-06-13, merged 2021-06-14
  • ldsep, at dcgerard/ldsep, PR #5 filed 2021-06-13, merged 2021-06-14, on its way to CRAN 2021-08-10, fixed on CRAN
  • lpme, not on GH, patch emailed 2021-06-14
  • mcmcse, not on GH, patch emailed 2021-06-14, fixed on CRAN 2021-09-09
  • metapack at daeyounglim/metapack, PR #1 files 2021-06-14, merged 2021-06-16
  • minerva at rsamantha/minerva, PR #11 filed 2021-06-15
  • MultiFit, not on GH, patch emailed 2021-06-15, fixed on CRAN 2022-01-18
  • parglm, at boennecd/parglm, PR #11 filed 2021-06-15, merged and on CRAN 2021-10-14
  • RobustGaSP, not on GH, patch emailed 2021-06-15, heard back 2021-08-19, on CRAN 2021-09-02
  • partialAR, not on GH, patch emailed 2021-06-17, removed from CRAN 2022-01-28
  • sdetorus, at egarpor/sdetorus, PR #5 filed 2021-06-17, merged 2021-06-26, fixed on CRAN 2021-09-04
  • serrsBayes, at mooresm/serrsBayes, PR #1 files 2021-06-15, merged 2021-06-18
  • lme4, at lme4/lme4, PR #633 filed 2021-06-16, merged 2021-06-16
  • RxODE, at nlmixrdevelopment/RxODE, PR #437 files 2021-06-20, merged 2021-06-21, on CRAN 2021-08-06
  • ClusPred, not at GH, patch emailed 2021-06-27, on CRAN 2021-12-02
  • CARlasso, at YunyiShen/CAR-LASSO, PR #6 filed 2021-07-25, merged 2021-07-31, on CRAN in 0.1.2
  • MNARclust, not at GH, patch emailed 2021-07-25, on CRAN 2021-12-02
  • fddm, at rtdists/fddm, PR #2 filed 2021-08-11, heard back 2021-08-13, on CRAN 2021-12-13
  • MAINT.Data, not on GH, patch emailed 2021-08-11, on CRAN 2021-09-21
  • meshed, at mkln/meshed, PR #1 filed 2021-08-11, merged 2021-08-11, confirmed 2021-09-15, on CRAN 2021-10-05
  • MixMatrix, at gzt/MixMatrix, PR #1 filed 2021-08-11, merged 2021-09-25, on CRAN 2021-11-16
  • MSGARCH, at keblu/MSGARCH, PR #71 filed 2021-08-12, merged 2021-08-16, on CRAN 2022-01-16
  • multdyn, at schw4bM/DGM, and same as above under DGM, package should be retired from CRAN; heard from maintainer 2021-12-05, no longer on CRAN 2021-12-06
  • spaMM, not on GH, patch emailed 2021-08-12, replied 2021-08-13, "likely September", on CRAN 2021-09-13
  • spamtree, at mkln/spamtree, PR 1 filed 2021-08-12, merged 2021-08-12, confirmed 2021-09-15, version 0.2.2 on CRAN 2021-12-07
  • PLFD, at gitee.com/xu-zc/PLFD, patch emailed 2021-08-19, on CRAN 2021-09-19
  • factorstochvol (1.0.0), at gregorkastner/factorstochvol, PR #10 filed 2021-12-04, 1.0.1 on CRAN 2021-12-06
  • survival.svb (0.0.1) at mkomod/survival.svb, PR #1 filed 2022-01-04. merged 2022-01-05, on CRAN 2022-01-17

Metadata

Metadata

Assignees

No one assigned

    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