<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I asked in the spack-slack channel and was told to include the explicitly link the gfortran associated with the gcc version I build petsc with. Following that advice, I'm using gcc@7.3.0, linking gcc@7.3.0/lib64 in FFLAGS and setting -g option to CFLAGS in my makefile. <br><br>Yet, somehow the executable still picks up the system gfortran (It picks both libgfortran.so.4 and libgfortran.so.3). Anything else I missed trying? <br><br></div><div>PS: My makefile looks like this:  <br><br>[sajid@xrm free_space]$ cat makefile<br><br>ALL:<br><br>CFLAGS          = -g<br>FFLAGS          = -L/raid/home/sajid/packages/spack/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-7.3.0-qrjpi76aeo4bysagruwwfii6oneh56lj/lib64/<br>CPPFLAGS        =<br>FPPFLAGS        =<br>CLEANFILES      = ex_matlab<br><br>include ${PETSC_DIR}/lib/petsc/conf/variables<br>include ${PETSC_DIR}/lib/petsc/conf/rules<br><br># your targets if any<br><br>include ${PETSC_DIR}/lib/petsc/conf/test<br><br></div><div>I've looked into the superludist and can confirm that it is indeed linked to the system gfortran due to it's build error and since it's a petsc dependency, it might be that this is where the system gfortran is coming in instead of the newer gfortran associated with gcc-7.3.0 but I'm not sure. <br></div></div></div></div></div></div>