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
Add
install_manylinux()/run_install_manylinux()tor.j2, so R can beinstalled from a self-contained
manylinux_2_34tarball instead of thedeb/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'sown 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 scratchand only carry/opt/R— none of those systemlibraries 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/Rinto an unrelateddebian:12-slimcontainerand running
Rfails witherror while loading shared libraries: libblas.so.3: cannot open shared object file.The
manylinux_2_34tarball atcdn.posit.co/r/manylinux_2_34/bundles itsown non-glibc runtime dependencies (RUNPATH
$ORIGIN/../../lib/.libs) andonly requires glibc >= 2.34 from the host, so it's safe to copy alone into a
scratchimage.Notes
Originally written as a workaround for the RHEL 10 (UBI)
flexiblas-develblocker (#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-volumesuse case instead.Related