Skip to content

r.j2: add manylinux R tarball install macros #747

Description

@bschwedler

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 (#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerRelated to container images we produce

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions