From 889c571e7997413d12318e6729955bd289cfb106 Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 30 Jun 2026 14:59:27 +0200 Subject: [PATCH] fix(patches): RcppParallel disable-TBB source patch (was a no-op env var) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous entry set env RCPP_PARALLEL_USE_TBB=0, but RcppParallel reads that only as a compile -D flag, not from the environment — so it was a no-op and the bundled Intel TBB build still ran (and hung on musl / newer toolchains). Replace it with a source patch on src/Makevars.in that leaves USE_TBB unset (skipping the bundled TBB build) and forces -DRCPP_PARALLEL_USE_TBB=0 so the sources use the TinyThread backend. Verified in a Linux container: RcppParallel installs with no bundled-TBB build (* DONE (RcppParallel)). --- local/patches/RcppParallel/disable-tbb.patch | 16 ++++++++++++++++ local/patches/registry.json | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 local/patches/RcppParallel/disable-tbb.patch diff --git a/local/patches/RcppParallel/disable-tbb.patch b/local/patches/RcppParallel/disable-tbb.patch new file mode 100644 index 0000000..0fe8ad9 --- /dev/null +++ b/local/patches/RcppParallel/disable-tbb.patch @@ -0,0 +1,16 @@ +diff --git a/src/Makevars.in b/src/Makevars.in +index be8445f..faee771 100644 +--- a/src/Makevars.in ++++ b/src/Makevars.in +@@ -60,7 +60,10 @@ else + endif + + ifeq ($(UNAME), Linux) +- USE_TBB=Linux ++ # bincraft patch: the bundled Intel TBB build hangs/fails on musl (Alpine) ++ # and newer toolchains (g++ 15). Skip it (leave USE_TBB unset) and force the ++ # TinyThread backend so RcppParallel still builds. ++ PKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=0 + endif + + ifeq ($(UNAME), SunOS) diff --git a/local/patches/registry.json b/local/patches/registry.json index 80460d6..cdeef99 100644 --- a/local/patches/registry.json +++ b/local/patches/registry.json @@ -3,10 +3,10 @@ "package": "RcppParallel", "versions": "*", "platforms": ["alpine", "ubuntu-2604"], - "env": { "RCPP_PARALLEL_USE_TBB": "0" }, + "env": {}, "configure_args": [], "makevars": {}, - "patch": null, - "reason": "bundled Intel TBB fails to build on musl and on newer toolchains (e.g. g++ 15 on ubuntu-2604); disabling TBB falls back to TinyThread" + "patch": "RcppParallel/disable-tbb.patch", + "reason": "bundled Intel TBB build hangs/fails on musl (Alpine) and newer toolchains (g++ 15 on ubuntu-2604); patch unsets USE_TBB and forces -DRCPP_PARALLEL_USE_TBB=0 so RcppParallel skips the bundled build and uses the TinyThread backend" } ]