1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-08 03:27:04 +09:00

Fix codespaces build by bumping clang llvm (#105385)

* Replace system clang.

* Unify dockerfiles.

* Update docs.

* Feedback: typo
This commit is contained in:
Ilona Tomkowicz 2024-07-24 11:20:32 +02:00 committed by GitHub
parent 34f125f8cc
commit d91d9a116f
Signed by: github
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 7 deletions

View file

@ -5,12 +5,19 @@
ARG VARIANT="6.0-jammy"
FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT}
# Set up machine requirements to build the repo and the gh CLI
# Clang-16 up is required but Ubuntu 22.04 comes with clang-14 highest, so add clang-18 sources
RUN apt-get update \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \
&& apt-get install software-properties-common -y \
&& add-apt-repository "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" -y \
&& apt-get update \
&& apt-get install clang-18 -y
# Set up machine requirements to build the repo and the gh CLI
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
cmake \
llvm \
clang \
build-essential \
python3 \
curl \

View file

@ -5,12 +5,19 @@
ARG VARIANT="6.0-jammy"
FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT}
# Set up machine requirements to build the repo and the gh CLI
# Clang-16 up is required but Ubuntu 22.04 comes with clang-14 highest, so add clang-18 sources
RUN apt-get update \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \
&& apt-get install software-properties-common -y \
&& add-apt-repository "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" -y \
&& apt-get update \
&& apt-get install clang-18 -y
# Set up machine requirements to build the repo and the gh CLI
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
cmake \
llvm \
clang \
build-essential \
python3 \
curl \

View file

@ -6,11 +6,17 @@ ARG VARIANT="6.0-jammy"
FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT}
# Set up machine requirements to build the repo and the gh CLI
# Clang-16 up is required but Ubuntu 22.04 comes with clang-14 highest, so add clang-18 sources
RUN apt-get update \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \
&& apt-get install software-properties-common -y \
&& add-apt-repository "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" -y \
&& apt-get update \
&& apt-get install clang-18 -y
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
cmake \
llvm \
clang \
build-essential \
python3 \
curl \

View file

@ -37,7 +37,7 @@ Install the following packages for the toolchain:
* CMake 3.20 or newer
* llvm
* lld
* clang
* clang 16 or newer
* build-essential
* python-is-python3
* curl
@ -59,6 +59,7 @@ sudo apt install -y cmake llvm lld clang build-essential \
```
**NOTE**: As of now, Ubuntu's `apt` only has until CMake version 3.16.3 if you're using Ubuntu 20.04 LTS (less in older Ubuntu versions), and version 3.18.4 in Debian 11 (less in older Debian versions). This is lower than the required 3.20, which in turn makes it incompatible with the repo. For this case, we can use the `snap` package manager or the _Kitware APT feed_ to get a new enough version of CMake.
**NOTE**: If you have Ubuntu 22.04 LTS and older and your `apt` does not have clang version 16, you can add `"deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main"` repository to your `apt`. See how we do it for linux-based containers [here](./../../../.devcontainer/Dockerfile).
For snap: