too long lines were shrinked: [109/318] /usr/bin/x86_64-pc-linux-gnu-gcc -DVISIBILITY_HIDDEN -DNDEBUG -O2 -pipe -march=native -fno-diagnostics-color -Wall -Wno-unused-parameter -fno-diagnostics-color -m32 -fno-lto -Werror=array-bounds -Werror=uninitialized -Werror=shadow -Werror=empty-body -Werror=sizeof-pointer-memaccess -Wer [110/318] /usr/bin/x86_64-pc-linux-gnu-gcc -DVISIBILITY_HIDDEN -DNDEBUG -O2 -pipe -march=native -fno-diagnostics-color -Wall -Wno-unused-parameter -fno-diagnostics-color -m32 -fno-lto -Werror=array-bounds -Werror=uninitialized -Werror=shadow -Werror=empty-body -Werror=sizeof-pointer-memaccess -Wer [111/318] /usr/bin/x86_64-pc-linux-gnu-gcc -DVISIBILITY_HIDDEN -DNDEBUG -O2 -pipe -march=native -fno-diagnostics-color -Wall -Wno-unused-parameter -fno-diagnostics-color -m32 -fno-lto -Werror=array-bounds -Werror=uninitialized -Werror=shadow -Werror=empty-body -Werror=sizeof-pointer-memaccess -Wer FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/atomic.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -DVISIBILITY_HIDDEN -DNDEBUG -O2 -pipe -march=native -fno-diagnostics-color -Wall -Wno-unused-parameter -fno-diagnostics-color -m32 -fno-lto -Werror=array-bounds -Werror=uninitialized -Werror=shadow -Werror=empty-body -Werror=sizeof-pointer-memaccess -Werror=sizeof /var/tmp/portage/sys-libs/compiler-rt-19.1.3-r1/work/compiler-rt/lib/builtins/atomic.c: In function unlock: /var/tmp/portage/sys-libs/compiler-rt-19.1.3-r1/work/compiler-rt/lib/builtins/atomic.c:110:3: error: implicit declaration of function __c11_atomic_store; did you mean __atomic_store? [-Wimplicit-function-declaration] 110 | __c11_atomic_store(l, 0, __ATOMIC_RELEASE); | ^~~~~~~~~~~~~~~~~~ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0_test-20241107-130503 The attached etc.portage.tar.xz has all details. ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-14 * clang version 19.1.3 llvm-config: 19.1.3 Python 3.12.7 go version go1.23.2 linux/amd64 Available Ruby profiles: [1] ruby32 (with Rubygems) * Available Rust versions: [1] rust-bin-1.79.0 [2] rust-bin-1.82.0 * The following VMs are available for generation-2: 1) Eclipse Temurin JDK 21.0.5_p11 [openjdk-bin-21] *) Eclipse Temurin JDK 8.432_p06 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm [2] openjdk-bin-21 The Glorious Glasgow Haskell Compilation System, version 9.2.8 HEAD of ::gentoo commit 53077633bcf79d74ab25227baf9c2912c6ffdcc5 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sat Nov 9 10:18:54 2024 +0000 2024-11-09 10:18:53 UTC emerge -qpvO =sys-libs/compiler-rt-19.1.3-r1 [ebuild U ] sys-libs/compiler-rt-19.1.3-r1 [19.1.3] USE="-clang -debug -test -verify-sig" ABI_X86="32 (64)"
Created attachment 908249 [details] emerge-info.txt
Created attachment 908250 [details] emerge-history.txt
Created attachment 908251 [details] environment
Created attachment 908252 [details] etc.clang.tar.xz
Created attachment 908253 [details] etc.portage.tar.xz
Created attachment 908254 [details] logs.tar.xz
Created attachment 908255 [details] qlist-info.txt
Created attachment 908256 [details] sys-libs:compiler-rt-19.1.3-r1:20241109-104218.log
Created attachment 908257 [details] temp.tar.xz
Maybe we should enable the builtin only when compiled with clang, like freebsd does. https://github.com/gentoo/gentoo/pull/39168#issuecomment-2463963941
Trying to reproduce the issue right now, but if we confirm that's happening only with GCC, then I would lean towards having the USE flag and enabling it in LLVM profiles.
(In reply to vadorovsky from comment #11) > Trying to reproduce the issue right now, but if we confirm that's happening > only with GCC, then I would lean towards having the USE flag and enabling it > in LLVM profiles. Just curious, why is just using tc-is-clang not sufficient?
same error with sys-libs/compiler-rt-18.1.8-r2:18
(In reply to mojyack from comment #12) > (In reply to vadorovsky from comment #11) > > Trying to reproduce the issue right now, but if we confirm that's happening > > only with GCC, then I would lean towards having the USE flag and enabling it > > in LLVM profiles. > > Just curious, why is just using tc-is-clang not sufficient? I think it'd be actually sufficient.
The argument against it would be that mutating the image based on the compiler used like this might be undesirable, but given the special case of what the package is and what the atomic stuff is for, it should be fine.
Just noticed that there is a `clang` USE flag already in compiler-rt ebuilds already, which is used to enforce clang usage on GCC systems. It can be disabled on LLVM profiles. I think it would be the best to just guard `-DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF` with it. Let me test it. I'll make a PR once I confirm it works.
(In reply to vadorovsky from comment #16) > Just noticed that there is a `clang` USE flag already in compiler-rt ebuilds > already, which is used to enforce clang usage on GCC systems. It can be > disabled on LLVM profiles. I think it would be the best to just guard > `-DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF` with it. > > Let me test it. I'll make a PR once I confirm it works. It **CAN'T** be disabled on LLVM profiles, sorry for the typo
I think it'd be confusing to have this dependent on USE=clang that serves another purpose. Perhaps we should add IUSE=atomic that requires USE=clang.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=066df5677a706878b18665db183c72bac6302030 commit 066df5677a706878b18665db183c72bac6302030 Author: Michal Rostecki <vadorovsky@protonmail.com> AuthorDate: 2024-11-10 12:06:29 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2024-11-10 17:42:41 +0000 sys-libs/compiler-rt: Provide `atomic-builtins` IUSE flag Atomic builtins fail to build with GCC. Furthermore, they are not needed on systems with GCC, because libatomic can be used on them. Atomic builtins are mostly useful on LLVM-based systems. Guard them behind the `atomic-builtins` IUSE flag. That flag depends on `clang`. Bug: https://bugs.gentoo.org/943129 Signed-off-by: Michal Rostecki <vadorovsky@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/39260 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-libs/compiler-rt/compiler-rt-15.0.7-r2.ebuild | 5 +++-- sys-libs/compiler-rt/compiler-rt-16.0.6-r6.ebuild | 5 +++-- sys-libs/compiler-rt/compiler-rt-17.0.6-r2.ebuild | 5 +++-- sys-libs/compiler-rt/compiler-rt-18.1.8-r2.ebuild | 5 +++-- sys-libs/compiler-rt/compiler-rt-19.1.3-r1.ebuild | 5 +++-- sys-libs/compiler-rt/compiler-rt-20.0.0.9999.ebuild | 5 +++-- sys-libs/compiler-rt/metadata.xml | 11 +++++++++-- 7 files changed, 27 insertions(+), 14 deletions(-)