From 1e0935186d63be2e3c7a722d93879666d3bd48c3 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Thu, 30 May 2024 11:35:20 -0700 Subject: [PATCH 1/6] Package/gettext: Old version issues (#44440) gcc@:5 hits https://savannah.gnu.org/bugs/index.php?65811 in gettext@0.22: also fix patch of configure script Co-authored-by: Harmen Stoppels --- .../repos/builtin/packages/gettext/package.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index d485aaf82d7431..479b97ea4b721b 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -62,6 +62,8 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage): # depends_on('cvs') conflicts("+shared~pic") + # https://savannah.gnu.org/bugs/?65811 + conflicts("%gcc@:5", when="@0.22:") patch("test-verify-parallel-make-check.patch", when="@:0.19.8.1") patch("nvhpc-builtin.patch", when="@:0.21.0 %nvhpc") @@ -78,12 +80,13 @@ def patch(self): # From the configure script: "we don't want to use an external libxml, because its # dependencies and their dynamic relocations have an impact on the startup time", well, # *we* do. - filter_file( - "gl_cv_libxml_force_included=yes", - "gl_cv_libxml_force_included=no", - "libtextstyle/configure", - string=True, - ) + if self.spec.satisfies("@:19"): # libtextstyle/configure not present + filter_file( + "gl_cv_libxml_force_included=yes", + "gl_cv_libxml_force_included=no", + "libtextstyle/configure", + string=True, + ) def flag_handler(self, name, flags): # this goes together with gl_cv_libxml_force_included=no From 52c7c0237c2f9f2495987076ffb9527ecd802651 Mon Sep 17 00:00:00 2001 From: Teague Sterling Date: Wed, 12 Jun 2024 12:24:42 -0700 Subject: [PATCH 2/6] gettext: fix condition (#44680) --- var/spack/repos/builtin/packages/gettext/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index 479b97ea4b721b..b4db62738ce4e0 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -80,7 +80,7 @@ def patch(self): # From the configure script: "we don't want to use an external libxml, because its # dependencies and their dynamic relocations have an impact on the startup time", well, # *we* do. - if self.spec.satisfies("@:19"): # libtextstyle/configure not present + if self.spec.satisfies("@20:"): # libtextstyle/configure not present prior filter_file( "gl_cv_libxml_force_included=yes", "gl_cv_libxml_force_included=no", From 2cb198576b382f500fb3bca78fd110c7aa423b2d Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 30 Aug 2024 17:39:36 -0700 Subject: [PATCH 3/6] Fix grib-util 1.4.0 for older ifort --- var/spack/repos/builtin/packages/grib-util/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/grib-util/package.py b/var/spack/repos/builtin/packages/grib-util/package.py index 76e819348fc1dd..cf7284661dd8e9 100644 --- a/var/spack/repos/builtin/packages/grib-util/package.py +++ b/var/spack/repos/builtin/packages/grib-util/package.py @@ -50,6 +50,10 @@ def cmake_args(self): ] return args + @when("@1.4.0 %intel@:20") + def patch(self): + filter_file("stop iret", "stop 9", "src/grb2index/grb2index.F90") + def check(self): with working_dir(self.builder.build_directory): make("test") From 50c84eabab61ca88eacb708775180caa0311e2e9 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 30 Aug 2024 17:43:05 -0700 Subject: [PATCH 4/6] Update package.py --- var/spack/repos/builtin/packages/grib-util/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/grib-util/package.py b/var/spack/repos/builtin/packages/grib-util/package.py index cf7284661dd8e9..5708c29cc93cae 100644 --- a/var/spack/repos/builtin/packages/grib-util/package.py +++ b/var/spack/repos/builtin/packages/grib-util/package.py @@ -53,7 +53,7 @@ def cmake_args(self): @when("@1.4.0 %intel@:20") def patch(self): filter_file("stop iret", "stop 9", "src/grb2index/grb2index.F90") - + def check(self): with working_dir(self.builder.build_directory): make("test") From 78e0c1d5b83ff2874ec803ce25d08b014b5c8cc3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 5 Sep 2024 14:49:43 -0600 Subject: [PATCH 5/6] release/1.8.0: bug fix for compiling g2@3.5.1 with gfortran < 10 (#477) Bug fix for compiling g2@3.5.1 with gfortran < 10 --------- Co-authored-by: RatkoVasic-NOAA <37597874+RatkoVasic-NOAA@users.noreply.github.com> --- var/spack/repos/builtin/packages/g2/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/g2/package.py b/var/spack/repos/builtin/packages/g2/package.py index 1d47e4ee3b89cf..ea3bb603442dd1 100644 --- a/var/spack/repos/builtin/packages/g2/package.py +++ b/var/spack/repos/builtin/packages/g2/package.py @@ -59,6 +59,19 @@ def cmake_args(self): return args + # https://github.com/JCSDA/spack/issues/475 + def flag_handler(self, name, flags): + if self.spec.satisfies("@3.5.1") and name == "fflags" and "gfortran" in self.compiler.fc: + with self.compiler.compiler_environment(): + gfortran_major_version = int( + spack.compiler.get_compiler_version_output( + self.compiler.fc, "-dumpversion" + ).split(".")[0] + ) + if gfortran_major_version < 10: + flags.append("-fno-range-check") + return (None, None, flags) + def setup_run_environment(self, env): precisions = ( self.spec.variants["precision"].value if self.spec.satisfies("@3.4.6:") else ("4", "d") From 1b3e3e5252e5b0e4cb28f9e4255e84ea1a06ff5f Mon Sep 17 00:00:00 2001 From: Stephen Herbener <32968781+srherbener@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:16:28 -0600 Subject: [PATCH 6/6] Config for Mac Sonoma 14.6.1 with Command Line Tools 15.3 (#471) This PR adds in the necessary configuration to get the latest MacOS and Command Line Tools versions working (14.6.1 and 15.3 respectively). This PR includes a patch for FMS 2024.02 and a variant spec that builds shared (dylib) libraries. This makes it unnecessary to do the manual FMS build workaround that was recently published. The FMS patch is only needed for version 2024.02 in that the next version (2024.03) contains the update to the CMakeLists.txt file that adds in the shared library option. --------- Co-authored-by: Dom Heinzeller --- var/spack/repos/builtin/packages/fms/package.py | 10 ++++++++++ var/spack/repos/builtin/packages/py-netcdf4/package.py | 2 +- .../builtin/packages/py-ruamel-yaml-clib/package.py | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/fms/package.py b/var/spack/repos/builtin/packages/fms/package.py index 0bcf22034cf8d2..f94fb771b05de6 100644 --- a/var/spack/repos/builtin/packages/fms/package.py +++ b/var/spack/repos/builtin/packages/fms/package.py @@ -62,6 +62,15 @@ class Fms(CMakePackage): when="@2023.03", ) + variant("shared", description="Build shared libraries", when="@2024.02:", default=False) + # What the following patch is providing is available in version 2024.03 + # and newer so it is only needed to 2024.02 + patch( + "https://github.com/NOAA-GFDL/fms/pull/1559.patch?full_index=1", + sha256="2b12a6c35f357c3dddcfa5282576e56ab0e8e6c1ad1dab92a2c85ce3dfb815d4", + when="@2024.02", + ) + variant( "precision", values=("32", "64"), @@ -119,6 +128,7 @@ def cmake_args(self): self.define_from_variant("GFS_PHYS"), self.define_from_variant("OPENMP"), self.define_from_variant("ENABLE_QUAD_PRECISION", "quad_precision"), + self.define_from_variant("SHARED_LIBS", "shared"), self.define_from_variant("WITH_YAML", "yaml"), self.define_from_variant("CONSTANTS"), self.define_from_variant("LARGEFILE", "large_file"), diff --git a/var/spack/repos/builtin/packages/py-netcdf4/package.py b/var/spack/repos/builtin/packages/py-netcdf4/package.py index e0bf493749e4c0..3316e69692d7d5 100644 --- a/var/spack/repos/builtin/packages/py-netcdf4/package.py +++ b/var/spack/repos/builtin/packages/py-netcdf4/package.py @@ -50,7 +50,7 @@ class PyNetcdf4(PythonPackage): def flag_handler(self, name, flags): if name == "cflags": - if self.spec.satisfies("%oneapi"): + if self.spec.satisfies("%oneapi") or self.spec.satisfies("%apple-clang@15:"): flags.append("-Wno-error=int-conversion") return flags, None, None diff --git a/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py b/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py index bd9d97f49bd23b..2ae9ad5f568522 100644 --- a/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py +++ b/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py @@ -27,6 +27,6 @@ class PyRuamelYamlClib(PythonPackage): def flag_handler(self, name, flags): if name == "cflags": - if self.spec.satisfies("%oneapi"): + if self.spec.satisfies("%oneapi") or self.spec.satisfies(" %apple-clang@15:"): flags.append("-Wno-error=incompatible-function-pointer-types") return (flags, None, None)