Skip to content

Help packages transition away from C++11 #484

Description

@eddelbuettel

As of a reverse depends run started 2025 Sep 09 the following 226 packages fail when switching to Armadillo 15.0.2:

abclass, acebayes, adaHuber, ADMM, ahMLE, alpaca, ANN2, AntMAN, ARCokrig, autoRasch, bama, bayescopulareg, bayeslm, BayesReversePLLH, BayesRGMM, bayMDS, BClustLonG, biClassify, bife, bisque, bmabasket, BNPmix, BOSSreg, bpgmm, brmsmargins, BSPBSS, Buddle, BVSNLP, catSurv, CB2, CERFIT, CircSpaceTime, cIRT, clhs, clusterHD, cmenet, combinIT, COMIX, communication, CoOL, corrcoverage, covdepGE, covTestR, CovTools, CoxPlus, coxrt, cPCG, cpss, curveDepth, dcortools, DCSmooth, dcurver, deforestable, DepthProc, dga, DGM, didimputation, dina, DriftBurstHypothesis, DSSP, DtD, DySS, edina, elmNNRcpp, em, errum, evgam, ExhaustiveSearch, expSBM, FamilyRank, FarmTest, fasterElasticNet, fastGLCM, fastpos, fctbases, FGLMtrunc, filling, fipp, flamingos, FMCCSD, fmerPack, fmf, fourPNO, FRESHD, FSSF, gbp, GCSM, geoFKF, geoFourierFDA, GiRaF, gjam, glamlasso, GMKMcharlie, GofKmt, GPM, gridOT, gsynth, GxEScanR, HACSim, hdbm, higlasso, HMB, HMMEsolver, HTLR, iccbeta, ILSE, imbalance, IncDTW, infinitefactor, interflex, intkrige, intsurv, IrishDirectorates, ivsacim, ivx, JFM, JMbayes, jmcm, jmotif, KernelKnn, KoulMde, LassoGEE, latentgraph, ldsep, ldsr, linconGaussR, Lmoments, lodr, lowmemtkmeans, ltsspca, lvmcomp, manifold, MAPITR, matchingR, mclustcomp, mcmcse, mDAG, meshed, meteorits, milr, mirtjml, mixedCCA, modeLLtest, multivar, netClust, netcmc, netcontrol, NetworkDistance, networkR, nlmeVPC, NPCirc, ohoegdm, parallelDist, parglm, pdSpecEst, penalized, penPHcure, pgsc, pleiotest, PLSiMCpp, PPMR, PQLseq, pqrfe, PRDA, qris, ratematrix, rbridge, RcppCensSpatial, RcppHMM, Rdimtools, registr, Riemann, RiemBase, Rlinsolve, RLumCarlo, RLumModel, rmarchingcubes, robustcov, rocTree, rofanova, roptim, ROptSpace, rotations, rrpack, rSpectral, rsvddpd, SAGMM, samurais, sasfunclust, SBmedian, scanstatistics, scINSIGHT, sdpdth, sfcr, SFS, ShrinkCovMat, slasso, SMMA, SMME, smmR, SNPknock, spFW, SPlit, spnn, sprintr, Sshaped, SSOSVM, SuperpixelImageSegmentation, surbayes, symphony, T4cluster, tabularMLC, TAG, tci, TDAkit, telefit, textmineR, tfarima, tmvtnsim, tree.interpreter, treenomial, tvR, UtilityFrailtyPH12, VMDecomp, VUROCS, WeibullR

In most cases this is due to C++11 being forced, which leads to Armadillo 15.0.2 erroring out. From the first package:

using C++ compiler: ‘g++ (Debian 14.3.0-5) 14.3.0’
using C++11
ccache g++ -std=c++11 -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I'/usr/local/lib/R/site-library/Rcpp/include' -I'/usr/local/lib/R/site-library/RcppArmadillo/include'    -fopenmp -fpic  -\
g0 -O3 -Wall -pipe -Wno-unused  -fext-numeric-literals -DBOOST_NO_AUTO_PTR -DARMA_USE_CURRENT   -c RcppExports.cpp -o RcppExports.o
In file included from /usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo.h:29,
                 from ../inst/include/abclass/Abclass.h:21,
                 from ../inst/include/abclass.h:22,
                 from RcppExports.cpp:4:
/usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo/version/arma.h:40:6: error: #error "Do not select 'current' with C++11 (or older) as 'current' requires C++14 or newer."
   40 |     #error "Do not select 'current' with C++11 (or older) as 'current' requires C++14 or newer."
      |      ^~~~~
In file included from /usr/local/lib/R/site-library/RcppArmadillo/include/current/armadillo:27,
                 from /usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:57,
                 from /usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo.h:32:
