Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904140 - sys-libs/libomp should be slotted per LLVM versions
Summary: sys-libs/libomp should be slotted per LLVM versions
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-10 18:47 UTC by Adrien Dessemond
Modified: 2024-03-18 21:18 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Dessemond 2023-04-10 18:47:15 UTC
For some (historical?) reasons, sys-libs/libomp only supports the latest available LLVM. If we have multiple LLVM instances, it is not possible to have specific versions of libomp bound to their corresponding LLVM counterpart.

This causes headaches especially when dealing with AMD/ROCm stuff. At date of writing, LLVM 16 is available while AMD/ROCm only supports LLVM 15 (see various ebuild). Thus, when enabling GPU offloading with sys-libs/libomp, the various files are compiled with Clang/LLVM16 which leads to protests:

/usr/lib/llvm/15/bin/clang++ --rocm-device-lib-path=/usr/lib/amdgcn/bitcode --libomptarget-amdgpu-bc-path="/usr/lib64" -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -x c openmp_offload.c
fatal error: cannot open file '/usr/lib64/libomptarget-amdgpu-gfx1031.bc': Unknown attribute kind (86) (Producer: 'LLVM16.0.1' Reader: 'LLVM 15.0.7')

Various other ebuilds related to LLVM/Clang are slotted but not this one.
Comment 1 Larry the Git Cow gentoo-dev 2024-03-16 17:08:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2836fd63ef7c7b8756883bffd58e06392653f65d

commit 2836fd63ef7c7b8756883bffd58e06392653f65d
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-03-16 16:52:50 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-03-16 17:08:51 +0000

    sys-libs/libomp: Add slotted versions
    
    Closes: https://bugs.gentoo.org/904140
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-libs/libomp/libomp-15.0.7-r7.ebuild            | 135 +++++++++++++++++
 sys-libs/libomp/libomp-16.0.6-r1.ebuild            | 153 +++++++++++++++++++
 sys-libs/libomp/libomp-17.0.6-r1.ebuild            | 153 +++++++++++++++++++
 sys-libs/libomp/libomp-18.1.0-r1.ebuild            | 163 +++++++++++++++++++++
 sys-libs/libomp/libomp-19.0.0.9999.ebuild          |   4 +-
 .../libomp/libomp-19.0.0_pre20240316-r1.ebuild     | 162 ++++++++++++++++++++
 6 files changed, 769 insertions(+), 1 deletion(-)
Comment 2 cyrillic 2024-03-17 19:02:14 UTC
I tried this, upgrading from slot0 to slot18 followed by a toolchain rebuild, then a world rebuild.
Every package that uses tc-check-openmp in pkg_pretend() fails to find it, and if I remove the check from the ebuild, openmp is not found during src_configure().

Am I missing something ?
Comment 3 Manuel Nickschas 2024-03-18 09:50:21 UTC
I'm seeing the same issue - openmp support is no longer found after this change... with Clang/libc++ as system compiler, that is.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-18 09:50:44 UTC
Please file a new bug and/or let's discuss it on #gentoo-llvm then.
Comment 5 Manuel Nickschas 2024-03-18 16:15:00 UTC
https://bugs.gentoo.org/927249
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-18 16:56:11 UTC
Reverting.