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

Bug 869164

Summary: media-libs/mesa: compilation error with sys-devel/llvm:15
Product: Gentoo Linux Reporter: Oleksa <leo>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED INVALID    
Severity: normal CC: leo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Failed to emerge - log file
Emerge --info output

Description Oleksa 2022-09-08 10:17:59 UTC
Compilation error for media-libs/mesa 22.1.7 occur after version bump up to sys-devel/llvm 15.0.0 
In case to set USE='-llvm' for media-libs/mesa --> compilation going smooth without any error
It is occur for use both - GCC and CLANG compilers.

Reproducible: Always
Comment 1 Stephan Hartmann (RETIRED) gentoo-dev 2022-09-08 10:41:06 UTC
Please attach full build.log and paste emerge --info. Afterwards, re-open.
Comment 2 Oleksa 2022-09-08 11:02:33 UTC
Created attachment 803902 [details]
Failed to emerge - log file
Comment 3 Oleksa 2022-09-08 11:02:58 UTC
Created attachment 803905 [details]
Emerge --info output
Comment 4 Stephan Hartmann (RETIRED) gentoo-dev 2022-09-08 16:35:40 UTC
I wonder how you enable llvm:15 when MAX_LLVM_SLOT="14".
Comment 5 Oleksa 2022-09-08 18:02:48 UTC
(In reply to Stephan Hartmann from comment #4)
> I wonder how you enable llvm:15 when MAX_LLVM_SLOT="14".

Mr. Hartmann, I did next trick:

1) I installed LLVM:15 in typical location as /usr/lib/llvm/15/
2) Then I renamed existiong LLVM:14 to /usr/lib/llvm/_14_/
3) Added in CFLAGS and CXXFLAGS -L/usr/lib/llvm/15/lib64 -L/usr/lib/llvm/15/lib
4) And finally: emerge -av llvm:15
Comment 6 Oleksa 2022-09-08 18:23:08 UTC
Hrm, why this marked as INVALID?

I changed case:

A) Installed LLVM:15 in typical location as /usr/lib/llvm/15/

1) Then I have created local repo in /var/db/repos/leorepo/media-libs/mesa
2) copied file mesa-22.1.7.ebuild
3) edited it up to next:

LLVM_MAX_SLOT="15"
LLVM_DEPSTR="
    || (
        sys-devel/llvm:15[${MULTILIB_USEDEP}]
        sys-devel/llvm:14[${MULTILIB_USEDEP}]
    )
    <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
"

4) Created manifest: ebuild mesa-22.1.7.ebuild manifest
5) Ran >emerge -av media-libs/mesa

As result I got totally the same error! Please, see in logs attached

6) Ran >USE='-llvm' emerge -av media-libs/mesa

As result I got smooth compilation and working mesa package.

Please, investigate this bug. Thank You!
Comment 7 Matt Turner gentoo-dev 2022-09-09 00:53:26 UTC
There's a reason the mesa ebuild doesn't claim support for llvm-15. See if you can guess why :)