Skip to content

Commit

Permalink
apacheGH-41145: [R][CI] test-r-dev-duckdb fails installing duckdb (ap…
Browse files Browse the repository at this point in the history
…ache#41152)

### Rationale for this change

An error is received installing R duckdb:

```
apache#15 18.13 > remotes::install_github('duckdb/duckdb-r', build = FALSE)
apache#15 18.27 Error: Failed to install 'unknown package' from **GitHub:**
apache#15 18.27   Line starting 'Roxyg ...' is malformed!
```

Some searching seems to suggest that this is because R cannot process UTF-8 characters in DESCRIPTION files if the `LANG` is set to `C`.

### What changes are included in this PR?

The `LANG` is set to `C.UTF-8` in the dockerfile for this CI job

### Are these changes tested?

The change only affects a test

### Are there any user-facing changes?

No
* GitHub Issue: apache#41145

Authored-by: Weston Pace <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
  • Loading branch information
westonpace authored and tolleybot committed May 2, 2024
1 parent b9874a5 commit 81c6005
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ci/docker/linux-apt-r.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ ENV R_PRUNE_DEPS=${r_prune_deps}
ARG r_duckdb_dev=FALSE
ENV R_DUCKDB_DEV=${r_duckdb_dev}

# This is needed to avoid errors with utf8 characters in some
# R package's DESCRIPTION files
# https://github.com/statnmap/HatchedPolygons/issues/4
ENV LANG=C.UTF-8

# Build R
# [1] https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04
# [2] https://linuxize.com/post/how-to-install-r-on-ubuntu-18-04/#installing-r-packages-from-cran
Expand Down

0 comments on commit 81c6005

Please sign in to comment.