Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722092 - dev-util/nvidia-cuda-sdk-11.5.1 should downgrade CFLAGS
Summary: dev-util/nvidia-cuda-sdk-11.5.1 should downgrade CFLAGS
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: PMASKED
Depends on:
Blocks:
 
Reported: 2020-05-10 09:29 UTC by Alexey
Modified: 2022-11-19 03:54 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,66.53 KB, text/x-log)
2020-05-10 09:29 UTC, Alexey
Details
emerge --info (file_722092.txt,19.41 KB, text/plain)
2020-05-10 09:30 UTC, Alexey
Details
ebuild for nvidia-cuda-sdk-11.1.1 (nvidia-cuda-sdk-11.1.1.ebuild,3.73 KB, text/plain)
2021-03-11 21:57 UTC, sylvain.miossec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2020-05-10 09:29:44 UTC
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?
Comment 1 Alexey 2020-05-10 09:30:10 UTC
Created attachment 637502 [details]
emerge --info
Comment 2 sylvain.miossec 2021-02-25 11:55:04 UTC
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.
Comment 3 Benda Xu gentoo-dev 2021-02-25 15:13:22 UTC
Patches welcome.
Comment 4 sylvain.miossec 2021-03-11 21:57:52 UTC
Created attachment 690876 [details]
ebuild for nvidia-cuda-sdk-11.1.1
Comment 5 sylvain.miossec 2021-03-11 21:59:00 UTC
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.
Comment 6 sylvain.miossec 2021-03-12 09:50:43 UTC
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.
Comment 7 Agostino Sarubbo gentoo-dev 2022-01-11 15:30:03 UTC
ci has reproduced this issue with version 11.5.1 - Updating summary.
Comment 8 Larry the Git Cow gentoo-dev 2022-10-18 18:27:49 UTC
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(+)
Comment 9 Larry the Git Cow gentoo-dev 2022-11-19 03:54:59 UTC
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(-)