fix(patches): add rstan entry to skip removed tbb_stddef.h #114
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/rstan-tbb-stddef-patch"
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?
Motivation
rstanfails to compile when it is pulled in as a transitive dependency (e.g. ofctsem), aborting the dependency install:StanHeaders'
init_threadpool_tbb.hppunconditionally includes the legacy<tbb/tbb_stddef.h>to detect the TBB version, but that header was removed in oneTBB 2021+, which is the TBB that StanHeaders now bundles.Fix
Add an
rstanentry tolocal/patches/registry.jsonthat pre-definesTBB_INTERFACE_NEWviaCPPFLAGS.The header's own guard skips the removed include when that macro is already defined and selects the modern
tbb/global_control.h+tbb/task_arena.hpath that the bundled oneTBB actually provides:This is a makevars-tier override (no source diff), applied through bincraft's
R_MAKEVARS_USER, soCPPFLAGSstays additive and does not clobber rstan's ownPKG_CPPFLAGS.-I/usr/local/includeis kept because the override replaces the defaultCPPFLAGS.Files changed
local/patches/registry.json: add therstanentry (versions: "*",platforms: ["*"],makevars.CPPFLAGS = "-DTBB_INTERFACE_NEW -I/usr/local/include").Behaviour change
When bincraft resolves
rstan(direct or transitive) it builds a patched binary withTBB_INTERFACE_NEWdefined, sorstan(and dependents such asctsem) compile against the bundled oneTBB.The scope is
["*"]because the failure is bound to StanHeaders' bundled TBB version, not the OS or toolchain.2561bed5e7to6373712c70