posit-dev / posit-dev/images-shared

r.j2: add manylinux R tarball install macros

Open
#747 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cvp:0 docker tdp:2
Dominant language
Python
Stars
2
Forks
0
Avg merge
4d 13h
Merged PRs (30d)
22

Description

Add install_manylinux() / run_install_manylinux() to r.j2, so R can be
installed from a self-contained manylinux_2_34 tarball instead of the
deb/RPM package.

Why

The deb/RPM install dynamically links against system libraries (libcairo2,
libcurl4t64, libicu-dev, libopenblas-dev, libpango-1.0-0,
libtcl8.6, libtk8.6, libx11-6, etc.) that live in the installing OS's
own package tree. That's fine for a normal product image that ships its full
OS alongside R, but breaks for posit-dev/images-volumes, whose images are
built FROM scratch and only carry /opt/R — none of those system
libraries make the cut, so R fails at runtime once mounted into a container
that doesn't happen to have Ubuntu's exact package set installed. Verified
directly: copying only /opt/R into an unrelated debian:12-slim container
and running R fails with error while loading shared libraries: libblas.so.3: cannot open shared object file.

The manylinux_2_34 tarball at cdn.posit.co/r/manylinux_2_34/ bundles its
own non-glibc runtime dependencies (RUNPATH $ORIGIN/../../lib/.libs) and
only requires glibc >= 2.34 from the host, so it's safe to copy alone into a
scratch image.

Notes

Originally written as a workaround for the RHEL 10 (UBI) flexiblas-devel
blocker (posit-dev/images-shared#575), but that's fixed upstream
(rstudio/r-builds#329, merged) and doesn't need this. The macros are being
kept for the unrelated images-volumes use case instead.

Related

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading r.j2 and the related images-shared pull request #577 to understand the existing installation macros. Add install_manylinux() and run_install_manylinux() for the manylinux_2_34 R tarball, and verify that the resulting /opt/R installation can be copied into a scratch image without the listed system libraries.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, r
Domain
build-system, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.