Jed Brown  committed a518c7d allow missing Fortran libraries when compiling with Fortran

Some distributions and users do not install libhdf5_fortran, and PETSc
does not need it, so fall back to linking only the C library.

  • Participants
  • Parent commits f74211a

Comments (0)

Files changed (1)

File config/BuildSystem/config/packages/

   def configureLibrary(self):
     self.extraLib = self.libraries.compression
     if hasattr(self.compilers, 'FC'):
-      self.liblist   = [['libhdf5_fortran.a', 'libhdf5.a', '', '']]
+      # PETSc does not need the Fortran interface, but some users will call the Fortran interface
+      # and expect our standard linking to be sufficient.  Thus we try to link the Fortran
+      # libraries, but fall back to linking only C.
+      self.liblist = [['libhdf5_fortran.a'] + libs for libs in self.liblist] + self.liblist
     if self.libraries.check(self.dlib, 'H5Pset_fapl_mpio'):
       self.addDefine('HAVE_H5PSET_FAPL_MPIO', 1)