Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892371 - dev-libs/rocm-opencl-runtime: test failed: LLVM ERROR: Cannot select: 0x55b639fd5358: i64 = FrameIndex<0>
Summary: dev-libs/rocm-opencl-runtime: test failed: LLVM ERROR: Cannot select: 0x55b63...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-01-28 09:37 UTC by Yiyang Wu
Modified: 2023-02-02 12:58 UTC (History)
1 user (show)

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


Attachments
build.log (build.log.gz,21.84 KB, application/gzip)
2023-01-28 09:37 UTC, Yiyang Wu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yiyang Wu 2023-01-28 09:37:53 UTC
Created attachment 849341 [details]
build.log

dev-libs/rocm-opencl-runtime is suffering similar issue with https://bugs.gentoo.org/890377

When testing, AMDGPU opencl kernels are compiled with `-fstack-protector-strong` defined at /etc/clang/gentoo-hardened.cfg, which is not supported by ROCm and causes this issue.
Comment 1 Nick 2023-02-02 12:14:33 UTC
This also causes media-gfx/darktable to stop working with OpenCL.
Hacking /etc/clang/gentoo-hardened.cfg solves the issue. No idea why hardened config affects my system, 
  [5]   default/linux/amd64/17.1/desktop (stable) *
but it's how it is. I suppose there'll be more apps affected, so please fix it properly. Thanks!
Comment 2 Yiyang Wu 2023-02-02 12:27:02 UTC
(In reply to Nick from comment #1)
> This also causes media-gfx/darktable to stop working with OpenCL.
> Hacking /etc/clang/gentoo-hardened.cfg solves the issue. No idea why
> hardened config affects my system, 

ROCm use clang to compile GPU kernels for AMD GPUs including opencl, and it does not fully support `-fstack-protector` [1]

[1] https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
Comment 3 Larry the Git Cow gentoo-dev 2023-02-02 12:54:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae32bce0b823140512aaf748572216e4e91e98b1

commit ae32bce0b823140512aaf748572216e4e91e98b1
Author:     Yiyang Wu <xgreenlandforwyy@gmail.com>
AuthorDate: 2023-01-28 09:31:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-02 12:53:04 +0000

    dev-libs/rocm-comgr: append -fno-stack-protector at runtime
    
    Closes: https://bugs.gentoo.org/892371
    Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/29291
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/rocm-comgr-5.3.3-fno-stack-protecter.patch       | 14 ++++++++++++++
 ...cm-comgr-5.1.3-r2.ebuild => rocm-comgr-5.1.3-r3.ebuild} |  1 +
 dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild             |  1 +
 3 files changed, 16 insertions(+)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-02 12:58:03 UTC
(In reply to Nick from comment #1)
> This also causes media-gfx/darktable to stop working with OpenCL.
> Hacking /etc/clang/gentoo-hardened.cfg solves the issue. No idea why
> hardened config affects my system, 
>   [5]   default/linux/amd64/17.1/desktop (stable) *
> but it's how it is. I suppose there'll be more apps affected, so please fix
> it properly. Thanks!

It's because this is part of the baseline set of hardening we apply to GCC. We just now do it for Clang. USE=hardened triggers more.