File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ ARG DEBIAN_FRONTEND=noninteractive
162162# Install Clang. Use the LLVM apt repository to access the latest versions. We
163163# must repeat the DEBIAN_VERSION argument here, as it is not inherited from the
164164# base or source images.
165+ # Note, gcc is needed for build dependencies.
165166ARG DEBIAN_VERSION
166167ARG CLANG_VERSION
167168RUN <<EOF
@@ -170,6 +171,7 @@ printf "%s\n%s\n" \
170171 "deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} main" \
171172 | tee /etc/apt/sources.list.d/llvm.list
172173apt-get update
174+ apt-get install -y --no-install-recommends gcc
173175apt-get install -t llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} -y --no-install-recommends clang-${CLANG_VERSION} llvm-${CLANG_VERSION}
174176apt-get clean
175177rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -140,8 +140,9 @@ FROM base AS clang
140140
141141# Install Clang. Note that in the RHEL UBIs, we cannot choose the Clang version
142142# to install and we get what is available.
143+ # Note, gcc is needed for build dependencies.
143144RUN <<EOF
144- dnf install -y --setopt=tsflags=nodocs clang llvm
145+ dnf install -y --setopt=tsflags=nodocs clang llvm gcc
145146dnf clean -y all
146147rm -rf /var/cache/dnf/*
147148EOF
Original file line number Diff line number Diff line change @@ -157,13 +157,14 @@ FROM base AS clang
157157# This is not inherited from base image, ensure no manual interaction needed.
158158ARG DEBIAN_FRONTEND=noninteractive
159159
160- # Install Clang.
160+ # Install Clang. Note, gcc is needed for build dependencies
161161ARG CLANG_VERSION
162162RUN <<EOF
163163apt-get update
164164apt-get install -y --no-install-recommends \
165165 clang-${CLANG_VERSION} \
166- llvm-${CLANG_VERSION}
166+ llvm-${CLANG_VERSION} \
167+ gcc
167168apt-get clean
168169rm -rf /var/lib/apt/lists/*
169170EOF
You can’t perform that action at this time.
0 commit comments