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
Created attachment 655186 [details] build.log
Created attachment 655188 [details] libraw success with libomp +hwloc
I think there's a decent chance this is actually bug 816831.
I'll do a quick test with default libomp flags while passing along -lm and try to recompile the offending package.
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.
I'm just waiting for upstream confirmation. If it doesn't arrive soon, I'll backport it anyway.
This is in at least 14.0.6 in Gentoo.