* 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.
This commit is contained in:
parent
9ed4eb7a9a
commit
f7064fa181
3 changed files with 28 additions and 1 deletions
|
@ -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) \
|
|
@ -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 @@ def write_makefile_inc(self):
|
|||
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([
|
||||
|
|
Loading…
Reference in a new issue