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
Created attachment 411004 [details, diff] Patch from upstream, fixes the problem. Patch taken from upstream Git repo works.
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.
*** Bug 559914 has been marked as a duplicate of this bug. ***
Is this due to hit the Portage tree soon? Current libclc will not compile for me without downgrading other packages.
*** Bug 562234 has been marked as a duplicate of this bug. ***
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.
What is holding up this patch?
fixed in libclc-0.2.0_pre20151006
(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.