https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: sci-libs/rocFFT-5.0.2 fails to compile. Discovered on: amd64 (internal ref: ci)
CC'ing also the author of the commit (667ba2194399e0d35c23b5f8051f6816359f6307)
Created attachment 790739 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: FAILED: library/src/CMakeFiles/rocfft_rtc_helper.dir/rocfft_rtc_helper.cpp.o FAILED: library/src/CMakeFiles/rocfft_rtc_helper.dir/rtccompile.cpp.o /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/g++-v12/bits/shared_ptr_base.h:196:22: error: use of undeclared identifier 'noinline'; did you mean 'inline'?
Seems to be a gcc-12 + clang issue: https://github.com/NVIDIA/thrust/issues/1703
After discussion with <strawberry_str@hotmail.com>, it is concluded that in cuda/hip sources clang expands __noinline__ __attribute__((__noinline__)), while the __attribute__((__noinline__)) in /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/g++-v12/bits/shared_ptr_base.h is expanded to __attribute__((__attribute__((noinline)))). We found that clang steps out to handle the situation: https://reviews.llvm.org/D124866. We can backport it to llvm-roc. However this is also confirmed on vanilla clang based hip (https://bugs.gentoo.org/851702), so we may have to backport it to clang if future hip depend on vanilla rocm.
> We found that clang steps out to handle the situation: > https://reviews.llvm.org/D124866. We can backport it to llvm-roc. > > However this is also confirmed on vanilla clang based hip > (https://bugs.gentoo.org/851702), so we may have to backport it to clang if > future hip depend on vanilla rocm. Backporting clang is tricky. Considering mask >=gcc-12 when using clang-14
ci has reproduced this issue with version 5.0.2-r1 - Updating summary.
*** Bug 857660 has been marked as a duplicate of this bug. ***
https://reviews.llvm.org/rGafc9d674fe5a14b95c50a38d8605a159c2460427 has the desired patch, but only for llvm-15.
Copying from https://github.com/gentoo/gentoo/pull/26311#issuecomment-1179545451 > If https://reviews.llvm.org/D124866 can be backported to clang-14 then > problem solved. Otherwise we have to wait until clang-15 Have you tried to backport it to clang-14? Does it work?
(In reply to Benda Xu from comment #10) > Copying from > https://github.com/gentoo/gentoo/pull/26311#issuecomment-1179545451 > > > If https://reviews.llvm.org/D124866 can be backported to clang-14 then > > problem solved. Otherwise we have to wait until clang-15 > > Have you tried to backport it to clang-14? Does it work? I failed to backport it. It is hard to cherry-pick alone.
clang-15.0.0_rc2 does not fix the problem despite having the fix and passing the test. Will figure out a MWE and report to llvm upstream ASAP
ci has reproduced this issue with version 5.1.3 - Updating summary.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6db8c2f742c153f5c7dd7482a6b23e894cc84e9 commit c6db8c2f742c153f5c7dd7482a6b23e894cc84e9 Author: Jack de Kleuver <jackdekleuver@gmail.com> AuthorDate: 2022-11-05 07:09:35 +0000 Commit: Benda Xu <heroxbd@gentoo.org> CommitDate: 2022-11-19 11:50:41 +0000 dev-util/hip: Set LLVM version to 15 backport fix for `__noinline__` keyword Bug: https://bugs.gentoo.org/857126 Signed-off-by: Jack de Kleuver <jackdekleuver@gmail.com> Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org> .../files/hip-5.1.3-llvm-15-noinline-keyword.patch | 21 +++++++++++++++++++++ .../{hip-5.1.3-r1.ebuild => hip-5.1.3-r2.ebuild} | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-)
I think we can call this fixed now?