/usr/local/lib/R/site-library/RcppArmadillo/include/current/armadillo_bits/compiler_check.hpp:82:4: error: #error "*** C++14 compiler required; enable C++14 mode in your compiler, or use an earlier version of A\
rmadillo"
   82 |   #error "*** C++14 compiler required; enable C++14 mode in your compiler, or use an earlier version of Armadillo"
      |    ^~~~~

This shows one error from RcppArmadillo anticipating the following error from Armadillo. We will try to confirm which 226 package have that issue and see about contacting maintainers.

Edit 2025-09-11: One package identified as misclassified, it was lacking a dependency. The remaining 226 are confirmed.

Activity

  1. changed the title [-]Help transition away from C++11[/-] [+]Help packages in transition away from C++11[/+] on Sep 11, 2025
  2. coatless commented on Sep 11, 2025

    @coatless
    Contributor

    Excellent, off to test out some of my new toys! (maybe develop newer toys... 😃 )

  3. eddelbuettel commented on Sep 11, 2025

    @eddelbuettel
    MemberAuthor

    If/when we both have a moment one of these days may might sense to gab. There are a few moving pieces. Kurt very kindly put a check into r-devel which they have enabled on the incoming checker 'r-devel' (see here for the commit) and Uwe now includes a short snippet I once wrote in reply (and edited once or twice, below 'details'). This seems to work for at least a few packages. When I check the 'cran' organization here for string 'DARMA_USE_CURRENT' the number of hits increases steadily day by day. That is step one: getting packages to migreate to 'current'.

    Another step is this issue. The list above is from a reverse-depends check I did where I forced '-DARMA_USE_CURRENT' globally so those stuck with C++11 will fail. I am trying to shell script something now to ascertain that there we no other failures.

    Slowly but steadily we will get there. New ideas and suggestions welcome!

    Details

    Text being sent out, originally from an email:

    Yes, please see the top-level issue #475 (and its sub-issues) at

     https://github.com/RcppCore/RcppArmadillo/issues/475
    

    For your package all you should hopefully need is to add a line to
    src/Makevars and src/Makevars.win (or expand one if you have it) so
    PKG_CXXFLAGS also contains the term -DARMA_USE_CURRENT so that the
    current Armadillo is used via RcppArmadillo.

    Most packages do not need changes, a few may now get warnings about
    deprecated code. Please get in touch (via an issue at the
    RcppArmadillo repo, preferably) if you need help. You could also
    choose to define -DARMA_USE_LEGACY but we want to (eventually) move
    away from this version.

    Let me know if you need other help. A new version 15.0.2-1 of package
    RcppArmadillo is now at CRAN and should work for many packages, yours
    included. Until all CRAN binaries are rebuilt consider installing a
    binary from https://rcppcore.r-universe.dev/RcppArmadillo -- and
    thank you in advance for moving to (Rcpp)Armadillo 15.0.* which we
    plan to make the default once all (or most) packages needing touchups
    have done so.

  4. changed the title [-]Help packages in transition away from C++11[/-] [+]Help packages transition away from C++11[/+] on Sep 12, 2025
  5. eddelbuettel commented on Sep 19, 2025

    @eddelbuettel
    MemberAuthor

    In the meantime we refined the analysis further from both the CRAN side thanks particularly to @kurthornik who also wrote the following in email

    I will shortly reach out to the maintainers of all packages asking for
    exactly C++11 and linking to RcppArmadillo to stop doing the former.
    
    There are currently 221 such packages: computing the numbers of
    recursive revdeps for these finds
    
      0   1   2   3   4   7   8  10  11  13  15  16  32  41 
    180  20   5   2   4   1   1   1   1   1   2   1   1   1 
    
    so removing the legacy fallback would make the 221 packages and these
    revdeps uninstallable, which is not so good.  Ideally we'd get the 41
    packages with revdeps updated asap, but that's not realistic, so we
    should perhaps aim for those with more than two:
    
           GiRaF       rrpack    ROptSpace     WeibullR       parglm    textmineR 
               3            3            4            4            4            4 
       Rdimtools         ADMM        evgam   mclustcomp       roptim parallelDist 
               7            8           10           11           13           15 
       penalized       mcmcse     Lmoments      dcurver 
              15           16           32           41 
    

    and I will plan to work on PRs or emailed patched for these sixteen packages over the next few days.

  6. eddelbuettel commented on Sep 20, 2025

    @eddelbuettel
    MemberAuthor

    The next (six today, not five) with two recursive reverse depends are

                      DepthProc                      NPCirc SuperpixelImageSegmentation 
                              2                           2                           2 
                      T4cluster                        clhs               lowmemtkmeans 
                              2                           2                           2 
    

    and I will add those next.

  7. eddelbuettel commented on Sep 26, 2025

    @eddelbuettel
    MemberAuthor

    And now added a few more with one reverse dependency.

  8. eddelbuettel commented on Nov 20, 2025

    @eddelbuettel
    MemberAuthor

    This issue can now be closed. We will of course continue to support packages using RcppArmadillo and greatly appreciate the many packages that did change and update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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