Skip to content

Commit 673454b

Browse files
committed
[SPARK-56372][INFRA][4.1] Add cmake to CI Docker images for R fs package compilation
This is a cherry-pick of c869549 for branch-4.1. ### What changes were proposed in this pull request? Add `cmake` to the `apt-get install` list in CI Docker images (`docs`, `lint`, `sparkr`). ### Why are the changes needed? The R `fs` package (a transitive dependency of `devtools`, `testthat`, `rmarkdown`) now bundles `libuv v1.52.0`, which requires `cmake` to build. This causes the "Base image build" job to fail with: ``` /bin/bash: line 2: cmake: command not found make: *** [Makevars:44: libuv] Error 127 ERROR: compilation failed for package 'fs' ``` The `fs` compilation failure cascades into: `sass` → `bslib` → `shiny` → `rmarkdown` → `devtools` → `testthat`, breaking the entire R package installation. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? CI should pass with the updated Docker images. ### Was this patch authored or co-authored using generative AI tooling? Co-authored-by: Claude code (Opus 4.6) Closes #55254 from zhengruifeng/cherry-pick-4.1. Authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Ruifeng Zheng <ruifengz@foxmail.com>
1 parent b53e090 commit 673454b

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

dev/spark-test-image/docs/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ENV DEBCONF_NONINTERACTIVE_SEEN=true
3232
RUN apt-get update && apt-get install -y \
3333
build-essential \
3434
ca-certificates \
35+
cmake \
3536
curl \
3637
gfortran \
3738
git \
@@ -71,7 +72,7 @@ RUN apt-get update && apt-get install -y \
7172
RUN Rscript -e "install.packages(c('devtools', 'knitr', 'markdown', 'rmarkdown', 'testthat', 'remotes'), repos='https://cloud.r-project.org/')" && \
7273
Rscript -e "devtools::install_version('roxygen2', version='7.2.0', repos='https://cloud.r-project.org')" && \
7374
Rscript -e "devtools::install_version('pkgdown', version='2.0.1', repos='https://cloud.r-project.org')" && \
74-
Rscript -e "devtools::install_version('preferably', version='0.4', repos='https://cloud.r-project.org')"
75+
Rscript -e "devtools::install_version('preferably', version='0.4', repos='https://cloud.r-project.org', upgrade='never')"
7576

7677
# See more in SPARK-39735
7778
ENV R_LIBS_SITE="/usr/local/lib/R/site-library:${R_LIBS_SITE}:/usr/lib/R/library"

dev/spark-test-image/lint/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ENV DEBCONF_NONINTERACTIVE_SEEN=true
3232
RUN apt-get update && apt-get install -y \
3333
build-essential \
3434
ca-certificates \
35+
cmake \
3536
curl \
3637
gfortran \
3738
git \
@@ -98,6 +99,7 @@ RUN python3.11 -m pip install \
9899
'pyarrow>=22.0.0' \
99100
'pytest-mypy-plugins==1.9.3' \
100101
'pytest==7.1.3' \
102+
'types-protobuf==6.32.1.20260221' \
101103
&& python3.11 -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu \
102104
&& python3.11 -m pip install torcheval \
103105
&& python3.11 -m pip cache purge

dev/spark-test-image/sparkr/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ENV DEBCONF_NONINTERACTIVE_SEEN=true
3232
RUN apt-get update && apt-get install -y \
3333
build-essential \
3434
ca-certificates \
35+
cmake \
3536
curl \
3637
gfortran \
3738
git \

0 commit comments

Comments
 (0)