Currently dev-libs/libclc just tries to build all supported targets, this breaks if llvm hasn't been built with the appropriate LLVM_TARGETS: NVPTX, AMDGPU Following ebuild patch addresses this.
The patch didn't follow! Nevertheless, it's much appreciated ;-).
Created attachment 457108 [details, diff] ebuild patch implementing missing freatures Along with fixing up the DEPENDS and USE flags, this patch also adds a "clang" USE flag to allow the use of default CXX compiler in place of Clang++. For some unknown reason clang++-3.9.0 isn't working for me to build libclc while g++ is, so I included that modification too.
(In reply to Michał Górny from comment #1) > The patch didn't follow! Nevertheless, it's much appreciated ;-). I'm doing too many things at once! Got distracted trying to get Chromium/Wayland to build. Apologies! :-)
Created attachment 457114 [details, diff] ebuild patch implementing missing freatures Accidentally left in change adding pypy to allowed python. Drop it since it isn't actually working on one of my systems.
Should that be VIDEO_CARDS=nouveau as well as, or instead of VIDEO_CARDS=nvidia?
(In reply to Steven Newbury from comment #5) > Should that be VIDEO_CARDS=nouveau as well as, or instead of > VIDEO_CARDS=nvidia? I would guess so. VIDEO_CARDS are a mess, and as far as I'm concerned, you could just use LLVM_TARGETS that are at least free of ambiguity. But x11@ wouldn't be happy about that, so don't do that ;-P. What's the deal with USE=clang? Is there a case for building with another compiler?
(In reply to Michał Górny from comment #6) > (In reply to Steven Newbury from comment #5) > > Should that be VIDEO_CARDS=nouveau as well as, or instead of > > VIDEO_CARDS=nvidia? > > I would guess so. VIDEO_CARDS are a mess, and as far as I'm concerned, you > could just use LLVM_TARGETS that are at least free of ambiguity. But x11@ > wouldn't be happy about that, so don't do that ;-P. > > What's the deal with USE=clang? Is there a case for building with another > compiler? Yeah, as I mentioned on one of my systems it's failing with clang++, but works with g++. No idea why, exact same version on another system seems to work. If it works for you with clang, feel free to drop it, it's probably just something weird with my system.
LLVM-CC calls clang anyway for the other targets so it's always a dependency, even if indirectly.
(In reply to Steven Newbury from comment #0) > Currently dev-libs/libclc just tries to build all supported targets, this > breaks if llvm hasn't been built with the appropriate LLVM_TARGETS: NVPTX, > AMDGPU > > Following ebuild patch addresses this. Can you describe the build failure? I was able to successfully build nvptx-- library without having nvptx target enabled in llvm.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f60fa1adf7f70561409f47dc241519b3e8b22fd4 commit f60fa1adf7f70561409f47dc241519b3e8b22fd4 Author: Jan Vesely <jano.vesely@gmail.com> AuthorDate: 2018-06-10 19:02:48 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-06-14 14:32:12 +0000 dev-libs/libclc: Make use of VIDEO_CARDS use flags Drop runtime depend on clang. Closes: https://bugs.gentoo.org/603454 dev-libs/libclc/libclc-0.2.0_pre20180610.ebuild | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
mesa clover which uses libclc can be used as software opengl implementation, so forcing any VIDEO_CARDS to be enabled seems wrong to me.
> software opengl implementation s/opengl/opencl/
(In reply to Chí-Thanh Christopher Nguyễn from comment #11) > mesa clover which uses libclc can be used as software opengl implementation, > so forcing any VIDEO_CARDS to be enabled seems wrong to me. It can? That doesn't seem very useful. Hard to imagine why we would want to support that.
(In reply to Chí-Thanh Christopher Nguyễn from comment #11) > mesa clover which uses libclc can be used as software opengl implementation, > so forcing any VIDEO_CARDS to be enabled seems wrong to me. There is no sw opencl implementation in clover (at least not upstream). Even if there was it wouldn't be able to use current libclc, because libclc only supports amdgcn, r600, and nvptx targets. Extending both clover and libclc to support CPU targets shouldn't be too difficult, but afaik there is no one actively working on it.
We're using VIDEO_CARDS now, and Jan cannot reproduce the reported problem about missing llvm support. Resolving.