Skip to content

RcppArmadillo 15.0.1-1 breaks #include <armadillo> #479

Description

@eddelbuettel

By moving the top-level file armadillo to the two 'versioned' directories
current/armadillo // for 15.0.1 or later
legacy/armadillo // for 14.6.3
we removed the abity to call #include <armadillo> -- as RcppArmadillo-using packages should of course call the headers proving RcppArmadillo where Armadillo is implicit.

That, a few dozen packages called #include <armadillo> directly (even if most likely they should not) so we will restore that entry point and branch to 'current' and 'legacy' as we do via the default headers of the RcppArmadillo package.

Activity

  1. eddelbuettel commented on Sep 2, 2025

    @eddelbuettel
    MemberAuthor

    This is fixed in the branch bugfix/restore_default_path used to permit RcppEnsmallen to use #include <armadillo>:

  2. eddelbuettel commented on Sep 3, 2025

    @eddelbuettel
    MemberAuthor

    The branch has been merged, version 15.0.1-2 addresses this.

  3. coatless commented on Sep 3, 2025

    @coatless
    Contributor

    Maybe place a note that armadillo shouldn't be called directly?

    ae56996

    This can be included as one of the many deployment changes if mass PRs are being sent out.

  4. eddelbuettel commented on Sep 3, 2025

    @eddelbuettel
    MemberAuthor

    Maybe place a note that armadillo shouldn't be called directly?

    I thought of that and there are clearly packages doing it wrong (see here for one) but on balance I no longer think I can enforce that. How mlpack calls (Rcpp)Ensmallen which ends up with #include <armadillo> too is possible. We can't provide entry points for all.

    So it was an error of mine to remove the top-level armadillo file, and it will come back in the next (bugfix) upload.

    As for 'mass-filing PRs', we are not there yet. Still gathering facts. Getting rid of CXX_STD=CXX11 may rank hire. To be seen....

  5. jhrcek commented on Sep 5, 2025

    @jhrcek

    Hello,
    just found this issue as we started getting errors about broken installation of aorsf package, which has #include <armadillo>.
    I saw you merged a fix in #480, for which I'm very grateful 🙏

    Do you have an estimate when a new version of RcppArmadillo containing this fix could be pushed to CRAN?

  6. eddelbuettel commented on Sep 5, 2025

    @eddelbuettel
    MemberAuthor

    I expect it to be up at CRAN early next week.

    And sorry about the breakage. Having a system-wide Armadillo tricked us. One can surely do Armadillo-only C++ files, and they need #include <armadillo> as your headers Data.h and Coxph.h do. But as soon as you mix with R(cpp) (as e.g. your utility.h does) it really is recommend to go through the RcppArmadillo headers. Anyway, it was my bad and breakage, and should be fixed in a few days. If you need it on your systems sooner drop in this file or install the updated package from r-universe which also helps in continous integrations such as GitHub Actions.

  7. eddelbuettel commented on Sep 8, 2025

    @eddelbuettel
    MemberAuthor

    RcppArmadillo 15.0.2-1, with the PR #480 which re-adds an entry point for #include <armadillo> is now on CRAN. Anyone relying on a particular build may have to wait the customary day or two but the issue is now addressed.

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