fix(patches): replace the RcppParallel system-TBB patch with a link-order fix
RcppParallel 6.x rewrote its build: src/Makevars.in no longer has the `USE_TBB=Linux` block the registry patch edited, so the patch could never apply and every build logged "Patch for RcppParallel did not apply cleanly". The workaround it implemented is also obsolete. 6.x bundles oneTBB 2022 and builds it with cmake, which works on musl and with g++ 8-15, so there is no longer a reason to link a system TBB -- and linking one publishes a binary that needs a TBB the consumer does not have. What is still broken upstream is the link order. configure.R names the TBB directory with `-Wl,-L`, and gcc expands its own search dirs into `-L` options ahead of anything forwarded verbatim with `-Wl,`, so on a build host with a distro TBB installed `-ltbb` resolves to that library and RcppParallel.so records its SONAME instead of the bundled `libtbb.so`. The new patch passes a plain `-L` instead. Verified on alpine 3.24, redhat 8 and ubuntu noble: RcppParallel gets NEEDED libtbb.so with RPATH $ORIGIN/../lib and loads with every system libtbb moved away, and rstan 2.32.7 compiles and loads against it with no makevars override -- RcppParallel::CxxFlags() already emits -DTBB_INTERFACE_NEW -- so the rstan entry is dropped too. Summary: - replace RcppParallel/system-tbb.patch with bundled-tbb-link-order.patch - scope the RcppParallel entry to >=6.0.0 and widen its platforms to "*" - drop the rstan entry, made redundant by the bundled oneTBB - exclude local/patches/*.patch from the whitespace-mutating hooks, which rewrote context lines in every diff
This commit is contained in:
parent
8d0c4b7ccd
commit
3c0459006a
1 changed files with 61 additions and 45 deletions
|
|
@ -56,7 +56,7 @@ For every package+tag combination:
|
|||
## Patching packages
|
||||
|
||||
Some CRAN packages fail to compile on specific platforms due to compiler- or OS-specific issues unrelated to the package itself.
|
||||
The canonical example is `RcppParallel`, whose bundled TBB sources fail on musl (Alpine) and newer compiler/OS combinations.
|
||||
The canonical example is `RcppParallel`, whose bundled TBB is linked in a way that lets a system TBB on the build host shadow it, so the published binary depends on a library the consumer does not have.
|
||||
Because such packages are often transitive dependencies of many others, a single failure cascades: all dependents fail even though nothing is wrong with the dependent itself.
|
||||
|
||||
To address this, frequently-failing packages can be "patched" before they are installed — whether as a direct build target or a transitive dependency pulled in by `pak`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue