Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 857126 - sci-libs/rocFFT-5.1.3 fails to compile: shared_ptr_base.h:196:22: error: use of undeclared identifier noinline; did you mean inline?
Summary: sci-libs/rocFFT-5.1.3 fails to compile: shared_ptr_base.h:196:22: error: use ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PullRequest
: 857660 (view as bug list)
Depends on:
Blocks: gcc-12
  Show dependency tree
 
Reported: 2022-07-09 08:32 UTC by Agostino Sarubbo
Modified: 2023-01-23 02:34 UTC (History)
5 users (show)

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


Attachments
build.log (build.log,65.04 KB, text/plain)
2022-07-09 08:32 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-07-09 08:32:21 UTC
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)
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-09 08:32:23 UTC
CC'ing also the author of the commit (667ba2194399e0d35c23b5f8051f6816359f6307)
Comment 2 Agostino Sarubbo gentoo-dev 2022-07-09 08:32:24 UTC
Created attachment 790739 [details]
build.log

build log and emerge --info
Comment 3 Agostino Sarubbo gentoo-dev 2022-07-09 08:32:25 UTC
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'?
Comment 4 Yiyang Wu 2022-07-09 08:45:11 UTC
Seems to be a gcc-12 + clang issue: https://github.com/NVIDIA/thrust/issues/1703
Comment 5 Yiyang Wu 2022-07-09 10:14:30 UTC
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.
Comment 6 Yiyang Wu 2022-07-09 10:48:32 UTC
> 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
Comment 7 Agostino Sarubbo gentoo-dev 2022-08-07 05:34:34 UTC
ci has reproduced this issue with version 5.0.2-r1 - Updating summary.
Comment 8 Benda Xu gentoo-dev 2022-08-23 10:08:54 UTC
*** Bug 857660 has been marked as a duplicate of this bug. ***
Comment 9 Benda Xu gentoo-dev 2022-08-23 10:12:51 UTC
https://reviews.llvm.org/rGafc9d674fe5a14b95c50a38d8605a159c2460427 has the desired patch, but only for llvm-15.
Comment 10 Benda Xu gentoo-dev 2022-08-23 10:14:24 UTC
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?
Comment 11 Yiyang Wu 2022-08-23 10:21:56 UTC
(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.
Comment 12 Yiyang Wu 2022-08-31 09:14:23 UTC
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
Comment 13 Agostino Sarubbo gentoo-dev 2022-09-22 07:30:14 UTC
ci has reproduced this issue with version 5.1.3 - Updating summary.
Comment 14 Larry the Git Cow gentoo-dev 2022-11-19 11:50:51 UTC
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(-)
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-23 02:34:35 UTC
I think we can call this fixed now?