llvm / llvm/llvm-project

Latest versions of Ubuntu packages cause hard to fix conflicts (1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56)

Open
#167,538 14 comments 0 reactions 0 assignees View on GitHub
packaging platform:linux
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

This is the error I am getting:

```
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
libc++1-21 libc++abi1-21
The following NEW packages will be installed:
libc++1 libc++abi1
The following packages will be upgraded:
clang-21 clang-format-21 clang-tidy-21 clang-tools-21 clangd-21 libc++-21-dev libc++abi-21-dev libclang-common-21-dev libclang-cpp21 libclang-rt-21-dev libclang1-21 libllvm21 lld-21 llvm-21 llvm-21-linker-tools
llvm-21-runtime
16 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
Need to get 99.7 MB of archives.
After this operation, 709 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libc++-21-dev amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [1567 kB]
Get:2 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libc++abi-21-dev amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [146 kB]
Get:3 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libc++abi1 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [120 kB]
Get:4 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libc++1 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [368 kB]
Get:5 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 lld-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [1578 kB]
Get:6 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 clang-tidy-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [2127 kB]
Get:7 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 clang-tools-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [9605 kB]
Get:8 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 clang-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [176 kB]
Get:9 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 clangd-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [3591 kB]
Get:10 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libclang-common-21-dev amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [801 kB]
Get:11 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 clang-format-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [104 kB]
Get:12 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libclang-cpp21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [13.9 MB]
Get:13 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libllvm21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [30.9 MB]
Get:14 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libclang1-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [8239 kB]
Get:15 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 llvm-21 amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [20.1 MB]
Get:16 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 llvm-21-runtime amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [611 kB]
Get:17 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 llvm-21-linker-tools amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [1384 kB]
Get:18 https://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 libclang-rt-21-dev amd64 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 [4304 kB]
Fetched 99.7 MB in 15s (6500 kB/s)
(Reading database ... 105254 files and directories currently installed.)
Preparing to unpack .../libc++-21-dev_1%3a21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56_amd64.deb ...
Unpacking libc++-21-dev (1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56) over (1:21.1.5~++20251023083335+45afac62e373-1~exp1~20251023083454.54) ...
dpkg: error processing archive /var/cache/apt/archives/libc++-21-dev_1%3a21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56_amd64.deb (--unpack):
trying to overwrite '/usr/lib/llvm-21/lib/libc++.so.1', which is also in package libc++1-21 1:21.1.5~++20251023083335+45afac62e373-1~exp1~20251023083454.54
Preparing to unpack .../libc++abi-21-dev_1%3a21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56_amd64.deb ...
Unpacking libc++abi-21-dev (1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56) over (1:21.1.5~++20251023083335+45afac62e373-1~exp1~20251023083454.54) ...
dpkg: error processing archive /var/cache/apt/archives/libc++abi-21-dev_1%3a21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56_amd64.deb (--unpack):
trying to overwrite '/usr/lib/llvm-21/lib/libc++abi.so.1', which is also in package libc++abi1-21 1:21.1.5~++20251023083335+45afac62e373-1~exp1~20251023083454.54
Errors were encountered while processing:
/var/cache/apt/archives/libc++-21-dev_1%3a21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56_amd64.deb
/var/cache/apt/archives/libc++abi-21-dev_1%3a21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

I was trying to report this via salsa.debian.org, but unfortunately it's going to take some time to get approved (if at all).

Perhaps also of interest:

```
$ apt policy libc++1 libc++abi1
libc++1:
Installed: (none)
Candidate: 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56
Version table:
1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 900
900 http://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 Packages
1:20.1.8~++20250804090239+87f0227cb601-1~exp1~20250804210352.139 900
900 http://apt.llvm.org/noble llvm-toolchain-noble-20/main amd64 Packages
1:18.0-59~exp2 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
libc++abi1:
Installed: (none)
Candidate: 1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56
Version table:
1:21.1.6~++20251111103412+4b2ac3f7a210-1~exp1~20251111103428.56 900
900 http://apt.llvm.org/noble llvm-toolchain-noble-21/main amd64 Packages
1:20.1.8~++20250804090239+87f0227cb601-1~exp1~20250804210352.139 900
900 http://apt.llvm.org/noble llvm-toolchain-noble-20/main amd64 Packages
1:18.0-59~exp2 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
```

FYI: @sylvestre (since you seem to be _the_ maintainer?!)

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported upgrade on Ubuntu Noble using the LLVM 21 packages and the versions shown in the error. Inspect package ownership for libc++-21-dev, libc++abi-21-dev, libc++1-21, and libc++abi1-21; done means the upgrade completes without dpkg overwrite conflicts.

Written by the indexing model from the issue text.

Assessment

Tech stack
ubuntu
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.