#1123994 libclc-21 and libclc-19 cannot be coinstalled, and libclc-21 causes mesa-opencl-icd to be uninstalled

#1123994#5
Date:
2025-12-25 20:29:59 UTC
From:
To:
Dear Maintainer,

I know this is probably rather hard to solve, but unfortunately
installing libclc-21 (i.e. to manually build custom mesa build from git
repos, with llvm 21 and libclc-21), causes minor issues.

Installing libclc-21 makes libclc-19 and in effect also mesa-opencl-icd
to be uninstalled.

Trying to install it back causes removal of libclc-21:


user@debian:~$ sudo apt install mesa-opencl-icd -V
Installing:
   mesa-opencl-icd (25.2.8-2+b3)

Installing dependencies:
   libclc-19 (1:19.1.7-19)
   libclc-19-dev (1:19.1.7-19)

REMOVING:
   libclc-21 (1:21.1.8-1)
   libclc-21-dev (1:21.1.8-1)


This is because

Package: mesa-opencl-icd
Version: 25.2.8-2+b3
Depends: libclc-19, ocl-icd-libopencl1 | libopencl1, libc6 (>= 2.38), libclang-cpp19 (>= 1:19.1.7), libdrm-amdgpu1 (>= 2.4.125-1), libdrm2 (>= 2.4.125-1), libelf1t64 (>= 0.142), libexpat1 (>= 2.0.1), libgcc-s1 (>= 4.2), libllvm19 (>= 1:19.1.0), libllvmspirvlib19.1, libstdc++6 (>= 11), libzstd1 (>= 1.5.5), zlib1g (>= 1:1.1.4)



Package: libclc-19
Version: 1:19.1.7-19
Provides: libclc-x.y
Depends: libclc-19-dev (= 1:19.1.7-19), libclang-common-19-dev
Conflicts: libclc-x.y
Breaks: libclc-amdgcn, libclc-ptx, libclc-r600
Replaces: libclc-amdgcn, libclc-ptx, libclc-r600, libclc-x.y


Package: libclc-21
Version: 1:21.1.8-1
Provides: libclc-x.y
Depends: libclc-21-dev (= 1:21.1.8-1), libclang-common-21-dev
Conflicts: libclc-x.y
Breaks: libclc-amdgcn, libclc-ptx, libclc-r600
Replaces: libclc-amdgcn, libclc-ptx, libclc-r600, libclc-x.y



Maybe mesa-opencl-icd could depend on some virtual package with version
constrain, and libclc-21 and libclc-19 do Provides for it?

Depends: libclc-x.y (>= 1:19.1.7)

Or (harder), allow true coinstallation, in separate directories,
and make library loading the files understand the locations.

Another option is to put files in separate dirs, and provide a default
one using symlink managed by alternaties.

Just some ideas.

PS. I use my mesa build script hosted on https://gist.github.com/baryluk/1041204eff4cc4fad6f1508afe67b562
(llvm version will be auto-detected, with llvm and libclc 21 used currently
on Debian testing and unstable, but can also be forced i.e. `--llvm=22`).