From fb1d4f8907ead7b982fb167295a80da2b36323c2 Mon Sep 17 00:00:00 2001 From: Kacper Kornet Date: Thu, 2 Jan 2025 16:54:06 +0000 Subject: [PATCH] zoltan: Fix buliding with gcc@14 and ifx. (#48358) * zoltan: Ignore errors about incompatible pointer type with gcc@14 In gcc 14 -Werror=incompatible-pointer-types is now the default. Silence it until it gets fixed in zoltan upstream. * zoltan: Fix linking error when built with ifx --- var/spack/repos/builtin/packages/zoltan/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 63348a6962a..e1a3e8d1749 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -87,6 +87,11 @@ def autoreconf(self, spec, prefix): with working_dir(self.configure_directory): autoreconf("-ivf") + def flag_handler(self, name, flags): + if self.spec.satisfies("%gcc@14:") and name == "cflags": + flags.append("-Wno-error=incompatible-pointer-types") + return self.build_system_flags(name, flags) + def configure_args(self): spec = self.spec @@ -112,7 +117,7 @@ def configure_args(self): # Although adding to config_libs _should_ suffice, it does not # Add to ldflags as well config_ldflags.append("-lgfortran") - if spec.satisfies("%intel"): + if spec.satisfies("%intel") or spec.satisfies("%oneapi"): config_libs.append("-lifcore") if "+int64" in spec: