Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603454 - dev-libs/libclc should USE VIDEO_CARDS and DEPEND upon LLVM_TARGETS
Summary: dev-libs/libclc should USE VIDEO_CARDS and DEPEND upon LLVM_TARGETS
Status: RESOLVED FIXED
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-12-22 11:21 UTC by Steven Newbury
Modified: 2018-08-19 22:14 UTC (History)
4 users (show)

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


Attachments
ebuild patch implementing missing freatures (libclc-0.2.0_pre20160921.diff,1.83 KB, patch)
2016-12-22 13:45 UTC, Steven Newbury
Details | Diff
ebuild patch implementing missing freatures (libclc-0.2.0_pre20160921.diff,1.64 KB, patch)
2016-12-22 13:58 UTC, Steven Newbury
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Newbury 2016-12-22 11:21:14 UTC
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.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-12-22 12:54:06 UTC
The patch didn't follow! Nevertheless, it's much appreciated ;-).
Comment 2 Steven Newbury 2016-12-22 13:45:49 UTC
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.
Comment 3 Steven Newbury 2016-12-22 13:49:04 UTC
(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! :-)
Comment 4 Steven Newbury 2016-12-22 13:58:24 UTC
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.
Comment 5 Steven Newbury 2016-12-22 14:01:05 UTC
Should that be VIDEO_CARDS=nouveau as well as, or instead of VIDEO_CARDS=nvidia?
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-12-22 14:54:15 UTC
(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?
Comment 7 Steven Newbury 2016-12-22 15:42:15 UTC
(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.
Comment 8 Steven Newbury 2016-12-22 15:44:12 UTC
LLVM-CC calls clang anyway for the other targets so it's always a dependency, even if indirectly.
Comment 9 Jan Vesely 2018-06-13 13:06:48 UTC
(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.
Comment 10 Larry the Git Cow gentoo-dev 2018-06-14 14:32:22 UTC
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(-)
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2018-06-14 21:55:36 UTC
mesa clover which uses libclc can be used as software opengl implementation, so forcing any VIDEO_CARDS to be enabled seems wrong to me.
Comment 12 Chí-Thanh Christopher Nguyễn gentoo-dev 2018-06-14 21:56:27 UTC
> software opengl implementation

s/opengl/opencl/
Comment 13 Matt Turner gentoo-dev 2018-06-14 22:03:13 UTC
(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.
Comment 14 Jan Vesely 2018-06-15 01:31:17 UTC
(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.
Comment 15 Matt Turner gentoo-dev 2018-08-19 22:14:05 UTC
We're using VIDEO_CARDS now, and Jan cannot reproduce the reported problem about missing llvm support. Resolving.