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

https://apt.llvm.org/llvm.sh 18 no longer installs llvm-18 #101201

Closed
colesbury opened this issue Jul 30, 2024 · 13 comments
Closed

https://apt.llvm.org/llvm.sh 18 no longer installs llvm-18 #101201

colesbury opened this issue Jul 30, 2024 · 13 comments

Comments

@colesbury
Copy link

colesbury commented Jul 30, 2024

Until a few hours ago (July 30, 2024 15:54  UTC) the following invocation installed the llvm-18 package:

wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18

The missing package means that llvm-symbolizer is missing, which can lead to breakages when using sanitizers. For example, CPython has a thread sanitizer CI that suddenly broke because the suppressions file (and stack traces) no longer work.

For context, the same problem (missing llvm-symbolizer) happened around July 17 and seemed to be resolved around July 22. See also:

Note that ./llvm.sh 17 seems to continue to install llvm-symbolizer.

On Ubuntu 22.04 (Jammy):

Before

...
+ apt-get install -y clang-18 lldb-18 lld-18 clangd-18
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libabsl20210324 libclang-common-18-dev libclang-cpp18 libclang-rt-18-dev
  libclang1-18 libgrpc++1 libgrpc10 liblldb-18 libllvm18 libprotobuf23 llvm-18
  llvm-18-dev llvm-18-linker-tools llvm-18-runtime llvm-18-tools
  python3-lldb-18
Suggested packages:
  clang-18-doc wasi-libc llvm-18-doc

After:

...
+ apt-get install -y clang-18 lldb-18 lld-18 clangd-18
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libabsl20210324 libclang-common-18-dev libclang-cpp18 libclang-rt-18-dev
  libclang1-18 libgrpc++1 libgrpc10 liblldb-18 libllvm18 libprotobuf23
  llvm-18-linker-tools python3-lldb-18
Suggested packages:
  clang-18-doc wasi-libc
Recommended packages:
  llvm-18-dev

EDIT: llvm-18-dev -> llvm-18. The llvm-18 package is also no longer installed, which seems more relevant.

@colesbury colesbury changed the title https://apt.llvm.org/llvm.sh 18 no longer installs llvm-18-dev https://apt.llvm.org/llvm.sh 18 no longer installs llvm-18 Jul 30, 2024
@0xE1E10
Copy link

0xE1E10 commented Jul 30, 2024

I don't see anything wrong in llvm.sh. llvm-18 is not installed because it's a dep of llvm-18-dev and llvm-18-dev failed to install:

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~++20240730104741) but 1:18.1.8~++20240730092223+3b5b5c1ec4a3-1~exp1~20240730092238.143 is to be installed
E: Unable to correct problems, you have held broken packages.

I don't understand why the condition fails to be honest. Compare versions says it's valid:

❯ if dpkg --compare-versions '1:18.1.8~++20240730092223+3b5b5c1ec4a3-1~exp1~20240730092238.143' '<' '1:18.1.8~++20240730104741'; then echo great; fi
dpkg: warning: --compare-versions used with obsolete relation operator '<'
great

But apt insist it's not:

❯ sudo apt-get -s -o Debug::pkgProblemResolver=yes install llvm-18-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) libllvm18:amd64 < 1:18.1.8~++20240730092223+3b5b5c1ec4a3-1~exp1~20240730092238.143 @ii pmK Ib >
Broken libllvm18:amd64 Breaks on llvm-18-dev:amd64 < none -> 1:18.1.8~++20240730092223+3b5b5c1ec4a3-1~exp1~20240730092238.143 @un pumN > (< 1:18.1.8~++20240730104741)
  Considering llvm-18-dev:amd64 10002 as a solution to libllvm18:amd64 35
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~++20240730104741) but 1:18.1.8~++20240730092223+3b5b5c1ec4a3-1~exp1~20240730092238.143 is to be installed
E: Unable to correct problems, you have held broken packages.

@ian-collins-ctct
Copy link

It fails in a simple docker test case, Dockerfile:

FROM ubuntu:22.04
LABEL owner=build

# NOTE: Keep the package lines sorted when adding lines.
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get --yes install \
    lsb-release \
    gnupg \
    software-properties-common \
    wget \
    && rm -rf /var/lib/apt/lists/*

ARG CLANG_VERSION
ENV CLANG_VERSION=$CLANG_VERSION

# Official LLVM repo to get a later version of clang than is available in focal.
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh \
    && ./llvm.sh "$CLANG_VERSION" all \
    && rm -rf ./llvm.sh /var/lib/apt/lists/*

Error:

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

@PatrickKa
Copy link

I ran into the same, or at least a very similar, problem yesterday. My GitHub Actions workflow suddenly broke because installing LLVM 18 on the ubuntu-22.04 runners stopped working due to the same error.

The following packages have unmet dependencies:
   libllvm18 : Breaks: llvm-18-dev (< 1:18.1.8~++20240730104741) but 1:18.1.8~++20240730092223+3b5b5c1ec4a3-1~exp1~20240730092238.143 is to be installed

I kinda hoped someone will fix the problem overnight, but unfortunately that didn't happen 😅. Any help or workarounds?

@ian-collins-ctct
Copy link

In my case, I used a local copy and updated the $PKG= line to install the bits I wanted rather than passing "all".

PKG="clang-$LLVM_VERSION clang-tidy-$LLVM_VERSION lld-$LLVM_VERSION llvm-$LLVM_VERSION"

A less than ideal hack to get me unstuck!

@sylvestre
Copy link
Collaborator

I will fix that later today.

@PatrickKa
Copy link

Thx. In the meantime, I upgraded to ubuntu-24.04 runners which already comes with LLVM 18 preinstalled, so that "solved" the problem for me.

@sylvestre
Copy link
Collaborator

it is fixed for jammy. Other distro will follow (the CI is very busy with 18, 19 and 20)
Sorry about this

CheckmkCI pushed a commit to Checkmk/checkmk that referenced this issue Aug 1, 2024
As per llvm/llvm-project#101201 (comment)
This reverts commit dbff0be.

Change-Id: Iad876f3fba7fdb4b2d60908c4728c5c8f1124ca9
@CarlJi
Copy link

CarlJi commented Aug 1, 2024

I wonder, how long will it take to come into effect? Currently, I am still facing this issue.

The following packages have unmet dependencies:
 llvm-18-dev : Depends: llvm-18 (= 1:18.1.8~++20240730092202+3b5b5c1ec4a3-1~exp1~20240730092217.142) but it is not going to be installed
               Depends: libllvm18 (= 1:18.1.8~++20240730092202+3b5b5c1ec4a3-1~exp1~20240730092217.142) but it is not going to be installed
               Depends: libclang-cpp18 (= 1:18.1.8~++20240730092202+3b5b5c1ec4a3-1~exp1~20240730092217.142) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

@sylvestre
Copy link
Collaborator

@CarlJi with which distro?

@OmriSteiner
Copy link

@CarlJi with which distro?

I'm not @CarlJi but I'm still running into this in Debian Bookworm:

2.451 The following packages have unmet dependencies:
2.480  libllvm18 : Breaks: llvm-18-dev (< 1:18.1.8~++20240730104741) but 1:18.1.8~++20240730092011+3b5b5c1ec4a3-1~exp1~20240730092105.144 is to be installed

@CarlJi
Copy link

CarlJi commented Aug 1, 2024

@CarlJi with which distro?

Ubuntu 20.04.5 LTS

@sylvestre
Copy link
Collaborator

Some builds are still running

@sylvestre
Copy link
Collaborator

I think it is fixed everywhere, please let me if it isn't the case

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