From a2a6a4f7efa9399975bdecb6384a3956d3abd625 Mon Sep 17 00:00:00 2001 From: pat-s Date: Fri, 18 Sep 2026 09:08:12 +0200 Subject: [PATCH] fix(alpine): declare xz-dev so R can start after a clean install 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. --- builder/package.alpine-320 | 5 ++++- builder/package.alpine-321 | 5 ++++- builder/package.alpine-322 | 5 ++++- builder/package.alpine-323 | 5 ++++- builder/package.alpine-324 | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/builder/package.alpine-320 b/builder/package.alpine-320 index 2e0b28e..d8dacf6 100644 --- a/builder/package.alpine-320 +++ b/builder/package.alpine-320 @@ -42,7 +42,10 @@ ${deflate_libs} # - libgomp1 - icu-dev - jpeg-dev -# - liblzma-dev +# liblzma-dev is the Debian name and does not exist on Alpine; xz-dev is the +# equivalent and pulls xz-libs, which owns liblzma.so.5. Without it libR.so +# cannot relocate its lzma symbols and R fails to start at all. +- xz-dev - openblas-dev - pango # - libpangocairo-1.0-0 diff --git a/builder/package.alpine-321 b/builder/package.alpine-321 index 2e0b28e..d8dacf6 100644 --- a/builder/package.alpine-321 +++ b/builder/package.alpine-321 @@ -42,7 +42,10 @@ ${deflate_libs} # - libgomp1 - icu-dev - jpeg-dev -# - liblzma-dev +# liblzma-dev is the Debian name and does not exist on Alpine; xz-dev is the +# equivalent and pulls xz-libs, which owns liblzma.so.5. Without it libR.so +# cannot relocate its lzma symbols and R fails to start at all. +- xz-dev - openblas-dev - pango # - libpangocairo-1.0-0 diff --git a/builder/package.alpine-322 b/builder/package.alpine-322 index 2e0b28e..d8dacf6 100644 --- a/builder/package.alpine-322 +++ b/builder/package.alpine-322 @@ -42,7 +42,10 @@ ${deflate_libs} # - libgomp1 - icu-dev - jpeg-dev -# - liblzma-dev +# liblzma-dev is the Debian name and does not exist on Alpine; xz-dev is the +# equivalent and pulls xz-libs, which owns liblzma.so.5. Without it libR.so +# cannot relocate its lzma symbols and R fails to start at all. +- xz-dev - openblas-dev - pango # - libpangocairo-1.0-0 diff --git a/builder/package.alpine-323 b/builder/package.alpine-323 index 2e0b28e..d8dacf6 100644 --- a/builder/package.alpine-323 +++ b/builder/package.alpine-323 @@ -42,7 +42,10 @@ ${deflate_libs} # - libgomp1 - icu-dev - jpeg-dev -# - liblzma-dev +# liblzma-dev is the Debian name and does not exist on Alpine; xz-dev is the +# equivalent and pulls xz-libs, which owns liblzma.so.5. Without it libR.so +# cannot relocate its lzma symbols and R fails to start at all. +- xz-dev - openblas-dev - pango # - libpangocairo-1.0-0 diff --git a/builder/package.alpine-324 b/builder/package.alpine-324 index 2e0b28e..d8dacf6 100644 --- a/builder/package.alpine-324 +++ b/builder/package.alpine-324 @@ -42,7 +42,10 @@ ${deflate_libs} # - libgomp1 - icu-dev - jpeg-dev -# - liblzma-dev +# liblzma-dev is the Debian name and does not exist on Alpine; xz-dev is the +# equivalent and pulls xz-libs, which owns liblzma.so.5. Without it libR.so +# cannot relocate its lzma symbols and R fails to start at all. +- xz-dev - openblas-dev - pango # - libpangocairo-1.0-0 -- 2.54.0