Skip to content

apt installation script failing for LLVM 18 on ubuntu 20.04 aarch64 #99453

Closed
@ardabbour

Description

@ardabbour

There is likely a dependency version mismatch on the packages installed via the llvm.sh script:

To reproduce, here is a simple Dockerfile:

# issue.dockerfile
# ------------------------------------------------------------------------------
FROM ubuntu:20.04

# print system info
RUN uname -a

ENV LLVM_VERSION=18

RUN apt-get update && \
    apt-get install --no-install-recommends -y \
    # install deps
    lsb-release \
    wget \
    software-properties-common \
    gnupg && \
    # install llvm packages
    wget https://apt.llvm.org/llvm.sh && \
    chmod +x llvm.sh && \
    ./llvm.sh ${LLVM_VERSION} all && \
    rm llvm.sh && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

Building with docker build --no-cache --progress=plain --file issue.dockerfile -t ubuntu20_llvm18 . 2>&1 | tee build.log produces a long log, but here's the jist:

uname -a output:

Linux buildkitsandbox 6.6.32-linuxkit #1 SMP Thu Jun 13 14:13:01 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

./llvm.sh ${LLVM_VERSION} all relevant output:

#6 48.35 Reading package lists...
#6 48.71 + PKG='clang-18 lldb-18 lld-18 clangd-18'
#6 48.71 + [[ 1 -eq 1 ]]
#6 48.71 + PKG='clang-18 lldb-18 lld-18 clangd-18 clang-tidy-18 clang-format-18 clang-tools-18 llvm-18-dev lld-18 lldb-18 llvm-18-tools libomp-18-dev libc++-18-dev libc++abi-18-dev libclang-common-18-dev libclang-18-dev libclang-cpp18-dev libunwind-18-dev'
#6 48.71 + test 18 -gt 14
#6 48.71 + PKG='clang-18 lldb-18 lld-18 clangd-18 clang-tidy-18 clang-format-18 clang-tools-18 llvm-18-dev lld-18 lldb-18 llvm-18-tools libomp-18-dev libc++-18-dev libc++abi-18-dev libclang-common-18-dev libclang-18-dev libclang-cpp18-dev libunwind-18-dev libclang-rt-18-dev libpolly-18-dev'
#6 48.71 + apt-get install -y clang-18 lldb-18 lld-18 clangd-18 clang-tidy-18 clang-format-18 clang-tools-18 llvm-18-dev lld-18 lldb-18 llvm-18-tools libomp-18-dev libc++-18-dev libc++abi-18-dev libclang-common-18-dev libclang-18-dev libclang-cpp18-dev libunwind-18-dev libclang-rt-18-dev libpolly-18-dev
#6 48.73 Reading package lists...
#6 49.09 Building dependency tree...
#6 49.16 Reading state information...
#6 49.19 Some packages could not be installed. This may mean that you have
#6 49.19 requested an impossible situation or if you are using the unstable
#6 49.19 distribution that some required packages have not yet been created
#6 49.19 or been moved out of Incoming.
#6 49.19 The following information may help to resolve the situation:
#6 49.19 
#6 49.19 The following packages have unmet dependencies:
#6 49.23  clang-18 : Depends: libclang-cpp18 (>= 1:18.1.8~++20240717045021+3b5b5c1ec4a3) but it is not going to be installed
#6 49.23             Depends: libllvm18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23             Depends: llvm-18-linker-tools (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23             Depends: libclang1-18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  clang-format-18 : Depends: libclang-cpp18 (>= 1:18.1.8~++20240717045021+3b5b5c1ec4a3) but it is not going to be installed
#6 49.23                    Depends: libllvm18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  clang-tidy-18 : Depends: libclang-cpp18 (>= 1:18.1.8~++20240717045021+3b5b5c1ec4a3) but it is not going to be installed
#6 49.23                  Depends: libllvm18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  clang-tools-18 : Depends: libclang-cpp18 (>= 1:18.1.8~++20240717045021+3b5b5c1ec4a3) but it is not going to be installed
#6 49.23                   Depends: libclang1-18 (>= 1:17) but it is not going to be installed
#6 49.23                   Depends: libllvm18 but it is not going to be installed
#6 49.23  clangd-18 : Depends: libclang-cpp18 (>= 1:18.1.8~++20240717045021+3b5b5c1ec4a3) but it is not going to be installed
#6 49.23              Depends: libllvm18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  libclang-18-dev : Depends: libclang1-18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  libclang-cpp18-dev : Depends: libclang-cpp18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  libomp-18-dev : Depends: libomp5-18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  lld-18 : Depends: libllvm18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23  lldb-18 : Depends: libclang-cpp18 (>= 1:18.1.8~++20240717045021+3b5b5c1ec4a3) but it is not going to be installed
#6 49.23            Depends: liblldb-18 but it is not going to be installed
#6 49.23            Depends: libllvm18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23            Depends: python3-lldb-18 but it is not going to be installed
#6 49.23  llvm-18-dev : Depends: llvm-18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23                Depends: libllvm18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23                Depends: libclang-cpp18 (= 1:18.1.8~++20240717045021+3b5b5c1ec4a3-1~exp1~20240717165111.140) but it is not going to be installed
#6 49.23 E: Unable to correct problems, you have held broken packages.
#6 ERROR: process "/bin/sh -c apt-get update &&     apt-get install --no-install-recommends -y     lsb-release     wget     software-properties-common     gnupg &&     wget https://apt.llvm.org/llvm.sh &&     chmod +x llvm.sh &&     ./llvm.sh ${LLVM_VERSION} all &&     rm llvm.sh &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

Note that when LLVM_VERSION is 17, there are no issues.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions