Hello everyone,
I am trying to build and run MFEM software using latest netlib lapack.
1) Without using lapack I am able to build mfem and run examples
2) I build MFEM with make parallel -j MFEM_USE_METIS_5=YES METIS_DIR=@MFEM_DIR@/../metis-5.1.0 MFEM_USE_LAPACK=YES MFEM_USE_SUITESPARSE=YES and it ran ok, I got the lib.
3) I try to compile a MFEM example by running
mpicxx -O3 -I.. -I../../hypre-2.11.1/src/hypre/include -I/home/kvoronin/Documents/suitesparse/SuiteSparse/include ex1p.cpp -o ex1p -L.. -lmfem -L../../metis-5.1.0 -lmetis -L../../hypre-2.11.1/src/hypre/lib -lHYPRE -L"/home/kvoronin/Documents/lapack/lapack-3.6.1" -llapack -lrt -L/home/kvoronin/Documents/suitesparse/SuiteSparse/KLU/lib -L/home/kvoronin/Documents/suitesparse/SuiteSparse/lib -lklu -lbtf -lumfpack -lcholmod -lcolamd -lamd -lcamd -lccolamd -lsuitesparseconfig -lrt -L../../metis-5.1.0 -lmetis -L"/home/kvoronin/Documents/lapack/lapack-3.6.1" -llapack
and got an error:
usr/bin/ld: /home/kvoronin/Documents/lapack/lapack-3.6.1/liblapack.a(xerbla.o): undefined reference to symbol '_gfortran_string_len_trim@@GFORTRAN_1.0'
//usr/lib/x86_64-linux-gnu/libgfortran.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
makefile:39: recipe for target 'ex1p' failed
What can be the reason? It seems like there is something wrong with lgfortran or fortran flags, but I could not work it out.
Adding lgfortran to the build lines above did not help.
Should I do something with my lapack build or do something with the linker options for the example?
I would appreciate any help!