Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/testthat/test_stan_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ functions <- c(unlist(lapply(file.path(MODELS_HOME, "functions",
model_code <- paste(c("functions {", functions[grep("CODOLS", functions, invert = TRUE)], "}"), collapse = "\n")
stanc_ret <- stanc(model_code = model_code, model_name = "Stan Functions",
allow_undefined = TRUE)
# rstan's plugin links to RcppParallel's libtbb without an rpath, so on musl
# (e.g., Alpine) the compiled module can't find libtbb.so at load time (#660).
# This can be removed once we require an rstan release that includes the fix
# (stan-dev/rstan#1196).
if (Sys.info()[["sysname"]] == "Linux") {
Sys.setenv(PKG_LIBS = paste(Sys.getenv("PKG_LIBS"),
paste0("-Wl,-rpath,", RcppParallel::tbbLibraryPath())))
}
expose_stan_functions(stanc_ret, rebuild = TRUE, verbose = TRUE)
# Rcpp::registerPlugin("rstan", rstan:::rstanplugin)
# Rcpp::sourceCpp(file.path(INCLUDE_DIR, "tests.cpp"), rebuild = TRUE, verbose = TRUE)
Expand Down
Loading