fix(patches): force fs to build vendored static libuv #111
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/fs-vendored-libuv"
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?
Problem
The
fs2.1.0 binary links system libuv (readelf -d fs.soshowsNEEDED libuv.so.1).fs's
configureprefers system libuv wheneverpkg-configresolves it, and our build images shiplibuv-devel(installed as a pak build-time system requirement), so the resulting binary is dynamically linked againstlibuv.so.1.That binary fails to load on any consumer machine without runtime libuv:
install.packages()/renv do not installSystemRequirements(onlypakdoes, and only inside the build container), so most consumers hit this.Older fs 1.6.x always vendored libuv, so only the 2.x binaries regressed.
Reproduced in a clean
reg.devxy.io/r/r-alma:4.5-9.Fix
Add
local/patches/fs/force-vendored-libuv.patch, registered for all platforms.It short-circuits
configuretocp -f src/Makevars.vendor src/Makevars; exit 0before the pkg-config detection, forcing the bundled static libuv build (tools/libuv-v1.52.0.tar.gz, built via cmake).An env/pkg-config override (
PKG_CONFIG_LIBDIR) was tried first but the rebuilt binary still linkedlibuv.so.1(the registryenvtier does not reach fs's configure step), so a source patch is used instead.Verification
Built end-to-end inside the real
build-env-redhat:9image (system libuv present):Building static libuv (bincraft: forced vendored)),fs.sohas nolibuv.so.1inNEEDED(only libR, libstdc++, libm, libgcc_s, libc).Rscript local/validate-patches.Rpasses (2 entries).cmake confirmed present in the build-env images.
Follow-up (not in this PR)
fs 2.1.0on every affected platform (rhel8/9/10, ubuntu jammy/noble, alpine 3.22/3.23; amd64 + arm64) and purge the CDN binary paths.purge_cdn_cache.shonly purgesPACKAGES*, never package binaries, so rebuilt binaries stay masked until their.tar.gzpath is purged.