summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMatthias Diener <matthias.diener@gmail.com>2018-07-13 15:51:04 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2018-07-13 15:51:04 -0500
commit2cf9c7955c6739cafb57f5b8749f12e44f912d6e (patch)
tree92bb94c25a9c63c25945958a1d18c23cb67d074d /var
parentaec91d1cca84af5680c3fb4b572be46bd7c09204 (diff)
downloadspack-2cf9c7955c6739cafb57f5b8749f12e44f912d6e.tar.gz
spack-2cf9c7955c6739cafb57f5b8749f12e44f912d6e.tar.bz2
spack-2cf9c7955c6739cafb57f5b8749f12e44f912d6e.tar.xz
spack-2cf9c7955c6739cafb57f5b8749f12e44f912d6e.zip
Scotch: fix compilation of 6.0.5a (#8704)
Prevent this error: metis_graph_part.c:301:7: error: non-void function 'METIS_PartGraphVKway' should return a value [-Wreturn-type]
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/scotch/libscotchmetis-return-6.0.5a.patch10
-rw-r--r--var/spack/repos/builtin/packages/scotch/package.py2
2 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/scotch/libscotchmetis-return-6.0.5a.patch b/var/spack/repos/builtin/packages/scotch/libscotchmetis-return-6.0.5a.patch
new file mode 100644
index 0000000000..7e124c6aac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scotch/libscotchmetis-return-6.0.5a.patch
@@ -0,0 +1,10 @@
+--- a/src/libscotchmetis/metis_graph_part.c 2018-07-13 14:25:50.000000000 -0500
++++ b/src/libscotchmetis/metis_graph_part.c 2018-07-13 14:21:08.000000000 -0500
+@@ -298,7 +298,7 @@
+
+ edgenbr = xadj[vertnbr] - baseval;
+ if ((edlotax = memAlloc (edgenbr * sizeof (SCOTCH_Num))) == NULL)
+- return;
++ return (METIS_ERROR);
+ edlotax -= baseval; /* Base access to edlotax */
+ vsiztax = vsize2 - baseval;
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py
index 2e550bf2a7..5ff5491bba 100644
--- a/var/spack/repos/builtin/packages/scotch/package.py
+++ b/var/spack/repos/builtin/packages/scotch/package.py
@@ -63,6 +63,8 @@ class Scotch(Package):
patch('esmumps-ldflags-6.0.4.patch', when='@6.0.4')
patch('metis-headers-6.0.4.patch', when='@6.0.4')
+ patch('libscotchmetis-return-6.0.5a.patch', when='@6.0.5a')
+
# NOTE: In cross-compiling environment parallel build
# produces weird linker errors.
parallel = False