Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 853184 - sci-libs/rocSPARSE-5.0.2 fails to compile: cmath:45:15: fatal error: math.h file not found
Summary: sci-libs/rocSPARSE-5.0.2 fails to compile: cmath:45:15: fatal error: math.h f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Yiyang Wu
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-06-20 13:00 UTC by Agostino Sarubbo
Modified: 2022-09-14 04:27 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,217.90 KB, text/plain)
2022-06-20 13:00 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-06-20 13:00:50 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sci-libs/rocSPARSE-5.0.2 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2022-06-20 13:00:52 UTC
CC'ing also the author of the commit (de8cf511f58071e19f69e47947e5946ad864943f)
Comment 2 Agostino Sarubbo gentoo-dev 2022-06-20 13:00:54 UTC
Created attachment 786449 [details]
build.log

build log and emerge --info
Comment 3 Agostino Sarubbo gentoo-dev 2022-06-20 13:00:55 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: library/CMakeFiles/rocsparse.dir/src/handle.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_axpby.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_axpyi.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_dotci.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_doti.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_gather.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_gthr.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_gthrz.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_rot.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_roti.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_scatter.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_sctr.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level1/rocsparse_spvv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrmv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrsv_analysis.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrsv_buffer_size.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrsv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrsv_solve.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_16x16.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_17_32.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_2x2.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_3x3.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_4x4.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_5x5.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_8x8.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_bsrxmv_spzl_general.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_coomv_aos.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_coomv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_coosv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_csrmv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_csrsv_analysis.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_csrsv_buffer_size.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_csrsv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_csrsv_solve.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_ellmv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_gebsrmv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_gebsrmv_template_row_block_dim_1.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_gebsrmv_template_row_block_dim_2.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_gebsrmv_template_row_block_dim_3.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_gebsrmv_template_row_block_dim_4.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_gebsrmv_template_row_block_dim_5_8.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_hybmv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_spmv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/level2/rocsparse_spsv.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/rocsparse_auxiliary.cpp.o 
FAILED: library/CMakeFiles/rocsparse.dir/src/status.cpp.o 
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/cmath:45:15: fatal error: 'math.h' file not found
Comment 4 Benda Xu gentoo-dev 2022-06-20 14:29:43 UTC
I was able to reproduce this bug with gcc-11.3.0.
Comment 5 Benda Xu gentoo-dev 2022-06-20 14:45:42 UTC
Probably related to

https://archives.gentoo.org/gentoo-soc/message/47d3f67742ff099f71ce4d35d4b5503a#L11

you need a patch of

--- /usr/bin/hipcc.pl   2022-06-20 22:43:47.000000000 +0800
+++ /tmp/hipcc.pl       2022-06-20 22:43:36.074419331 +0800
@@ -222,10 +222,6 @@
     exit (-1);
 }
 
-# Add paths to common HIP includes:
-$HIPCXXFLAGS .= " -isystem \"$HIP_INCLUDE_PATH\"" ;
-$HIPCFLAGS .= " -isystem \"$HIP_INCLUDE_PATH\"" ;
-
 my $compileOnly = 0;
 my $needCXXFLAGS = 0;  # need to add CXX flags to compile step
 my $needCFLAGS = 0;    # need to add C flags to compile step

to fix this bug.
Comment 6 Benda Xu gentoo-dev 2022-06-20 14:51:56 UTC
cf. https://bugs.gentoo.org/693200#c20 for isystem bug.
Comment 7 Yiyang Wu 2022-06-21 03:53:03 UTC
(In reply to Benda Xu from comment #4)
> I was able to reproduce this bug with gcc-11.3.0.

However, I cannot understand why this bug hasn't been observed previously with gcc-11.2. Nevertheless I'll try patching hipcc.pl in hip-5.0.2
Comment 8 Yiyang Wu 2022-06-21 04:11:33 UTC
(In reply to Yiyang Wu from comment #7)
> However, I cannot understand why this bug hasn't been observed previously
> with gcc-11.2. Nevertheless I'll try patching hipcc.pl in hip-5.0.2

OK, I know that it is my fault in d5835abbe66be09b9851fcc79a158d1a083ad8fc. I'll provide fix as soon as possible.
Comment 9 Larry the Git Cow gentoo-dev 2022-06-22 13:03:25 UTC
The bug has been referenced in the following commit(s):

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

commit 12344ff2860eca5dffa212e1b95aac414f1992dc
Author:     Yiyang Wu <xgreenlandforwyy@gmail.com>
AuthorDate: 2022-06-21 10:51:05 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2022-06-22 12:59:29 +0000

    dev-util/hip: Fix -isystem pollution after d5835abb
    
    After d5835abbe66be09b9851fcc79a158d1a083ad8fc which corrects the
    HIP_PATH, HIP_INCLUDE_PATH now points to /usr/include and hipcc.pl added
    -isystem $HIP_INCLUDE_PATH which caused complilation failure. Fix it by
    removing lines in hipcc.pl
    
    Bug: https://bugs.gentoo.org/853184
    Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1159800433
    Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-util/hip/{hip-5.0.2-r1.ebuild => hip-5.0.2-r2.ebuild} | 1 +
 1 file changed, 1 insertion(+)
Comment 10 Benda Xu gentoo-dev 2022-09-14 04:27:00 UTC
Fixed in ::gentoo.