summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Lang <67915889+lang-m@users.noreply.github.com>2024-07-22 19:54:49 +0200
committerGitHub <noreply@github.com>2024-07-22 19:54:49 +0200
commitf044194b06d393dea67d48c27973df1e68e5ba53 (patch)
tree2215780ed43a58b8e9e2fa8da10b371a19920ec7
parent29302c13e957dc76d2b16ac80dce10915348a329 (diff)
downloadspack-f044194b06d393dea67d48c27973df1e68e5ba53.tar.gz
spack-f044194b06d393dea67d48c27973df1e68e5ba53.tar.bz2
spack-f044194b06d393dea67d48c27973df1e68e5ba53.tar.xz
spack-f044194b06d393dea67d48c27973df1e68e5ba53.zip
libvdwxc: Fix configure with gcc-14 (#45093)
-rw-r--r--var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch13
-rw-r--r--var/spack/repos/builtin/packages/libvdwxc/package.py9
2 files changed, 22 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch b/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch
new file mode 100644
index 0000000000..f009188f52
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch
@@ -0,0 +1,13 @@
+diff --git a/configure b/configure
+index 494ea9f..1ca6516 100755
+--- a/configure
++++ b/configure
+@@ -17006,7 +17006,7 @@ int
+ main ()
+ {
+
+- fftw_plan *plan;
++ fftw_plan plan;
+ fftw_complex *a1, *a2;
+ fftw_execute_dft(plan, a1, a2);
+
diff --git a/var/spack/repos/builtin/packages/libvdwxc/package.py b/var/spack/repos/builtin/packages/libvdwxc/package.py
index 53cbef94be..e0e7241d95 100644
--- a/var/spack/repos/builtin/packages/libvdwxc/package.py
+++ b/var/spack/repos/builtin/packages/libvdwxc/package.py
@@ -54,3 +54,12 @@ class Libvdwxc(AutotoolsPackage):
args += ["--without-mpi"]
return args
+
+ # misuse of fftw_plan in m4 for fftw detection (configure fails with gcc 14)
+ # two patches for (1) m4 macro from upstream and (2) pre-generated configure in tarball
+ patch(
+ "https://gitlab.com/libvdwxc/libvdwxc/-/commit/9340f857515c4a2e56d2aa7cf3a21c41ba8559c3.diff",
+ sha256="b9ad695e54a25d7ffa92f783bb0a31d3b421225f97958972e32ba42893844b80",
+ when="@:0.4.0",
+ )
+ patch("fftw-detection.patch", when="@:0.4.0")