Skip to content

Commit

Permalink
R 4.4.0 (#420)
Browse files Browse the repository at this point in the history
* Update patches for R 4.4.0

* Use R 4.4.0

* Remove package subdirectory override

New subdirectory for R 4.4 series, no longer require individual
patch level Wasm package builds.

* Don't hard-code Wasm repository in package tests

* Avoid incompatible grDevices/iconv tests

* Add de-duplicating pkg-config shim

* Add glib patch for Python 3.12 compatibility

Co-authored-by: Jeroen Ooms <jeroenooms@gmail.com>

* Use default nodejs in docker image (#421)

* Use default nodejs in docker image

---------

Co-authored-by: Jeroen Ooms <jeroenooms@gmail.com>
  • Loading branch information
georgestagg and jeroen committed May 2, 2024
1 parent 0b10025 commit 0b5a990
Show file tree
Hide file tree
Showing 31 changed files with 630 additions and 1,822 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Expand Up @@ -26,14 +26,8 @@ RUN mkdir /opt/fake_rust/ && \

# Step 2: Do the necessary setups
FROM webr as scratch
# Install node 18
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \
gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] \
https://deb.nodesource.com/node_18.x nodistro main" | \
tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
# Install nodejs
RUN apt-get update && \
apt-get install nodejs -y

# Install Rust; these lines are based on the official Rust docker image:
Expand Down Expand Up @@ -72,7 +66,7 @@ RUN curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg

# Because $HOME gets masked by GHA with the host $HOME
ENV R_LIBS_USER=/opt/R/current/lib/R/site-library
RUN rig add 4.3.3
RUN rig add 4.4.0

# Download webR and configure for LLVM flang
RUN git clone https://github.com/r-wasm/webr.git /opt/webr
Expand Down
8 changes: 6 additions & 2 deletions R/Makefile
Expand Up @@ -72,7 +72,7 @@ STAGE1_FC ?= gfortran

# Stage 1: Build a native version of R so we can compile the default packages
$(BUILD)/state/R-$(R_VERSION)/r-stage1-configured: $(BUILD)/state/R-$(R_VERSION)/r-patched
mkdir -p $(R_SOURCE)/build-stage1/doc
@mkdir -p $(R_SOURCE)/build-stage1/doc
# Workaround for the lack of LaTeX packages
cd $(R_SOURCE)/build-stage1/doc && \
touch NEWS NEWS.pdf NEWS.rds NEWS.2.rds NEWS.3.rds
Expand Down Expand Up @@ -156,8 +156,12 @@ SHLIB_LDFLAGS += -s WASM_BIGINT $(WASM_OPT_LDADD)

# Stage 2: Reconfigure and build for wasm32-unknown-emscripten target
$(BUILD)/state/R-$(R_VERSION)/r-stage2-configured: $(BUILD)/state/R-$(R_VERSION)/r-patched $(FORTRAN_WASM_LIB)
mkdir -p $(R_SOURCE)/build
@mkdir -p $(R_SOURCE)/build
@cp $(TOOLS)/shims/pkg-config $(HOST)/bin/pkg-config
@chmod +x $(HOST)/bin/pkg-config
cd $(R_SOURCE)/build && \
PKG_CONFIG="$(HOST)/bin/pkg-config" \
EM_PKG_CONFIG="$(shell which pkg-config)" \
EM_PKG_CONFIG_PATH="$(WASM)/lib/pkgconfig" \
MAIN_LDFLAGS="$(MAIN_LDFLAGS)" \
SHLIB_LDFLAGS="$(SHLIB_LDFLAGS)" \
Expand Down
2 changes: 1 addition & 1 deletion R/R-VERSION
@@ -1 +1 @@
4.3.3
4.4.0
9 changes: 0 additions & 9 deletions packages/webr/R/install.R
Expand Up @@ -29,15 +29,6 @@ install <- function(packages,
repos <- gsub("/$", "", repos)
contrib <- sprintf("%s/bin/emscripten/contrib/%s", repos, ver)

# Handle webR 0.3.x - R 4.3.3 on repo.r-wasm.org
# TODO: Once R 4.4.0 is released this can be removed from future webR builds
contrib <- gsub(
"repo.r-wasm.org/bin/emscripten/contrib/4.3",
"repo.r-wasm.org/bin/emscripten/contrib/4.3.3",
contrib,
fixed = TRUE
)

if (is.null(info)) {
info <- utils::available.packages(contriburl = contrib)
}
Expand Down
154 changes: 0 additions & 154 deletions patches/R-4.3.3/emscripten-avoid-testing-issues.diff

This file was deleted.

0 comments on commit 0b5a990

Please sign in to comment.