[R-pkg-team] Bug#1134484: r-cran-s2: FTBFS: error: ‘R_NamespaceRegistry’ was not declared in this scope
Adrian Bunk
bunk at debian.org
Tue Apr 21 09:54:27 BST 2026
Control: reassign -1 src:rcpp 1.1.1-2
Control: retitle -1 rcpp FTBFS with R 4.6
Control: affects -1 r-cran-rcpp src:r-cran-s2
Control: forwarded -1 https://github.com/RcppCore/Rcpp/commit/65d40f9145be663c53e4dbe31ea157519158085b
On Mon, Apr 20, 2026 at 08:54:54PM +0200, Sebastian Ramacher wrote:
> Source: r-cran-s2
> Version: 1.1.9-2
> Severity: serious
> Tags: ftbfs
> Justification: fails to build from source (but built successfully in the past)
> X-Debbugs-Cc: sramacher at debian.org
>
> Dear maintainer,
>
> r-cran-s2 FTBFS:
>
> make[1]: Entering directory '/build/reproducible-path/r-cran-s2-1.1.9/src'
> x86_64-linux-gnu-g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I../src -DSTRICT_R_HEADERS -I'/usr/lib/R/site-library/Rcpp/include' -I'/usr/lib/R/site-library/wk/include' -pthread -fpic -g -O2 -ffile-prefix-map=/build/reproducible-path/r-base-4.5.3.20260417=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -c cpp-compat.cpp -o cpp-compat.o
> In file included from /usr/lib/R/site-library/Rcpp/include/Rcpp.h:49,
> from cpp-compat.cpp:3:
> /usr/lib/R/site-library/Rcpp/include/Rcpp/Function.h: In constructor ‘Rcpp::Function_Impl<StoragePolicy>::Function_Impl(const std::string&, const std::string&)’:
> /usr/lib/R/site-library/Rcpp/include/Rcpp/Function.h:75:65: error: ‘R_NamespaceRegistry’ was not declared in this scope [-Wtemplate-body]
> 75 | Shield<SEXP> env(R_getVarEx(Rf_install(ns.c_str()), R_NamespaceRegistry, FALSE, R_UnboundValue));
> | ^~~~~~~~~~~~~~~~~~~
> make[1]: *** [/usr/lib/R/etc/Makeconf:199: cpp-compat.o] Error 1
> make[1]: Leaving directory '/build/reproducible-path/r-cran-s2-1.1.9/src'
> make[1]: Entering directory '/build/reproducible-path/r-cran-s2-1.1.9/src'
> make[1]: Leaving directory '/build/reproducible-path/r-cran-s2-1.1.9/src'
> ERROR: compilation failed for package ‘s2’
> * removing ‘/build/reproducible-path/r-cran-s2-1.1.9/debian/r-cran-s2/usr/lib/R/site-library/s2’
> dh_auto_install: error: R CMD INSTALL -l /build/reproducible-path/r-cran-s2-1.1.9/debian/r-cran-s2/usr/lib/R/site-library --clean . --built-timestamp="'Mon, 20 Apr 2026 11:43:28 +0000'" returned exit code 1
> make: *** [debian/rules:4: binary-arch] Error 25
>
> See
> https://buildd.debian.org/status/fetch.php?pkg=r-cran-s2&arch=amd64&ver=1.1.9-2%2Bb1&stamp=1776685463&raw=0
> for more details.
This is a bug in rcpp, which does also itself FTBFS due to it:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/rcpp.html
Based on the fallout from the R 4.6 pre-releases in unstable I have an
impression we might also need an R transition bumping r-api-4.0 to r-api-4.6,
but I haven't properly reviewed all the breakage.[1]
> Cheers
cu
Adrian
[1] https://tracker.debian.org/pkg/r-base
More information about the R-pkg-team
mailing list