You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the current CRAN versions of all involved packages (including 'rstanarm' 2.32.2, 'rstan' 2.32.7, 'StanHeaders' 2.39.1), R CMD check gives:
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_stan_functions.R:64:1'): (code run outside of `test_that()`) ───
Error in `expose_stan_functions(stanc_ret, rebuild = TRUE, verbose = TRUE)`: Compilation failed!
Backtrace:
▆
1. └─rstan::expose_stan_functions(stanc_ret, rebuild = TRUE, verbose = TRUE) at test_stan_functions.R:64:1
Unfortunately, the check log is not very helpful, not only because of the 'testthat' camouflage but also because rstan::expose_stan_functions runs Rcpp::sourceCpp() in try(silent=TRUE), hiding the actual error. So I inserted
succeeds, but Rcpp::sourceCpp() then fails from loading the module (source(scriptPath, local = env)):
Error in dyn.load("/tmp/RtmpoaocOG/sourceCpp-x86_64-pc-linux-musl-1.1.2/sourcecpp_49ad49147921/sourceCpp_2.so") :
unable to load shared object '/tmp/RtmpoaocOG/sourceCpp-x86_64-pc-linux-musl-1.1.2/sourcecpp_49ad49147921/sourceCpp_2.so':
Error loading shared library libtbb.so: No such file or directory
Obviously, system.file("lib", "libtbb.so", package = "RcppParallel") is available, but not normally in the runtime search path, and there is no system installation of TBB.
FWIW, I can make this test compilation work by setting
Thanks for reporting this. I just opened PR #661. I think the problem is in the rstan package. rstanplugin sets tbb_libs <- "-ltbb" with no rpath, so any user on Alpine Linux will probably hit the same error, so we'll also fix it there.
Thanks! While at it: I don't know why rstan::expose_stan_functions() chose to wrap compilation inside try(silent=TRUE), but it would really help if errors were visible.
Activity
jgabry commentedon Sep 29, 2026
Thanks for reporting this. I just opened PR #661. I think the problem is in the rstan package. rstanplugin sets
tbb_libs <- "-ltbb"with no rpath, so any user on Alpine Linux will probably hit the same error, so we'll also fix it there.bastistician commentedon Sep 30, 2026
Thanks! While at it: I don't know why
rstan::expose_stan_functions()chose to wrap compilation insidetry(silent=TRUE), but it would really help if errors were visible.