From 202214d8550744bb15df60031fa97f2ba412c89c Mon Sep 17 00:00:00 2001 From: Mark Grondona Date: Thu, 5 May 2022 17:11:04 -0700 Subject: flux-sched: add patch for signedness compare issue on gcc@9.40 (#30514) Problem: GCC 9.4.0 catches a bad integer comparison in resource/hlapi/bindings/c++/reapi_cli_impl.hpp in flux-sched@0.22.0 and current master. Add a patch to work around the problem until an upstream fix is available. --- .../packages/flux-sched/jobid-sign-compare-fix.patch | 13 +++++++++++++ var/spack/repos/builtin/packages/flux-sched/package.py | 1 + 2 files changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/flux-sched/jobid-sign-compare-fix.patch diff --git a/var/spack/repos/builtin/packages/flux-sched/jobid-sign-compare-fix.patch b/var/spack/repos/builtin/packages/flux-sched/jobid-sign-compare-fix.patch new file mode 100644 index 0000000000..edaae12a99 --- /dev/null +++ b/var/spack/repos/builtin/packages/flux-sched/jobid-sign-compare-fix.patch @@ -0,0 +1,13 @@ +diff --git a/resource/hlapi/bindings/c++/reapi_cli_impl.hpp b/resource/hlapi/bindings/c++/reapi_cli_impl.hpp +index 0b01b341..e0a91458 100644 +--- a/resource/hlapi/bindings/c++/reapi_cli_impl.hpp ++++ b/resource/hlapi/bindings/c++/reapi_cli_impl.hpp +@@ -594,7 +594,7 @@ int resource_query_t::remove_job (const uint64_t jobid) + { + int rc = -1; + +- if (jobid > std::numeric_limits::max ()) { ++ if (jobid > (uint64_t) std::numeric_limits::max ()) { + errno = EOVERFLOW; + return rc; + } diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py index 0c8cf2aca8..6a9e4f30a3 100644 --- a/var/spack/repos/builtin/packages/flux-sched/package.py +++ b/var/spack/repos/builtin/packages/flux-sched/package.py @@ -75,6 +75,7 @@ class FluxSched(AutotoolsPackage): # Disable t5000-valgrind.t by default due to false positives not yet # in the suppressions file. (This patch will be in v0.21.0) patch('no-valgrind.patch', when='@:0.20.0') + patch('jobid-sign-compare-fix.patch', when='@:0.22.0') def url_for_version(self, version): ''' -- cgit v1.2.3-60-g2f50