The disable-tbb patch skipped the bundled Intel TBB build by forcing the TinyThread backend, which also stripped RcppParallel's TBB linkage. That broke every dependent that links TBB through RcppParallelLibs() (rstan and the whole Stan cluster) with 'symbol not found: tbb::detail::r1::observe'. Replace it with system-tbb.patch: leave USE_TBB unset (so the bundled build is skipped on musl and g++ 15) but keep the TBB backend and link the system oneTBB that the build-env images now ship. RcppParallelLibs() then hands the system-TBB link flags to dependents, provided TBB_INC/TBB_LIB are exported in the images (added separately in build-env-images). Verified in the build-env-alpine:3.24 image: RcppParallel builds against oneTBB 2022 with no ABI errors, and rstan links (-ltbb -ltbbmalloc) and loads without the missing-symbol error.
19 lines
768 B
Diff
19 lines
768 B
Diff
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)
|