Keep -Werror to avoid issue #35235#36961
Conversation
8cd3ab3 to
eb75427
Compare
|
Hi @trws, Apologies for bothering you, I noticed you had added 'keep_werror' to PR #30882, and I wanted to ask you a question. since adding Thank you, I appreciate it! |
|
Keep_werror needs to be set at the class level, rather than in a function scope. I'm not sure if that's the whole issue but as it stands it probably isn't doing anything so it's a first step. |
|
Hi @trws, This error seems to only occur when using |
I am not sure actually now that you mention it. It's implemented as a regular class variable rather than a directive so maybe not. You could try using the with block syntax and when(%nvhpc) but I'm not sure it will help. Spack might need to be changed to enable it. Does it cause breakage for other compilers to leave it on? |
|
Hi @trws, I have no evidence of errors with other compilers, but Spack's ( |
|
I put that in so that packages could build with newer compilers when the new compilers produce new warnings. What's the failure with nvhpc anyway? What issue is the translation causing there? |
|
I think the right fix here (until nvhpc gets this right) is actually something like this in class PackageBase(...):
# ...
@property
def keep_error(self):
# nvhpc and PGI do not have the -Wno-error flag that replace -Werror with,
# so currently we can't support this feature.
if self.spec.satisfies("%nvhpc") or self.spec.satisfies("%pgi"):
return "all"
# otherwise get the value from config
return NoneWe can update that with a version for nvhpc when the fix fits upstream. |
|
Hi @tgamblin, This makes sense. I agree with you. |
Added
keep_werrorfor%nvhpcto avoid issue #35235.Ref: 0182603