diff --git a/src/Makevars.in b/src/Makevars.in index be8445f..7cb6c9e 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -60,7 +60,13 @@ else endif ifeq ($(UNAME), Linux) - USE_TBB=Linux + # bincraft patch: link the system oneTBB (installed in the build-env images) + # instead of building the bundled Intel TBB, which fails on musl (Alpine) and + # newer toolchains (g++ 15). Leaving USE_TBB unset skips the bundled build; + # -DRCPP_PARALLEL_USE_TBB=1 keeps the TBB backend so dependents (rstan, ...) + # link TBB, and -ltbb/-ltbbmalloc pull the system library from default paths. + PKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=1 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -DTBB_INTERFACE_NEW + PKG_LIBS += -ltbb -ltbbmalloc endif ifeq ($(UNAME), SunOS)