Skip to content

Can't install LLVM 19 on debian using llvm.sh #108995

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

Closed
ChrisGreenaway opened this issue Sep 17, 2024 · 10 comments
Closed

Can't install LLVM 19 on debian using llvm.sh #108995

ChrisGreenaway opened this issue Sep 17, 2024 · 10 comments

Comments

@ChrisGreenaway
Copy link

Building the Dockerfile:

FROM debian:bullseye

RUN apt update && apt --yes upgrade
RUN apt install --yes curl lsb-release wget software-properties-common gnupg
RUN curl -sL https://apt.llvm.org/llvm.sh | bash -s -- 19 all

fails with the error:

7.558 The following packages have unmet dependencies:
7.596  libllvm19 : Breaks: llvm-19-dev (< 1:19.1.0~++rc3-1~exp2) but 1:19.1.0~++20240916073041+bdae3c487cbb-1~exp1~20240916193200.38 is to be installed
7.596  llvm-19-dev : Breaks: libllvm19 (< 1:19.1.0~++rc4-5) but 1:19.1.0~++20240916073041+bdae3c487cbb-1~exp1~20240916193200.38 is to be installed
7.606 E: Unable to correct problems, you have held broken packages.
@ChrisGreenaway
Copy link
Author

Also fails on debian:bookworm, although with a slightly different error.

@Zingam
Copy link
Contributor

Zingam commented Sep 17, 2024

It looks like Noble's packages haven't been updated in a while:

Noble (24.04) - Last update : Wed, 04 Sep 2024 01:50:23 UTC / Revision: 20240903081906+70f3511adaea

@vient
Copy link
Member

vient commented Sep 17, 2024

Ubuntu 20.04

$ sudo apt install llvm-19-dev
Reading package lists... Done
Building dependency tree       
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:
 llvm-19-dev : Depends: libllvm19 (= 1:19.1.0~++20240910033111+327ca6c02f0d-1~exp1~20240910153233.33) but it is not going to be installed
               Depends: llvm-19 (= 1:19.1.0~++20240910033111+327ca6c02f0d-1~exp1~20240910153233.33) but it is not going to be installed
               Depends: libclang-cpp19 (= 1:19.1.0~++20240910033111+327ca6c02f0d-1~exp1~20240910153233.33) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

~ $ sudo apt install libllvm19 llvm-19 libclang-cpp19
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libclang-cpp19 is already the newest version (1:19.1.0~++20240910033111+327ca6c02f0d-1~exp1~20240910153233.33).
libllvm19 is already the newest version (1:19.1.0~++20240910033111+327ca6c02f0d-1~exp1~20240910153233.33).
llvm-19 is already the newest version (1:19.1.0~++20240910033111+327ca6c02f0d-1~exp1~20240910153233.33).

Baffling...

Maybe something is wrong with these directives in llvm-19-dev?

Breaks: libllvm19 (<< 1:19.1.0~++rc4-5)
Replaces: libllvm19 (<< 1:19.1.0~++rc4-5)

@vient
Copy link
Member

vient commented Sep 17, 2024

Looks like the fix is already committed https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/commit/3ab346721f6f7592a5139969889c3107ca107ca7
Maybe it just takes that long to rebuild packages

@OmriSteiner
Copy link

Sound similar to #101201.
At this point I'm considering building LLVM from source

@vient
Copy link
Member

vient commented Sep 19, 2024

@sylvestre can you please trigger a (Focal) packages rebuild? I see that fixes were already committed yesterday but builds do not start automatically - source trigger is set up only on LLVM repo itself, not on your packaging repo.

@sylvestre sylvestre self-assigned this Sep 19, 2024
@sylvestre
Copy link
Collaborator

sure, builds started

@ChrisGreenaway
Copy link
Author

This seems to work fine now. Thanks

@haxung
Copy link

haxung commented Sep 21, 2024

There are similar error in Debian sid when I upgrade to libllvm19:i386 1:19.1.0-3.

$ sudo apt update && sudo apt upgrade -y
You might want to run 'apt --fix-broken install' to correct these.
Unsatisfied dependencies:
 mesa-libgallium:i386 : Depends: libllvm19:i386 (>= 1:19.1.0) but it is not installed
 mesa-vulkan-drivers:i386 : Depends: libllvm19:i386 (>= 1:19.1.0) but it is not installed
Error: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

And then, I run apt --fix-broken install:

Error: Installation has failed.
If you'd like to file a bug report please include '/var/log/nala/dpkg-debug.log'

Error: error processing archive /var/cache/apt/archives/libllvm19_1%3a19.1.0-3_i386.deb (--unpack):

Error: error processing archive /var/cache/apt/archives/libllvm19_1%3a19.1.0-3_i386.deb (--unpack):
 trying to overwrite shared '/usr/lib/llvm-19/lib/libLLVM.so.19.1', which is different from other instances of package libllvm19:i386
 trying to overwrite shared '/usr/lib/llvm-19/lib/libLLVM.so.19.1', which is different from other instances of package libllvm19:i386

Errors were encountered while processing:
 /var/cache/apt/archives/libllvm19_1%3a19.1.0-3_i386.deb

When I run ls -alh /usr/lib/llvm-19/lib:

libLLVM.so.19.1 -> ../../x86_64-linux-gnu/libLLVM.so.19.1

Looks like x86_64 and i386 have same symbolic link, and I don't know it's Debian sid bug or llvm bug.

@sylvestre
Copy link
Collaborator

@haxung this is unrelated and it will be fixed tomorrow
see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082495

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

7 participants