fix: RcppParallel disable-TBB source patch (env var was a no-op) #106
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/rcppparallel-disable-tbb"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes the RcppParallel patch, which was a no-op and left the build hanging.
The previous registry entry set
env: { RCPP_PARALLEL_USE_TBB: "0" }. ButRCPP_PARALLEL_USE_TBBis a compile-time-Dflag in RcppParallel's Makevars — it is never read from the environment. So the override did nothing:USE_TBB=Linux(hardcoded fromuname) still triggered the bundled Intel TBB build, which hangs/fails on musl (Alpine) and newer toolchains (g++ 15 on ubuntu-2604). TheApplying patch …log only meant the env was set, not that it had any effect.Fix
Replace the env entry with a source patch (
local/patches/RcppParallel/disable-tbb.patch) onsrc/Makevars.inthat, on Linux:USE_TBBunset → the whole bundled-TBB build/link path is skipped (no hang), andPKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=0→ the sources compile the TinyThread backend (needed becauseRcppParallel.hotherwise auto-defaults TBB on for glibc Linux).Verification
In a Linux container, applying the patch and running
R CMD INSTALL RcppParallel:Note
bincraft's
apply_source_patchshells out topatch. If a build-env image lacks thepatchtool (common on Alpine), the patch will report "did not apply cleanly" and fall back to an unpatched (hanging) build. If that happens, the follow-up is to switch bincraft's patch application togit apply(git is always present) — happy to do that if needed.