Skip to content

Commit

Permalink
docker: install clang-tools-18
Browse files Browse the repository at this point in the history
to address the build failure caused by
llvm/llvm-project#59827, and to test
the build with C++23, we need to use clang-18. which will be
released in March 2023.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
  • Loading branch information
tchaikov committed Feb 2, 2024
1 parent f7ec114 commit 9463c21
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
FROM ubuntu:mantic
RUN apt-get -y update
RUN apt-get -y install gnupg curl
RUN echo "deb http://apt.llvm.org/mantic/ llvm-toolchain-mantic-17 main" \
>> /etc/apt/sources.list.d/llvm.list
RUN echo "deb http://apt.llvm.org/mantic/ llvm-toolchain-mantic-18 main" \
>> /etc/apt/sources.list.d/llvm.list
RUN curl -sSL https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc
RUN apt -y update \
&& apt -y install build-essential \
&& apt -y install gcc-12 g++-12 gcc-13 g++-13 pandoc \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13 \
&& apt -y install clang-16 clang-17 clang-tools-17 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 16 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 16 \
&& apt -y install clang-17 clang-18 clang-tools-18 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 17 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 17
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 17 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 18 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 18
COPY install-dependencies.sh /tmp/
RUN bash /tmp/install-dependencies.sh
CMD /bin/bash

0 comments on commit 9463c21

Please sign in to comment.