Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599922 - media-libs/mesa-9999[opencl] does not build against sys-devel/llvm-3.9.0-r1 because of adaption to new error API since LLVM r286752
Summary: media-libs/mesa-9999[opencl] does not build against sys-devel/llvm-3.9.0-r1 b...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-15 21:02 UTC by jospezial
Modified: 2016-11-26 09:48 UTC (History)
0 users

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 jospezial 2016-11-15 21:02:17 UTC
https://cgit.freedesktop.org/mesa/mesa/commit/?id=8e430ff8b060b4e8e922bae24b3c57837da6ea77
clover: adapt to new error API since LLVM r286752


/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp: In function ‘std::unique_ptr<llvm::Module> clover::llvm::parse_module_library(const clover::module&, llvm::LLVMContext&, std::__cxx11::string&)’:
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp:102:22: error: variable ‘llvm::Error err’ has initializer but incomplete type
    if (::llvm::Error err = mod.takeError()) {
                      ^~~
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp:102:32: error: ‘class llvm::ErrorOr<std::unique_ptr<llvm::Module> >’ has no member named ‘takeError’; did you mean ‘HasError’?
    if (::llvm::Error err = mod.takeError()) {
                                ^~~~~~~~~
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp:104:7: error: ‘handleAllErrors’ is not a member of ‘llvm’
       ::llvm::handleAllErrors(std::move(err), [&](::llvm::ErrorInfoBase &EIB) {
       ^~
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp:104:59: error: ‘llvm::ErrorInfoBase’ has not been declared
       ::llvm::handleAllErrors(std::move(err), [&](::llvm::ErrorInfoBase &EIB) {
                                                           ^~~~~~~~~~~~~
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp: In lambda function:
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp:105:20: error: request for member ‘message’ in ‘EIB’, which is of non-class type ‘int’
          msg = EIB.message();
                    ^~~~~~~
make[4]: *** [Makefile:917: llvm/codegen/libclllvm_la-bitcode.lo] Error 1
make[4]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src/gallium/state_trackers/clover'
make[3]: *** [Makefile:607: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src/gallium'
make[2]: *** [Makefile:869: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src'
make[1]: *** [Makefile:660: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src'
make: *** [Makefile:653: all-recursive] Error 1
 * ERROR: media-libs/mesa-9999::gentoo failed (compile phase):
 *   emake failed


=================================================================
                        Package Settings
=================================================================

sys-devel/llvm-3.9.0-r1::gentoo was built with the following:
USE="clang libffi ncurses python sanitize static-analyzer xml -debug -default-compiler-rt -default-libcxx -doc -gold -libedit (-lldb) -multitarget -ocaml -test" ABI_X86="32 64 -x32" LLVM_TARX X86 -AArch64 -ARM -Hexagon -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore" PYTHON_TARGETS="python2_7"
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2016-11-19 17:12:09 UTC
We will not add patches to the live ebuild, please discuss this issue with upstream instead. In the meantime, build against older llvm revisions or disable the opencl USE-flag.
Comment 2 jospezial 2016-11-19 18:02:27 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #1)
> ... In the meantime, build against older llvm revisions or
> disable the opencl USE-flag.

An older llvm revision would not work because it needs a newer llvm revision.
Will try llvm-9999 until next llvm release.
Comment 3 jospezial 2016-11-26 09:48:42 UTC
https://cgit.freedesktop.org/mesa/mesa/commit/?id=95ddb37708ca16ccbd0f607d17a82be2de0d07b6

clover: Restore support for LLVM <= 3.9.
The commit 8e430ff8b060b4e8e922bae24b3c57837da6ea77 broke support for
LLVM 3.9 and older versions in Clover. This patch restores it and
refactors the support using Clover compatibility layer for LLVM.

v2: merged #ifdef blocks
v3: added support for LLVM 3.6-3.8
v4: add missing #ifdef around <memory>
v5: simplify using templates and lambda