fix(alpine): declare xz-dev so R can start after a clean install #10
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/alpine-xz-runtime-dep"
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
Found while verifying #9 against a published artifact.
The Alpine
.apkinstalls cleanly and then fails on every invocation, becauselibR.solinks against liblzma but the package never declared a dependency on it:The dependency list carried
# - liblzma-dev, the Debian name.That package does not exist on Alpine, so it had been commented out rather than translated, alongside the other Debian leftovers (
# - libc6,# - libgomp1,# - libx11-6).Unlike those, this one is actually required.
Change
Replace it with
xz-dev, the Alpine equivalent, which pullsxz-libs, the package that ownsliblzma.so.5.Keeping the
-devvariant matches every other entry in the list, which are deliberately-devso CRAN packages can be built from source on the target.Applied to all five
builder/package.alpine-*files.Verification
Repackaged the currently published
r-4.6.1_1_aarch64.apkwith the patched dependency list, then installed it into a cleanalpine:3.22container with nothing else added:Before this change the same clean install produced the relocation errors above.
Why now
This wants to land before the
FORCE_REBUILDrun that republishes the Alpine artifacts for #9.That rebuild is multi-hour, and without this it would publish 24 packages that have working graphics but still cannot start on a bare Alpine.
Follow-up worth considering
Nothing in CI installs a built package into a clean container, which is why this survived.
A smoke test that does
apk addof the produced artifact and runsRscript -e 'capabilities()'would catch both this class of bug and the one in #9 at the packaging stage.Happy to add it if you want it.
libR.so links against liblzma, but the Alpine package never declared a dependency on it. The list carried `# - liblzma-dev`, the Debian name, which does not exist on Alpine and so had been commented out rather than translated. The result is a package that installs cleanly and then fails on every invocation: Error loading shared library liblzma.so.5: No such file or directory (needed by /opt/R/4.6.1/lib/R/lib/libR.so) Error relocating /opt/R/4.6.1/lib/R/lib/libR.so: lzma_code: symbol not found Replace it with xz-dev, the Alpine equivalent, which pulls xz-libs, the package that owns liblzma.so.5. Keep the -dev variant to match every other entry in the list, which are -dev so that CRAN packages can be installed from source on the target. Verified by repackaging the currently published r-4.6.1_1_aarch64.apk with this dependency list and installing it into a clean alpine:3.22 container: R now starts with no manually added packages, where before it did not.pat-s referenced this pull request2026-09-18 07:09:02 +00:00