diff --git a/var/spack/repos/builtin/packages/libzmq/package.py b/var/spack/repos/builtin/packages/libzmq/package.py index e994fd74c2..dac309b699 100644 --- a/var/spack/repos/builtin/packages/libzmq/package.py +++ b/var/spack/repos/builtin/packages/libzmq/package.py @@ -64,13 +64,20 @@ class Libzmq(AutotoolsPackage): depends_on("libunwind", when="+libunwind") conflicts("%gcc@8:", when="@:4.2.2") - conflicts("%gcc@12:", when="@4.3.2:4.3.4") + conflicts("%gcc@11:", when="@:4.3.2") # Fix aggressive compiler warning false positive patch( "https://github.com/zeromq/libzmq/commit/92b2c38a2c51a1942a380c7ee08147f7b1ca6845.patch?full_index=1", sha256="310b8aa57a8ea77b7ac74debb3bf928cbafdef5e7ca35beaac5d9c61c7edd239", - when="@4.2.3:4.3.4 %gcc@11:", + when="@4.3.3:4.3.4 %gcc@11:", + ) + + # Fix build issues with gcc-12 + patch( + "https://github.com/zeromq/libzmq/pull/4334.patch?full_index=1", + sha256="edca864cba914481a5c97d2e975ba64ca1d2fbfc0044e9a78c48f1f7b2bedb6f", + when="@4.3.4 %gcc@12:", ) def url_for_version(self, version):