Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928961 - dev-libs/libclc can't build with hardened
Summary: dev-libs/libclc can't build with hardened
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-09 01:42 UTC by Yury Zhuravlev
Modified: 2024-04-10 14:30 UTC (History)
2 users (show)

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


Attachments
build log (build.log,26.19 KB, text/plain)
2024-04-09 03:42 UTC, Yury Zhuravlev
Details
emerge --info (emerge.info,9.20 KB, text/plain)
2024-04-09 03:43 UTC, Yury Zhuravlev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Zhuravlev 2024-04-09 01:42:30 UTC
Similar to https://bugs.gentoo.org/927752

1. During the build, it failed with the next message:
/usr/lib/llvm/17/bin/clang -DCLC_AMDGCN -D__CLC_INTERNAL -I/usr/lib/llvm/17/include -I/var/tmp/portage/dev-libs/libclc-18.1.3/work/libclc/generic/include -cl-no-stdinc -target amdgcn-- -mcpu=tahiti -fno-builtin -nostdlib -o CMakeFiles/builtins.link.tahiti-amdgcn--.dir/convert.bc -c /var/tmp/portage/dev-libs/libclc-18.1.3/work/libclc_build/convert.cl -emit-llvm
error: option 'cf-protection=return' cannot be specified on this target
error: option 'cf-protection=branch' cannot be specified on this target

2. Rusticl Mesa OpenCL apps don't work with the same issue - 
error: option 'cf-protection=return' cannot be specified on this target
error: option 'cf-protection=branch' cannot be specified on this target
Error executing LLVM compilation action.

Reproducible: Always
Comment 1 Greg Kubaryk 2024-04-09 02:13:11 UTC
Bug reports about build failures need emerge --info as a comment and build.log as an attachment.
Comment 2 Yury Zhuravlev 2024-04-09 03:42:31 UTC
Created attachment 889966 [details]
build log
Comment 3 Yury Zhuravlev 2024-04-09 03:43:01 UTC
Created attachment 889967 [details]
emerge --info
Comment 4 Yury Zhuravlev 2024-04-09 03:43:22 UTC
Sorry, I added all the files.
Comment 5 Sv. Lockal 2024-04-09 14:50:23 UTC
I can't reproduce this bug. libclc-18.1.3* and libclc-19* compiled fine for me with clang-common >= https://bugs.gentoo.org/927752#c4

Yury Zhuravlev, could you check the output of:
emerge sys-devel/clang-common --pretend --verbose

It looks like you did not update sys-devel/clang-common. I guess when you initially installed clang-18, you unmasked some versions, but now 18.1.3-r3 is still masked on your system.
Comment 6 Yury Zhuravlev 2024-04-10 10:38:22 UTC
(In reply to Sv. Lockal from comment #5)
> I can't reproduce this bug. libclc-18.1.3* and libclc-19* compiled fine for
> me with clang-common >= https://bugs.gentoo.org/927752#c4
> 
> Yury Zhuravlev, could you check the output of:
> emerge sys-devel/clang-common --pretend --verbose
> 
> It looks like you did not update sys-devel/clang-common. I guess when you
> initially installed clang-18, you unmasked some versions, but now 18.1.3-r3
> is still masked on your system.

Seems like it's ok, 
[ebuild   R   ~] sys-devel/clang-common-18.1.3-r3::gentoo USE="cet -bootstrap-prefix -default-compiler-rt -default-libcxx -default-lld -hardened -llvm-libunwind -verify-sig"

But I can try to reinstall it.
Comment 7 Yury Zhuravlev 2024-04-10 14:30:35 UTC
okey, I solved it, llvm:17 and clang:17 was from gentoo-locomotion overlay, after I rebuild it for ::gentoo version everything became fine. Thank you.