eitsupi / r-ver

Personal experiment with Docker image for R
GNU General Public License v2.0
0 stars 0 forks source link

arm64 builds cannot use binary R packages #13

Open eitsupi opened 3 years ago

eitsupi commented 3 years ago
> R.version$arch
[1] "aarch64"
> R.version$platform
[1] "aarch64-unknown-linux-gnu"
> source("https://docs.rstudio.com/rspm/admin/check-user-agent.R")
R version: R version 4.0.5 (2021-03-31)
OS version: Ubuntu 20.04.2 LTS
HTTPUserAgent: R/4.0.5 R (4.0.5 aarch64-unknown-linux-gnu aarch64 linux-gnu)
Download method: libcurl
Download extra args:

----------------------------

Success! Your user agent is correctly configured.
> library(dplyr)
Error: package or namespace load failed for ‘dplyr’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/rlang/libs/rlang.so':
  /usr/local/lib/R/site-library/rlang/libs/rlang.so: cannot open shared object file: No such file or directory

We can use the package by installing from source.

> options(repos = "https://packagemanager.rstudio.com/all/latest")

image

ghcr.io/eitsupi/r-ver@sha256:17e1443d589afc90cea6e9318168f3432ffa59fe41bf0a9b2599b6c886286250
eitsupi commented 3 years ago

As a temporary measure, the script added in #36 was used like #38 to modify the environment variable CRAN to not install binaries when the architecture was arm64. R package binaries for Linux are available in several ways, including RSPM, but none of them seem to provide binaries for arm64.

Reference: https://github.com/Enchufa2/bspm, https://github.com/Enchufa2/cran2copr