Fatal error when installing on Ubuntu 20.04

Hi,

I am trying to compile FreeFem to bypass the libhdf5_serial.so.100 error highlighted here, which occurs when running the version from the .deb package.

I am following the instructions provided by the documentation, with the only difference being that I am adding --without-hdf5 to the ./configure options.

When running make I get the following error:

make[4]: Entering directory '/home/michele/FreeFem-sources/plugin/seq'
eval ./ff-c++ mshmet.cpp -L/home/michele/FreeFem-sources/3rdparty/lib -lmshmet -I/home/michele/FreeFem-sources/3rdparty/include -L/home/michele/FreeFem-sources/3rdparty/lib -lMesh -I/home/michele/FreeFem-sources/3rdparty/include/libMesh
eval ./ff-c++ SuperLu.cpp -lsuperlu -lblas -DWITH_fc -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -lgfortran -lm -lquadmath -DAdd_
eval ./ff-c++ aniso.cpp -L/home/michele/FreeFem-sources/3rdparty/lib -lmshmet -I/home/michele/FreeFem-sources/3rdparty/include -L/home/michele/FreeFem-sources/3rdparty/lib -lMesh -I/home/michele/FreeFem-sources/3rdparty/include/libMesh
g++ -c -fPIC '-I./include' '-I/home/michele/FreeFem-sources/3rdparty/include' '-I/home/michele/FreeFem-sources/3rdparty/include/libMesh' -g -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/usr/include/suitesparse 'mshmet.cpp'
g++ -c -fPIC '-I./include' '-DWITH_fc' '-DAdd_' -g -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/usr/include/suitesparse 'SuperLu.cpp'
g++ -c -fPIC '-I./include' '-I/home/michele/FreeFem-sources/3rdparty/include' '-I/home/michele/FreeFem-sources/3rdparty/include/libMesh' -g -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/usr/include/suitesparse 'aniso.cpp'
eval ./ff-c++ gsl.cpp -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm -I/usr/include
g++ -c -fPIC '-I./include' '-I/usr/include' -g -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/usr/include/suitesparse 'gsl.cpp'
SuperLu.cpp:29:10: fatal error: slu_ddefs.h: No such file or directory
   29 | #include "slu_ddefs.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:902: SuperLu.so] Error 1

I tried to debug it to no avail. According to StackOverflow, that’s because of a version mismatch between gcc and g++, but I have updated both to the same version.

Any idea on how I could solve/bypass this issue?

OS: Ubuntu 20.04, gcc and g++ 11.1.0

Use these instructions instead: GitHub - FreeFem/FreeFem-sources: FreeFEM source code. Higher success rate, plus you’ll have access to PETSc (and a working SuperLU installation, which is not the case currently…). Don’t forget the make petsc-slepc step.

Hi, I am sorry if I may sound a bit blunt but they are basically the same instructions. Commands are the same, with the only exception of the --prefix option. How could this help?

You did not install PETSc, thus FreeFEM is using the SuperLU installation from your system, which is broken. So maybe they are the same, but in any case, you didn’t use them properly (probably skipped the make petsc-slepc step?). Even if you don’t use PETSc, which is a shame, the make petsc-slepc step ensures that you have all needed dependencies, so I would highly recommend that you run it.

I did not skip it, but it didn’t work, it outputs the following error:

*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Your libraries are from MPICH but it appears your mpiexec is from OpenMPI
*******************************************************************************

Which I really don’t know to to solve.

Send 3rdparty/ff-petsc/petsc-3*/configure.log. It appears you have both MPICH and OpenMPI installed, you should remove one of them.

Well, actually that is not enough since not only I have both installed, but I don’t have any mpiexec for mpich at all even if I just installed it. I will try removing OpenMPI and see what happens.

If you don’t have any MPI installation (best approach), PETSc will install it for you, and that will then be used by FreeFEM. Even if after you’ve removed everything it doesn’t work, you’ll need to send the aforementioned configure.log. Don’t forget to re-run ./configure once you’ve cleaned up your system.

Ok, it took a while but it worked! Thank you very much.

You are very welcome, I’m glad it’s sorted out.