Created attachment 637500 [details] build.log cc1plus: error: bad value (‘znver2’) for ‘-march=’ switch cc1plus: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server bonnell atom silvermont slm knl knm x86-64 ed en-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2 native; did you mean ‘znver1’? Because it requires gcc 8 which doesn't support znver2. It should do something similar to downgrade_arch_flags from toolchain.eclass. Probably that function should be moved to some other eclass to be used from non-gcc ebuild like this one?
Created attachment 637502 [details] emerge --info
I have the same problem with a ryzen 3900X processor. I suppose I can force CFLAGS to znver1 instead of znver2 for this package to solve it. I did not try yet.
Patches welcome.
Created attachment 690876 [details] ebuild for nvidia-cuda-sdk-11.1.1
I finally preferred to use cuda 11 that use gcc 9.3 that support znver2. So I modified ebuild for version 11.1.1, see attached file. Need some more testing. I had some compilation core dump, but when continuing compilation did not reproduce (with ebuild nvidia-cuda-sdk***.ebuild compile). So I suppose it is a race condition problem, but did not investigate for now. I also tried with cuda 11.2.0, but had many segmentation faults with cicc. Not systematically reproducible. I could compile it by repeating maybe 20 times "ebuild nvidia-cuda-sdk***.ebuild compile". Maybe something to do with this bug https://bugs.gentoo.org/show_bug.cgi?id=762050 Hope this helps.
I tested MAKEOPTS="-j1" emerge --ask nvidia-cuda-sdk and indeed nvidia-cuda-sdk-11.1.1 compiles fine. So core dump pb I had seem to be a problem of compilation of sdk on multiple cores.
ci has reproduced this issue with version 11.5.1 - Updating summary.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d836cd44c1b06bac0d1ad99f8dd9064c400f5312 commit d836cd44c1b06bac0d1ad99f8dd9064c400f5312 Author: David Seifert <soap@gentoo.org> AuthorDate: 2022-10-18 18:27:37 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2022-10-18 18:27:37 +0000 profiles: last-rite dev-util/nvidia-cuda-sdk Bug: https://bugs.gentoo.org/722092 Bug: https://bugs.gentoo.org/749900 Bug: https://bugs.gentoo.org/762169 Bug: https://bugs.gentoo.org/840656 Bug: https://bugs.gentoo.org/845381 Bug: https://bugs.gentoo.org/858392 Bug: https://bugs.gentoo.org/866701 Signed-off-by: David Seifert <soap@gentoo.org> profiles/package.mask | 6 ++++++ 1 file changed, 6 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aac3cd55032f85ba5a13cf05b631b301d3370c60 commit aac3cd55032f85ba5a13cf05b631b301d3370c60 Author: David Seifert <soap@gentoo.org> AuthorDate: 2022-11-19 03:54:28 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2022-11-19 03:54:28 +0000 dev-util/nvidia-cuda-sdk: treeclean Closes: https://bugs.gentoo.org/722092 Closes: https://bugs.gentoo.org/749900 Closes: https://bugs.gentoo.org/762169 Closes: https://bugs.gentoo.org/840656 Closes: https://bugs.gentoo.org/845381 Closes: https://bugs.gentoo.org/858392 Closes: https://bugs.gentoo.org/866701 Signed-off-by: David Seifert <soap@gentoo.org> dev-util/nvidia-cuda-sdk/Manifest | 1 - dev-util/nvidia-cuda-sdk/metadata.xml | 12 -- .../nvidia-cuda-sdk/nvidia-cuda-sdk-11.5.1.ebuild | 140 --------------------- profiles/package.mask | 6 - 4 files changed, 159 deletions(-)