fix(patches): add rstan entry to skip removed tbb_stddef.h #114

Merged
pat-s merged 1 commit from fix/rstan-tbb-stddef-patch into main 2026-07-14 13:52:18 +00:00

View file

@ -18,5 +18,17 @@
"makevars": {},
"patch": "fs/force-vendored-libuv.patch",
"reason": "fs 2.x configure links system libuv whenever pkg-config finds libuv-devel (installed as a build-time sysreq), producing an fs.so with NEEDED libuv.so.1. That binary fails to dyn.load on consumer machines lacking runtime libuv, because install.packages/renv do not install SystemRequirements (only pak does, and only in the build container). The patch short-circuits configure to copy src/Makevars.vendor and build the bundled static libuv (needs cmake) so the binary is self-contained on every platform. An env/pkg-config override was tried first but the rebuilt binary still linked libuv.so.1, so a source patch is used instead."
},
{
"package": "rstan",
"versions": "*",
"platforms": ["*"],
"env": {},
"configure_args": [],
"makevars": {
"CPPFLAGS": "-DTBB_INTERFACE_NEW -I/usr/local/include"
},
"patch": null,
"reason": "StanHeaders' init_threadpool_tbb.hpp unconditionally includes the legacy <tbb/tbb_stddef.h> (removed in oneTBB 2021+) for version detection, breaking compilation of Module.cpp against the bundled oneTBB. Pre-defining TBB_INTERFACE_NEW skips that include and selects the modern tbb/global_control.h + tbb/task_arena.h path that the bundled TBB provides (-I/usr/local/include preserves the default CPPFLAGS the override replaces)"
}
]