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

Bug 637638

Summary: media-libs/mesa-17.1.* gallium driver does not build with llvm 5
Product: Gentoo Linux Reporter: Carlo <gentoo-bugs>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED WONTFIX    
Severity: normal CC: alonbl, ap, filmor, gentoo3, maekke, tsmksubc, yamadharma
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: llvm 5 compatibility patch

Description Carlo 2017-11-15 22:07:16 UTC
Created attachment 504464 [details, diff]
llvm 5 compatibility patch

Build failure:

/var/tmp/portage/media-libs/mesa-17.1.10/work/mesa-17.1.10/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp: In member function ‘virtual void DelegatingJITMemoryManager::deregisterEHFrames(uint8_t*, uint64_t, size_t)’:
/var/tmp/portage/media-libs/mesa-17.1.10/work/mesa-17.1.10/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:346:56: error: no matching function for call to ‘llvm::RTDyldMemoryManager::deregisterEHFrames(uint8_t*&, uint64_t&, size_t&)’
          mgr()->deregisterEHFrames(Addr, LoadAddr, Size);


The attached patch fixes the issue.
Comment 1 Norman Back 2017-11-18 11:24:21 UTC
Patch worked for me but I also had to turn off opencl USE flag.
Comment 2 Matt Turner gentoo-dev 2017-11-19 18:03:03 UTC
By upstream policy, 17.1 does not support LLVM 5.

The patch you attached was committed upstream as commit 0c67aa84568d4676017d0d309e5ba8832d3b9e1e and is in the 17.2 branch.

Please use 17.2 if you want to use LLVM 5.
Comment 3 Carlo 2017-11-19 20:54:11 UTC
While I can understand the decision, shouldn't the llvm dependency entry reflect this then - e.g. <sys-devel/llvm-5 for the mesa ebuilds below 17.2?!
Comment 4 Matt Turner gentoo-dev 2017-11-19 22:44:03 UTC
(In reply to Carlo from comment #3)
> While I can understand the decision, shouldn't the llvm dependency entry
> reflect this then - e.g. <sys-devel/llvm-5 for the mesa ebuilds below 17.2?!

That's admittedly always been a sore spot in our Mesa packaging, so the dependencies were reworked to handle this kind of case in 17.2 and newer. It was also necessary for slotting LLVM, which I personally hope will help with a lot of the LLVM dependency confusion.

Anyway, it was a big enough change that I don't think we wanted to try to do it in the 17.1 ebuilds since they were going to go stable soon (bug 629244).

I know that answer doesn't help with 17.1, but hopefully it is solved for good in 17.2.
Comment 5 Carlo 2017-11-20 20:17:02 UTC
(In reply to Matt Turner from comment #4)
> That's admittedly always been a sore spot in our Mesa packaging, so the
> dependencies were reworked to handle this kind of case in 17.2 and newer.

Obviously I didn't notice that. Thanks for your reply, Matt.
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2017-12-08 15:27:55 UTC
If there is a known issue why don't we explicit use the llvm at slot 4?
Comment 7 Matt Turner gentoo-dev 2017-12-10 01:42:44 UTC
*** Bug 640222 has been marked as a duplicate of this bug. ***