Skip to content

Commit 340a3da

Browse files
authored
Updates for hdf-eos2, py-pyhdf, py-h5py, and gsibec (#42)
This is a follow-on update to JCSDA/spack-stack#1908 where we cherry pick updates from mainline spack: * gsibec: add 1.4.2 spack#3487 * hdf-eos2: add flags for gcc@14 spack#3488 * py-pyhdf: add flags for gcc@14 spack#3489 * py-h5py: add flags for gcc@14 spack#3490
1 parent 01a4b52 commit 340a3da

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

repos/spack_repo/builtin/packages/gsibec/package.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Gsibec(CMakePackage):
2222
license("Apache-2.0")
2323

2424
version("develop", branch="develop")
25+
version("1.4.2", sha256="b17bc0b32c8f0f8b36dcf2fea94915841d52baa7e68119d56f0729f7709f7163")
2526
version("1.4.1", sha256="f624c1af36b5023fc35f5a5b0cec4b5649f6a7df933148da432a25b53e5b5c87")
2627
version("1.4.0", sha256="aa512995c32bd4a9998584a62707abed299fe34af4e9dbf5b44aebd335376e54")
2728
version("1.3.1", sha256="fe7dbe7d170b47dbacc3febc42fc9877c118860b1532d70246bc73934e548185")
@@ -47,6 +48,9 @@ def url_for_version(self, version):
4748

4849
return url.format(version)
4950

51+
# GSIbec 1.4.1 does not compile with gcc@10 and later, 1.4.2 fixes this
52+
conflicts("%gcc@10:", when="@1.4.1")
53+
5054
depends_on("c", type="build")
5155
depends_on("fortran", type="build")
5256

repos/spack_repo/builtin/packages/hdf_eos2/package.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ def flag_handler(self, name, flags):
129129
flags.append("-Wno-error=implicit-function-declaration")
130130
flags.append("-Wno-error=implicit-int")
131131

132+
# Testing shows we need one extra flag for gcc@14
133+
if self.spec.satisfies("%gcc@14:"):
134+
flags.append("-Wno-error=implicit-function-declaration")
135+
flags.append("-Wno-error=implicit-int")
136+
flags.append("-Wno-error=incompatible-pointer-types")
132137
return flags, None, None
133138

134139
def setup_build_environment(self, env: EnvironmentModifications) -> None:

repos/spack_repo/builtin/packages/py_h5py/package.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ def flag_handler(self, name, flags):
111111
if self.spec.satisfies("%oneapi@2023.0.0:"):
112112
flags.append("-Wno-error=incompatible-function-pointer-types")
113113
flags.append("-Wno-error=incompatible-pointer-types-discards-qualifiers")
114+
elif self.spec.satisfies("%gcc@14:"):
115+
flags.append("-Wno-error=incompatible-pointer-types")
116+
flags.append("-Wno-error=discarded-qualifiers")
114117
return (flags, None, None)
115118

116119
def setup_build_environment(self, env: EnvironmentModifications) -> None:

repos/spack_repo/builtin/packages/py_pyhdf/package.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ class PyPyhdf(PythonPackage):
3737
depends_on("py-numpy@:1.24", when="@0.10.4", type=("build", "run"))
3838
depends_on("jpeg", type=("build", "run"))
3939

40+
def flag_handler(self, name, flags):
41+
if name == "cflags":
42+
if self.spec.satisfies("%gcc@14:"):
43+
flags.append("-Wno-error=incompatible-pointer-types")
44+
flags.append("-Wno-error=discarded-qualifiers")
45+
return (flags, None, None)
46+
4047
def setup_build_environment(self, env: EnvironmentModifications) -> None:
4148
inc_dirs = []
4249
lib_dirs = []

0 commit comments

Comments
 (0)