Skip to content

Commit fdd3e15

Browse files
raulcdamoebakounealrichardson
authored
GH-44950: [C++] Bump minimum CMake version to 3.25 (#44989)
### Rationale for this change We want to upgrade our CMake version to 3.25 as discussed on the ML: https://lists.apache.org/thread/h8jp16ktrj11fmjmjhlg6xvkvv9wzvjk ### What changes are included in this PR? - Bump minimal CMake version to 3.25 - Manually install CMake on distributions where CMake < 3.25 was installed via package repositories - Minor fixes to CI in order to have passing builds everywhere ### Are these changes tested? Yes, via CI. ### Are there any user-facing changes? Yes, the minimum CMake version to be used to build Arrow is bumped to 3.25. **This PR includes breaking changes to build systems.** * GitHub Issue: #44950 Lead-authored-by: Raúl Cumplido <[email protected]> Co-authored-by: Bryce Mecum <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Neal Richardson <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent f8ba543 commit fdd3e15

39 files changed

Lines changed: 493 additions & 65 deletions

‎.env‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ UBUNTU=22.04
5454

5555
# Default versions for various dependencies
5656
CLANG_TOOLS=14
57+
CMAKE=3.25.0
5758
CUDA=11.2.2
5859
DASK=latest
5960
DOTNET=8.0

‎.github/workflows/cpp.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156

157157
build-example:
158158
name: C++ Minimal Build Example
159-
runs-on: ubuntu-latest
159+
runs-on: ubuntu-24.04
160160
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
161161
timeout-minutes: 45
162162
steps:

‎.github/workflows/dev.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
lint:
4343
name: Lint C++, Python, R, Docker, RAT
44-
runs-on: ubuntu-latest
44+
runs-on: ubuntu-24.04
4545
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
4646
timeout-minutes: 15
4747
steps:

‎ci/docker/centos-7-cpp.dockerfile‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ RUN \
3737
-e 's/mirror\.centos\.org/vault.centos.org/' \
3838
/etc/yum.repos.d/CentOS-SCLo-scl*.repo && \
3939
yum install -y \
40-
cmake3 \
4140
curl \
4241
devtoolset-8 \
4342
diffutils \
@@ -49,9 +48,13 @@ RUN \
4948
wget \
5049
which
5150

51+
ARG cmake
52+
COPY ci/scripts/install_cmake.sh /arrow/ci/scripts/
53+
RUN /arrow/ci/scripts/install_cmake.sh ${cmake} /usr/local/
54+
5255
COPY ci/scripts/install_sccache.sh /arrow/ci/scripts/
5356
RUN bash /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin
5457

5558
ENV \
5659
ARROW_R_DEV=TRUE \
57-
CMAKE=/usr/bin/cmake3
60+
CMAKE=/usr/local/bin/cmake

‎ci/docker/linux-r.dockerfile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ RUN /arrow/ci/scripts/r_docker_configure.sh
5151
COPY ci/scripts/install_sccache.sh /arrow/ci/scripts/
5252
RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin
5353

54+
ARG cmake
55+
COPY ci/scripts/install_cmake.sh /arrow/ci/scripts/
56+
RUN /arrow/ci/scripts/install_cmake.sh ${cmake} /usr/local/
57+
5458
COPY ci/scripts/r_deps.sh /arrow/ci/scripts/
5559
COPY r/DESCRIPTION /arrow/r/
5660
RUN /arrow/ci/scripts/r_deps.sh /arrow

‎ci/docker/python-wheel-manylinux.dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ENV PATH=/opt/python/${CPYTHON_VERSION}-${CPYTHON_VERSION}/bin:${PATH}
5353
# Install CMake
5454
ARG cmake=3.29.2
5555
COPY ci/scripts/install_cmake.sh arrow/ci/scripts/
56-
RUN /arrow/ci/scripts/install_cmake.sh ${arch} linux ${cmake} /usr/local
56+
RUN /arrow/ci/scripts/install_cmake.sh ${cmake} /usr/local
5757

5858
# Install Ninja
5959
ARG ninja=1.10.2

‎ci/docker/ubuntu-20.04-cpp-minimal.dockerfile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ RUN apt-get update -y -q && \
2727
apt-get install -y -q \
2828
build-essential \
2929
ccache \
30-
cmake \
3130
curl \
3231
gdb \
3332
git \
@@ -68,6 +67,10 @@ RUN latest_system_llvm=10 && \
6867
apt-get clean && \
6968
rm -rf /var/lib/apt/lists*
7069

70+
ARG cmake
71+
COPY ci/scripts/install_cmake.sh /arrow/ci/scripts/
72+
RUN /arrow/ci/scripts/install_cmake.sh ${cmake} /usr/local/
73+
7174
COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
7275
RUN /arrow/ci/scripts/install_minio.sh latest /usr/local
7376

‎ci/docker/ubuntu-20.04-cpp.dockerfile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ RUN apt-get update -y -q && \
6767
autoconf \
6868
ca-certificates \
6969
ccache \
70-
cmake \
7170
curl \
7271
g++ \
7372
gcc \
@@ -121,6 +120,10 @@ RUN apt-get update -y -q && \
121120
apt-get clean && \
122121
rm -rf /var/lib/apt/lists*
123122

123+
ARG cmake
124+
COPY ci/scripts/install_cmake.sh /arrow/ci/scripts/
125+
RUN /arrow/ci/scripts/install_cmake.sh ${cmake} /usr/local/
126+
124127
COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
125128
RUN /arrow/ci/scripts/install_minio.sh latest /usr/local
126129

‎ci/docker/ubuntu-22.04-cpp-minimal.dockerfile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ RUN latest_system_llvm=14 && \
6868
apt-get clean && \
6969
rm -rf /var/lib/apt/lists*
7070

71+
ARG cmake
72+
COPY ci/scripts/install_cmake.sh /arrow/ci/scripts/
73+
RUN /arrow/ci/scripts/install_cmake.sh ${cmake} /usr/local/
74+
7175
COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
7276
RUN /arrow/ci/scripts/install_minio.sh latest /usr/local
7377

‎ci/docker/ubuntu-22.04-cpp.dockerfile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ RUN apt-get update -y -q && \
7171
ceph \
7272
ceph-fuse \
7373
ceph-mds \
74-
cmake \
7574
curl \
7675
gdb \
7776
git \
@@ -168,6 +167,10 @@ RUN if [ "${gcc}" = "" ]; then \
168167
# make sure zlib is cached in the EMSDK folder
169168
RUN source ~/emsdk/emsdk_env.sh && embuilder --pic build zlib
170169

170+
ARG cmake
171+
COPY ci/scripts/install_cmake.sh /arrow/ci/scripts/
172+
RUN /arrow/ci/scripts/install_cmake.sh ${cmake} /usr/local/
173+
171174
COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
172175
RUN /arrow/ci/scripts/install_minio.sh latest /usr/local
173176

0 commit comments

Comments
 (0)