Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 737704

Summary: sys-libs/libomp with sys-devel/clang - pkg_pretend(): Your current compiler does not support OpenMP!
Product: Gentoo Linux Reporter: unhappy-ending <unhappy-ending>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Status: RESOLVED FIXED    
Severity: normal CC: dominik, herrtimson, llvm, mgorny, sam
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://github.com/llvm/llvm-project/issues/56032
https://bugs.gentoo.org/show_bug.cgi?id=816831
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
libraw success with libomp +hwloc

Description unhappy-ending 2020-08-18 05:33:53 UTC
The default USE flags for sys-devel/libomp compile without hwloc. Any programs that can use or rely on OpenMP will fail the pretend phase requirement checks when using clang. The warning provided dictates you compile and install libomp even though it's already compiled and installed. When enabling the hwloc USE flag for libomp, the pretend phase checks pass and the program compiles as normal.

Reproducible: Always

Steps to Reproduce:
1.compile libomp with default flags
2.try to compile libraw using clang
3.libraw pretend phase fails
Actual Results:  
* OpenMP support in sys-devel/clang is provided by sys-libs/libomp.
* ERROR: media-libs/libraw-0.20.0::gentoo failed (pretend phase):
*   Active compiler does not have required support for OpenMP
Comment 1 unhappy-ending 2020-08-18 05:34:49 UTC
Created attachment 655186 [details]
build.log
Comment 2 unhappy-ending 2020-08-18 05:35:21 UTC
Created attachment 655188 [details]
libraw success with libomp +hwloc
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-14 14:57:49 UTC
I think there's a decent chance this is actually bug 816831.
Comment 4 unhappy-ending 2022-06-15 03:22:07 UTC
I'll do a quick test with default libomp flags while passing along -lm and try to recompile the offending package.
Comment 5 unhappy-ending 2022-06-15 03:29:48 UTC
Ok, just compiled libomp all default USE flags, -lm passed along during link phase and tests passed. Compiled libraw with Clang, all checks and tests passed.

If the LLVM 15 patch won't be back ported perhaps an append-flags -lm could be passed to LDFLAGS in the ebuild if it isn't already.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-15 06:01:52 UTC
I'm just waiting for upstream confirmation.  If it doesn't arrive soon, I'll backport it anyway.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-26 07:32:26 UTC
This is in at least 14.0.6 in Gentoo.