Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ardabbour opened this issue Jul 18, 2024 · 5 comments
Closed

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

ardabbour opened this issue Jul 18, 2024 · 5 comments

Comments

@ardabbour
Copy link

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.

@svenpanne
Copy link

An even easier repro with llvm-18-dev alone, no other LLVM-18-related packages involved:

sp@homer:~$ sudo apt install llvm-18-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libllvm18 : Breaks: llvm-18-dev (< 1:18.1.8-4) but 1:18.1.8~++20240717045004+3b5b5c1ec4a3-1~exp1~20240717165111.153 is to be installed
E: Unable to correct problems, you have held broken packages.

System information:

sp@homer:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 23.10
Release:	23.10
Codename:	mantic
sp@homer:~$ cat /etc/apt/sources.list.d/apt-llvm-org.list 
deb [arch=amd64] http://apt.llvm.org/mantic/ llvm-toolchain-mantic main
deb-src http://apt.llvm.org/mantic/ llvm-toolchain-mantic main
# 17
# deb [arch=amd64] http://apt.llvm.org/mantic/ llvm-toolchain-mantic-17 main
# deb-src http://apt.llvm.org/mantic/ llvm-toolchain-mantic-17 main
# 18
deb [arch=amd64] http://apt.llvm.org/mantic/ llvm-toolchain-mantic-18 main
deb-src http://apt.llvm.org/mantic/ llvm-toolchain-mantic-18 main

@rmalmain
Copy link

I also met the same issue with Ubuntu 22 on the x86_64 architecture.

@phelter
Copy link

phelter commented Jul 18, 2024

I see the same thing for noble Ubuntu 24.04

libllvm18 : Breaks: llvm-18-dev (< 1:18.1.8-4) but 1:18.1.8~++20240717045016+3b5b5c1ec4a3-1exp120240717165119.89 is to be installed

@ldemailly
Copy link

24h later still getting:

$ sudo apt-get update
Hit:1 https://apt.llvm.org/jammy llvm-toolchain-jammy-18 InRelease                                                                                          
[...]
Fetched 2,235 kB in 1s (1,574 kB/s)                       
Reading package lists... Done

$ sudo apt-get install clang-18 libclang-18-dev lld-18 llvm-18-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libllvm18 : Breaks: llvm-18-dev (< 1:18.1.8-4) but 1:18.1.8~++20240717051017+3b5b5c1ec4a3-1~exp1~20240717171122.141 is to be installed
E: Unable to correct problems, you have held broken packages.

halp?

@ldemailly
Copy link

Working now! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants