# Fatal error when installing on Ubuntu 20.04

**URL:** <https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391>\
**Category:** FreeFEM installation\
**Created:** [April 12, 2023, 4:32pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391 "2023-04-12T16:32:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MicPellegrino](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/micpellegrino/32/850_2.png) [@MicPellegrino](https://community.freefem.org/u/MicPellegrino)\
**Post date:** [April 12, 2023, 4:32pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/1 "2023-04-12T16:32:19Z")

</div>

Hi,

I am trying to compile FreeFem to bypass the libhdf5\_serial.so.100 error highlighted [here](https://community.freefem.org/t/help-installing-freefem-in-ubuntu-19-10/269), which occurs when running the version from the `.deb` package.

I am following the instructions provided by the [documentation](https://doc.freefem.org/introduction/installation.html), with the only difference being that I am adding `--without-hdf5` to the `./configure` options.

When running `make` I get the following error:

```auto
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

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [April 12, 2023, 4:50pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/2 "2023-04-12T16:50:01Z")

</div>

Use these instructions instead: [GitHub - FreeFem/FreeFem-sources: FreeFEM source code](https://github.com/FreeFem/FreeFem-sources#freefem). 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.

---

<div class="post-metadata">

**Author:** ![MicPellegrino](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/micpellegrino/32/850_2.png) [@MicPellegrino](https://community.freefem.org/u/MicPellegrino)\
**Post date:** [April 12, 2023, 5:06pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/3 "2023-04-12T17:06:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [April 12, 2023, 5:18pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/4 "2023-04-12T17:18:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MicPellegrino](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/micpellegrino/32/850_2.png) [@MicPellegrino](https://community.freefem.org/u/MicPellegrino)\
**Post date:** [April 12, 2023, 5:28pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/5 "2023-04-12T17:28:47Z")

</div>

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

```auto
*******************************************************************************
         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.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [April 12, 2023, 5:29pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/6 "2023-04-12T17:29:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MicPellegrino](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/micpellegrino/32/850_2.png) [@MicPellegrino](https://community.freefem.org/u/MicPellegrino)\
**Post date:** [April 12, 2023, 5:31pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/7 "2023-04-12T17:31:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [April 12, 2023, 5:32pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/8 "2023-04-12T17:32:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MicPellegrino](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/micpellegrino/32/850_2.png) [@MicPellegrino](https://community.freefem.org/u/MicPellegrino)\
**Post date:** [April 12, 2023, 6:35pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/9 "2023-04-12T18:35:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [April 12, 2023, 7:36pm UTC](https://community.freefem.org/t/fatal-error-when-installing-on-ubuntu-20-04/2391/10 "2023-04-12T19:36:59Z")

</div>

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