summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Payerle <payerle@umd.edu>2021-01-21 23:41:11 -0500
committerGitHub <noreply@github.com>2021-01-21 20:41:11 -0800
commitf7064fa18183d8f86db1e51d71487bc3f01fd56f (patch)
tree53630610e388453aaeb5df21b61b90c5fe3d8b09
parent9ed4eb7a9a8681d028d52ea33eac09ab155a53f9 (diff)
downloadspack-f7064fa18183d8f86db1e51d71487bc3f01fd56f.tar.gz
spack-f7064fa18183d8f86db1e51d71487bc3f01fd56f.tar.bz2
spack-f7064fa18183d8f86db1e51d71487bc3f01fd56f.tar.xz
spack-f7064fa18183d8f86db1e51d71487bc3f01fd56f.zip
mumps: Fix for problematic src/makefile patch (#20590) (#20758)
* mumps: Fix for problematic src/makefile patch (#20590) Minor change in src/Makefile between 5.2.0 and 5.3.3 causing patch to break. Split into 2 patchfiles * mumps: Additional patch for fixing #20590 This is to fix issue wherein build fails on Ubuntu due to undefined symbols, despite symbols being included in other libraries referenced on the compilation line. I believe the issue is that the inclusion of libsmumps.so was (due to my original patch) causing libmumps_common.so to be automatically loaded, but since libpords.so was not also required, the error was occuring. I have added libpords.so along with libmumps_common.so to be explicit dependencies of libsmumps.so, etc., which seems to resolve the issue.
-rw-r--r--var/spack/repos/builtin/packages/mumps/mumps.src-makefile.5.2.patch (renamed from var/spack/repos/builtin/packages/mumps/mumps.src-makefile.patch)0
-rw-r--r--var/spack/repos/builtin/packages/mumps/mumps.src-makefile.5.3.patch24
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py5
3 files changed, 28 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/mumps/mumps.src-makefile.patch b/var/spack/repos/builtin/packages/mumps/mumps.src-makefile.5.2.patch
index 70acfe6d08..70acfe6d08 100644
--- a/var/spack/repos/builtin/packages/mumps/mumps.src-makefile.patch
+++ b/var/spack/repos/builtin/packages/mumps/mumps.src-makefile.5.2.patch
diff --git a/var/spack/repos/builtin/packages/mumps/mumps.src-makefile.5.3.patch b/var/spack/repos/builtin/packages/mumps/mumps.src-makefile.5.3.patch
new file mode 100644
index 0000000000..eb88806723
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mumps/mumps.src-makefile.5.3.patch
@@ -0,0 +1,24 @@
+diff -Naur spack-src/src/Makefile spack-src.patched/src/Makefile
+--- spack-src/src/Makefile 2020-06-15 05:57:25.000000000 -0400
++++ spack-src.patched/src/Makefile 2021-01-08 14:43:28.655026604 -0500
+@@ -193,7 +193,7 @@
+ $(RANLIB) $@
+
+ $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT): $(OBJS_MOD) $(OBJS_OTHER)
+- $(AR)$@ $?
++ $(AR)$@ $? $(EXTRA_LIBS4MUMPS)
+ $(RANLIB) $@
+
+ # Dependencies between modules:
+@@ -405,9 +405,9 @@
+
+ .SUFFIXES: .c .F .o
+ .F.o:
+- $(FC) $(OPTF) -I. -I../include $(INCS) $(IORDERINGSF) $(ORDERINGSF) -c $*.F $(OUTF)$*.o
++ $(FC) $(OPTF) $(FC_PIC_FLAG) -I. -I../include $(INCS) $(IORDERINGSF) $(ORDERINGSF) -c $*.F $(OUTF)$*.o
+ .c.o:
+- $(CC) $(OPTC) -I../include $(INCS) $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -c $*.c $(OUTC)$*.o
++ $(CC) $(OPTC) $(CC_PIC_FLAG) -I../include $(INCS) $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -c $*.c $(OUTC)$*.o
+
+ $(ARITH)mumps_c.o: mumps_c.c
+ $(CC) $(OPTC) -I../include $(INCS) $(CDEFS) -DMUMPS_ARITH=MUMPS_ARITH_$(ARITH) \
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
index cede6d24b3..da3174e539 100644
--- a/var/spack/repos/builtin/packages/mumps/package.py
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -55,7 +55,8 @@ class Mumps(Package):
patch('gfortran8.patch', when='@5.1.2')
# The following patches src/Makefile to fix some dependency
# issues in lib[cdsz]mumps.so
- patch('mumps.src-makefile.patch', when='+shared')
+ patch('mumps.src-makefile.5.2.patch', when='@5.2.0 +shared')
+ patch('mumps.src-makefile.5.3.patch', when='@5.3.0: +shared')
def write_makefile_inc(self):
if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and (
@@ -79,6 +80,8 @@ class Mumps(Package):
orderings = ['-Dpord']
# All of the lib[cdsz]mumps.* libs depend on mumps_common
extra_libs4mumps = ['-L$(topdir)/lib', '-lmumps_common']
+ # and mumps_common depends on pord
+ extra_libs4mumps += ['-L$(topdir)/PORD/lib', '-lpord']
if '+ptscotch' in self.spec or '+scotch' in self.spec:
makefile_conf.extend([