Skip to content

Commit 9fed575

Browse files
authored
build: restrict the CMake version installed on Ubuntu 20.04 and 22.04 to 3.x.x (#2245)
Resolve #2244. The reason for failing to build `thirdparties-src-*` images is that the `CMake` version is too new (currently 4.0.0) in the build environment for both Ubuntu 20.04 and 22.04, while some third-party dependencies still rely on older `CMake syntax`, e.g. `thrift-0.9.3` declares `cmake_minimum_required(VERSION 2.8.12)` in its `CMakeLists.txt`. Such legacy syntax is not fully compatible with the newest versions of `CMake`. To solve this problem, we restrict the `CMake` version installed in the Ubuntu 20.04 and 22.04 environments to [a newer 3.x.x version](https://pypi.org/project/cmake/#history) that also maintains compatibility with legacy `CMakeLists.txt` files.
1 parent 9806897 commit 9fed575

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docker/pegasus-build-env/ubuntu2004/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN add-apt-repository ppa:git-core/ppa -y; \
5858
apt-get install pkg-config -y --no-install-recommends; \
5959
rm -rf /var/lib/apt/lists/*
6060

61-
RUN pip3 install --no-cache-dir cmake
61+
RUN pip3 install --no-cache-dir cmake==3.31.6
6262

6363
RUN wget --progress=dot:giga https://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz -P /opt/thrift && \
6464
cd /opt/thrift && tar xzf thrift-0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \

docker/pegasus-build-env/ubuntu2204/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RUN apt-get update -y; \
5454
rm -rf /var/lib/apt/lists/*
5555

5656
RUN pip3 install --no-cache-dir --upgrade pip
57-
RUN pip3 install --no-cache-dir cmake
57+
RUN pip3 install --no-cache-dir cmake==3.31.6
5858

5959
ARG THRIFT_VERSION=0.11.0
6060
RUN wget --progress=dot:giga https://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz -P /opt/thrift && \

0 commit comments

Comments
 (0)