Skip to content

[BUG]: clang-format installations uninstalls libc++ packages #614

Description

@miscco

When trying to install libc++ in our llvm containers, I found that the clang-format installation process uninstalls the previously installed libc++ packages.

I hacked around this by also installing libc++1 with clang-format, but that does not give us the right libc++ version, but the distribution packaged one.

We need a way to install and keep a given version of libc++ that matches the clang version

See e.g https://github.com/rapidsai/devcontainers/actions/runs/19333538446/job/55302370681#step:7:5579

apt-get install -y clang-format-21 llvm-21-tools libc++-21-dev libc++abi-21-dev libunwind-21-dev
Reading package lists...
[2025-11-13T13:46:53.910Z] 

[2025-11-13T13:46:54.063Z] #27 4.895 Building dependency tree...
#27 5.032 Reading state information...
[2025-11-13T13:46:54.214Z] 

[2025-11-13T13:46:54.222Z] #27 5.191 The following additional packages will be installed:

[2025-11-13T13:46:54.337Z] #27 5.192   libc++1 libc++abi1 libclang-cpp21 libllvm21 llvm-libunwind1
#27 5.193 Suggested packages:
#27 5.193   clang
#27 5.215 The following packages will be REMOVED:
#27 5.216   libc++-20-dev libc++abi-20-dev libunwind libunwind-20-dev
#27 5.216 The following NEW packages will be installed:
#27 5.216   clang-format-21 libc++-21-dev libc++abi-21-dev libclang-cpp21 libllvm21
#27 5.217   libunwind-21-dev llvm-21-tools llvm-libunwind1
#27 5.217 The following packages will be upgraded:
#27 5.218   libc++1 libc++abi1
#27 5.307 2 upgraded, 8 newly installed, 4 to remove and 0 not upgraded.
#27 5.307 Need to get 47.9 MB of archives.
#27 5.307 After this operation, 199 MB of additional disk space will be used.
#27 5.307 Get:1 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libc++abi1 amd64 1:21.1.6~++20251112013458+6ca64545e1eb-1~exp1~20251112133516.60 [120 kB]

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions