Skip to content

'R_NamespaceRegistry' was not declared in this scope #1473

@Jean-Romain

Description

@Jean-Romain

On R-devel on CRAN win builder. Reproducible with Github actions. Not reproducible on r-universe. It seems related to a recent commit and update

In file included from D:/a/_temp/Library/Rcpp/include/Rcpp.h:49,
                 from Progress.h:4,
                 from Progress.cpp:2:
D:/a/_temp/Library/Rcpp/include/Rcpp/Function.h: In constructor 'Rcpp::Function_Impl<StoragePolicy>::Function_Impl(const std::string&, const std::string&)':
D:/a/_temp/Library/Rcpp/include/Rcpp/Function.h:75:65: error: 'R_NamespaceRegistry' was not declared in this scope
   75 |             Shield<SEXP> env(R_getVarEx(Rf_install(ns.c_str()), R_NamespaceRegistry, FALSE, R_UnboundValue));
      |                                                                 ^~~~~~~~~~~~~~~~~~~

What I do not understand is that there is no error for Rcpp on CRAN. And package that depends on Rcpp have no error as well. But it seems to me it comes from #include<Rcpp.h> so every package should fail 👀 . So I'd say not reproducible on CRAN in production??

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