Summary: | dev-util/intel_clc seems to pull in several versions of clang/llvm at the same time | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Gabriele Svelto <gabriele.svelto> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arsen, sam, x11 |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/35196 https://bugs.gentoo.org/show_bug.cgi?id=924876 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 926179 | ||
Bug Blocks: |
Description
Gabriele Svelto
2024-01-29 08:05:48 UTC
I just copied what we did in media-libs/mesa. llvm@: do you see anything wrong here? seems that the same does not apply to mesa - it only depends on one llvm (at least in the docker.io/gentoo/stage3:amd64-desktop-systemd-mergedusr image): e62f946ebc17 / # emerge -cpv llvm:16 !!! You have no world file. Calculating dependencies... done! sys-devel/llvm-16.0.6 pulled in by: dev-util/intel_clc-23.3.1-r1 requires sys-devel/llvm:16 dev-util/spirv-llvm-translator-16.0.0-r1 requires sys-devel/llvm:16=, sys-devel/llvm:16/16= sys-devel/clang-16.0.6 requires ~sys-devel/llvm-16.0.6[llvm_targets_BPF], ~sys-devel/llvm-16.0.6:16/16=[-debug,abi_x86_64(-)], ~sys-devel/llvm-16.0.6[llvm_targets_SystemZ], ~sys-devel/llvm-16.0.6[llvm_targets_WebAssembly], ~sys-devel/llvm-16.0.6[llvm_targets_Lanai], ~sys-devel/llvm-16.0.6[llvm_targets_NVPTX], ~sys-devel/llvm-16.0.6[llvm_targets_ARM], ~sys-devel/llvm-16.0.6[llvm_targets_LoongArch], ~sys-devel/llvm-16.0.6[llvm_targets_AVR], ~sys-devel/llvm-16.0.6[llvm_targets_XCore], ~sys-devel/llvm-16.0.6[llvm_targets_AMDGPU], ~sys-devel/llvm-16.0.6[llvm_targets_X86], ~sys-devel/llvm-16.0.6[llvm_targets_Hexagon], ~sys-devel/llvm-16.0.6:16=[-debug,abi_x86_64(-)], ~sys-devel/llvm-16.0.6[llvm_targets_VE], ~sys-devel/llvm-16.0.6[llvm_targets_Mips], ~sys-devel/llvm-16.0.6[llvm_targets_MSP430], ~sys-devel/llvm-16.0.6[llvm_targets_AArch64], ~sys-devel/llvm-16.0.6[llvm_targets_Sparc], ~sys-devel/llvm-16.0.6[llvm_targets_RISCV], ~sys-devel/llvm-16.0.6[llvm_targets_PowerPC] sys-devel/llvm-toolchain-symlinks-16-r1 requires sys-devel/llvm:16 sys-libs/compiler-rt-16.0.6 requires sys-devel/llvm:16 sys-libs/compiler-rt-sanitizers-16.0.6 requires sys-devel/llvm:16 >>> No packages selected for removal by depclean Packages installed: 529 Packages in world: 0 Packages in system: 49 Required packages: 529 Number to remove: 0 e62f946ebc17 / # emerge -cpv llvm:17 !!! You have no world file. Calculating dependencies... done! sys-devel/llvm-17.0.6 pulled in by: dev-util/intel_clc-23.3.1-r1 requires <sys-devel/llvm-18:17/17=, <sys-devel/llvm-18:= media-libs/mesa-23.3.1 requires <sys-devel/llvm-18:=[llvm_targets_AMDGPU(+),abi_x86_64(-)], sys-devel/llvm:17[llvm_targets_AMDGPU(+),abi_x86_64(-)], <sys-devel/llvm-18:17/17=[llvm_targets_AMDGPU(+),abi_x86_64(-)] sys-devel/clang-17.0.6 requires ~sys-devel/llvm-17.0.6[llvm_targets_XCore], ~sys-devel/llvm-17.0.6[llvm_targets_RISCV], ~sys-devel/llvm-17.0.6:17=[-debug,abi_x86_64(-)], ~sys-devel/llvm-17.0.6[llvm_targets_SystemZ], ~sys-devel/llvm-17.0.6[llvm_targets_NVPTX], ~sys-devel/llvm-17.0.6[llvm_targets_Hexagon], ~sys-devel/llvm-17.0.6[llvm_targets_Sparc], ~sys-devel/llvm-17.0.6[llvm_targets_WebAssembly], ~sys-devel/llvm-17.0.6[llvm_targets_ARM], ~sys-devel/llvm-17.0.6[llvm_targets_Mips], ~sys-devel/llvm-17.0.6[llvm_targets_MSP430], ~sys-devel/llvm-17.0.6[llvm_targets_AArch64], ~sys-devel/llvm-17.0.6[llvm_targets_BPF], ~sys-devel/llvm-17.0.6[llvm_targets_Lanai], ~sys-devel/llvm-17.0.6:17/17=[-debug,abi_x86_64(-)], ~sys-devel/llvm-17.0.6[llvm_targets_AVR], ~sys-devel/llvm-17.0.6[llvm_targets_VE], ~sys-devel/llvm-17.0.6[llvm_targets_AMDGPU], ~sys-devel/llvm-17.0.6[llvm_targets_LoongArch], ~sys-devel/llvm-17.0.6[llvm_targets_X86], ~sys-devel/llvm-17.0.6[llvm_targets_PowerPC] sys-devel/llvm-toolchain-symlinks-17 requires sys-devel/llvm:17 sys-devel/llvmgold-17 requires sys-devel/llvm:17[binutils-plugin] sys-libs/compiler-rt-17.0.6 requires sys-devel/llvm:17 sys-libs/compiler-rt-sanitizers-17.0.6 requires sys-devel/llvm:17 >>> No packages selected for removal by depclean Packages installed: 529 Packages in world: 0 Packages in system: 49 Required packages: 529 Number to remove: 0 e62f946ebc17 / # well, anyway, ultimately this (seemingly) happens because the package depstring includes: <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):= <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):= these are not sufficient to constrain the generated || ( block ) to be sufficiently as in the mesa depstring, forcing only one of them to be 'useful'. the seemingly obvious solution of adding <dev-util/spirv-llvm-translator-$((LLVM_MAX_SLOT + 1)):= also won't work because portage, as if to annoy me, for some reason decides to materialize those three deps as: <sys-devel/clang-18:17/17= <sys-devel/llvm-18:17/17= <dev-util/spirv-llvm-translator-18:16/16= (which is sufficient proof that it can do so in the general case) in general, the llvm.eclass model of depending on LLVM via pulling in *either* clang or llvm fixes this issue, but, obviously, that is not scalable when we need to pull two things that depend on llvm (in this instance s-l-t and clang) maybe an LLVM_TARGETS is in order? :^) jokes aside, I'm not quite sure if I'm right in my analysis or fix attempt, but this seems to be the mechanism exploited in mesa, and a reason for it failing in intel_clc The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe756615c56e52511bdd35c8247a59ecfc1f5f79 commit fe756615c56e52511bdd35c8247a59ecfc1f5f79 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2024-02-05 19:30:02 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2024-02-10 10:47:24 +0000 dev-util/intel_clc: Migrate to llvm-r1 Closes: https://bugs.gentoo.org/923228 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-util/intel_clc/intel_clc-24.0.0.ebuild | 48 ++++++------------------------ dev-util/intel_clc/intel_clc-9999.ebuild | 48 ++++++------------------------ 2 files changed, 18 insertions(+), 78 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5618de75aec49009489efb560a89e014fd060524 commit 5618de75aec49009489efb560a89e014fd060524 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2024-02-05 19:29:36 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2024-02-10 10:47:23 +0000 llvm-r1.eclass: Initial version Bug: https://bugs.gentoo.org/923228 Bug: https://bugs.gentoo.org/880671 Closes: https://bugs.gentoo.org/821955 Closes: https://bugs.gentoo.org/919150 Signed-off-by: Michał Górny <mgorny@gentoo.org> eclass/llvm-r1.eclass | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ eclass/tests/llvm-r1.sh | 151 +++++++++++++++++++++++++++++ 2 files changed, 401 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13236593cbd00ae106ac27544010f302d98dc115 commit 13236593cbd00ae106ac27544010f302d98dc115 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-03-05 05:01:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-05 05:04:57 +0000 dev-util/intel_clc: backport llvm-r1 to 23.x Bug: https://bugs.gentoo.org/923228 Closes: https://bugs.gentoo.org/924876 Signed-off-by: Sam James <sam@gentoo.org> dev-util/intel_clc/intel_clc-23.3.6-r1.ebuild | 86 +++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) |