Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559546 - dev-libs/libclc build error with >=sys-devel/llvm-3.7
Summary: dev-libs/libclc build error with >=sys-devel/llvm-3.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 559914 562234 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-03 17:44 UTC by Marcin Kowalski
Modified: 2015-10-21 15:18 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from upstream, fixes the problem. (libclc-llvm-3.7-compat.patch,1.36 KB, patch)
2015-09-04 18:31 UTC, Nico R.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Kowalski 2015-09-03 17:44:40 UTC
I am observing a following build error in libclc


=========================================================================================================================
/usr/bin/clang -MMD -MF nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_dec.cl.bc.d -target nvptx64--nvidiacl -I`dirname ./generic/lib/cl_khr_global_int32_base_atomics/atom_dec.cl` -I./generic/include -fno-builtin -Dcl_clang_storage_class_specifiers -Dcl_khr_fp64 -Dcles_khr_int64 -D__CLC_INTERNAL -emit-llvm -c -o nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_dec.cl.bc ./generic/lib/cl_khr_global_int32_base_atomics/atom_dec.cl
LLVM-CC nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_inc.cl.bc
/usr/bin/clang -MMD -MF nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_inc.cl.bc.d -target nvptx64--nvidiacl -I`dirname ./generic/lib/cl_khr_global_int32_base_atomics/atom_inc.cl` -I./generic/include -fno-builtin -Dcl_clang_storage_class_specifiers -Dcl_khr_fp64 -Dcles_khr_int64 -D__CLC_INTERNAL -emit-llvm -c -o nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_inc.cl.bc ./generic/lib/cl_khr_global_int32_base_atomics/atom_inc.cl
LLVM-CC nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_sub.cl.bc
/usr/bin/clang -MMD -MF nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_sub.cl.bc.d -target nvptx64--nvidiacl -I`dirname ./generic/lib/cl_khr_global_int32_base_atomics/atom_sub.cl` -I./generic/include -fno-builtin -Dcl_clang_storage_class_specifiers -Dcl_khr_fp64 -Dcles_khr_int64 -D__CLC_INTERNAL -emit-llvm -c -o nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_sub.cl.bc ./generic/lib/cl_khr_global_int32_base_atomics/atom_sub.cl


./utils/prepare-builtins.cpp:42:25: error: no viable conversion from 'ErrorOr<std::unique_ptr<Module>>' to 'ErrorOr<llvm::Module *>'
      ErrorOr<Module *> ModuleOrErr =


                        ^
/usr/include/llvm/Support/ErrorOr.h:105:3: note: candidate constructor not viable: no known conversion from 'ErrorOr<std::unique_ptr<Module> >' to 'std::error_code' for 1st argument
  ErrorOr(std::error_code EC) : HasError(true) {
  ^
/usr/include/llvm/Support/ErrorOr.h:109:3: note: candidate constructor not viable: no known conversion from 'ErrorOr<std::unique_ptr<Module> >' to 'llvm::Module *' for 1st argument
  ErrorOr(T Val) : HasError(false) {
  ^
/usr/include/llvm/Support/ErrorOr.h:113:3: note: candidate constructor not viable: no known conversion from 'ErrorOr<std::unique_ptr<Module> >' to 'const llvm::ErrorOr<llvm::Module *> &' for 1st argument
  ErrorOr(const ErrorOr &Other) {
  ^
/usr/include/llvm/Support/ErrorOr.h:133:3: note: candidate constructor not viable: no known conversion from 'ErrorOr<std::unique_ptr<Module> >' to 'llvm::ErrorOr<llvm::Module *> &&' for 1st argument
  ErrorOr(ErrorOr &&Other) {
  ^
/usr/include/llvm/Support/ErrorOr.h:98:35: note: candidate template ignored: disabled by 'enable_if' [with E = llvm::ErrorOr<std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> > >]
          typename std::enable_if<std::is_error_code_enum<E>::value ||
                                  ^
/usr/include/llvm/Support/ErrorOr.h:120:31: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> >]
      typename std::enable_if<std::is_convertible<OtherT, T>::value>::type * =
                              ^
/usr/include/llvm/Support/ErrorOr.h:140:31: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> >]
      typename std::enable_if<std::is_convertible<OtherT, T>::value>::type * =
                              ^
LLVM-CC nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_xchg.cl.bc
/usr/bin/clang -MMD -MF nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_xchg.cl.bc.d -target nvptx64--nvidiacl -I`dirname ./generic/lib/cl_khr_global_int32_base_atomics/atom_xchg.cl` -I./generic/include -fno-builtin -Dcl_clang_storage_class_specifiers -Dcl_khr_fp64 -Dcles_khr_int64 -D__CLC_INTERNAL -emit-llvm -c -o nvptx64--nvidiacl/lib/cl_khr_global_int32_base_atomics/atom_xchg.cl.bc ./generic/lib/cl_khr_global_int32_base_atomics/atom_xchg.cl
LLVM-CC nvptx64--nvidiacl/lib/cl_khr_global_int32_extended_atomics/atom_and.cl.bc
/usr/bin/clang -MMD -MF nvptx64--nvidiacl/lib/cl_khr_global_int32_extended_atomics/atom_and.cl.bc.d -target nvptx64--nvidiacl -I`dirname ./generic/lib/cl_khr_global_int32_extended_atomics/atom_and.cl` -I./generic/include -fno-builtin -Dcl_clang_storage_class_specifiers -Dcl_khr_fp64 -Dcles_khr_int64 -D__CLC_INTERNAL -emit-llvm -c -o nvptx64--nvidiacl/lib/cl_khr_global_int32_extended_atomics/atom_and.cl.bc ./generic/lib/cl_khr_global_int32_extended_atomics/atom_and.cl
Makefile:8: recipe for target 'utils/prepare-builtins.o' failed
=========================================================================================================================

reference : http://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&date=2015-06-18  suggests update of libclc ought to fix the problem
Comment 1 Nico R. 2015-09-04 18:31:15 UTC
Created attachment 411004 [details, diff]
Patch from upstream, fixes the problem.

Patch taken from upstream Git repo works.
Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2015-09-08 08:17:50 UTC
while the patch from upstream fixes the compilation problem I would guess from a first glance that the code will start leaking memory afterwards (release() called on an auto_ptr without deleting the object manually afterwards). I guess it is not a critical problem since the relevant code part is in a cli utility.
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-09-09 22:38:35 UTC
*** Bug 559914 has been marked as a duplicate of this bug. ***
Comment 4 Christohper Harrington 2015-09-29 01:33:38 UTC
Is this due to hit the Portage tree soon? Current libclc will not compile for me without downgrading other packages.
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-10-04 16:24:12 UTC
*** Bug 562234 has been marked as a duplicate of this bug. ***
Comment 6 N. Andrew Walsh 2015-10-15 16:00:40 UTC
mesa-11.0.3 with USE="opencl" seems to require this package, and is thus unable to upgrade from my current mesa-11.0.0. 

I'm wondering if this is why my X server can't load nvidia's GLX module, but that's a different inquiry. The point is, there's a patch that seems at least somewhat functional, so here's my vote as well for getting this into the tree.
Comment 7 Christohper Harrington 2015-10-15 17:11:20 UTC
What is holding up this patch?
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-10-21 01:08:38 UTC
fixed in libclc-0.2.0_pre20151006
Comment 9 Christohper Harrington 2015-10-21 15:18:37 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #8)
> fixed in libclc-0.2.0_pre20151006

Confirmed; builds and installs on my machine.