From b1bfbbd8a71422a84cff0219566499b7523632ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 9 Jun 2023 15:00:20 +0300 Subject: [PATCH] docker: Install a newer CMake LLVM 17 requires CMake 3.20 or newer, while Ubuntu 20.04 ships with CMake 3.16.3. --- Dockerfile | 11 +++++++++++ Dockerfile.dev | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8dd1ca5a..be472c5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,17 @@ RUN apt-get update -qq && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* +# Manually install a newer version of CMake; this is needed since building +# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If +# updating to a newer distribution, this can be dropped. +RUN cd /opt && \ + curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \ + tar -zxf cmake-*.tar.gz && \ + rm cmake-*.tar.gz && \ + mv cmake-* cmake +ENV PATH=/opt/cmake/bin:$PATH + + RUN git config --global user.name "LLVM MinGW" && \ git config --global user.email root@localhost diff --git a/Dockerfile.dev b/Dockerfile.dev index 4db9eb34..829e9c0a 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -8,6 +8,17 @@ RUN apt-get update -qq && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* +# Manually install a newer version of CMake; this is needed since building +# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If +# updating to a newer distribution, this can be dropped. +RUN cd /opt && \ + curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \ + tar -zxf cmake-*.tar.gz && \ + rm cmake-*.tar.gz && \ + mv cmake-* cmake +ENV PATH=/opt/cmake/bin:$PATH + + RUN git config --global user.name "LLVM MinGW" && \ git config --global user.email root@localhost