FreeFEM installation error on Linux Mint 20

I’m trying to install FreeFEM++ on my laptop.
Everything seems to work out fine till I run: make -j

Errors appear as:
g++ -shared -fPIC -g -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/usr/local/ff-petsc/r/include -I/usr/include/hdf5/serial -I/usr/include ‘dfft.o’ -o '-lfftw3’
/usr/bin/ld: /usr/local/lib/libfftw3.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:897:] Error 1
make[4]: *** Waiting for unfinished jobs…


make[4]: Leaving directory '/home/aziz/Documents/src/FreeFem-sources/plugin/seq’
make[3]: *** [Makefile:891: load_compile] Error 2
make[3]: Leaving directory '/home/aziz/Documents/src/FreeFem-sources/plugin/seq’
make[2]: *** [Makefile:664: all-recursive] Error 1
make[2]: Leaving directory '/home/aziz/Documents/src/FreeFem-sources/plugin’
make[1]: *** [Makefile:800: all-recursive] Error 1
make[1]: Leaving directory '/home/aziz/Documents/src/FreeFem-sources’
make: *** [Makefile:750: all] Error 2

Thank you

OK, I tried the set of instructions given in

Again, errors appear in make -j4, attached is the config.log

config.log (352.9 KB)

Another try with the *deb file. Running a code with load Petsc gives:

Load: lg_fem lg_mesh lg_mesh3 eigenvalue parallelempi **
** load: init metis (v 5 )

**PETSc Error — Open MPI library version **
Open MPI v4.0.3, package: Debian OpenMPI, ident: 4.0.3, repo rev: v4.0.3, Mar 03, 2020 does not match what PETSc was compiled with 2.1, aborting
PETSC ERROR: Logging has not been enabled.
You might have forgotten to call PetscInitialize().

The .deb will not work on Linux Mint. Your library installed FFTW3 is messed up (does not support shared library), so you should add --disable-system-fftw --disable-download_fftw, then reconfigure and recompile.

Dear Pierre,
unfortunately, still no success.
config.log (352.5 KB)

What is the output of make?

Here it is:
makeoutput.log (68.5 KB)

I don’t see any particular error there. What is the error you are currently getting?

Here are the issues I’m having when I run:

  1. Everything has *dpkg-new appended at the end, so for example /usr/local/lib/ff++/4.6/lib/
  2. Serial code fails to plot: sh: 1: ffglut: not found. Maybe also related to *dpkg-new issue.
  3. Parallel run: FreeFem+±mpi.dpkg-new -np 4 File2_MPI.edp

– FreeFem++ v4.6 (Thu Apr 2 15:47:38 CEST 2020 - git v4.6)
sh: 1: ffglut: not found
** Load: lg_fem lg_mesh lg_mesh3 eigenvalue parallelempi **
** Error opening file -np in: **
** – try :“-np”**
** – try :“/usr/local/lib/ff++/4.6/include/-np”**

** Error line number 1, in file – unkown --, before token **
lex: Error input opening file **
** current line = -1 mpirank 0 / 1

Compile error : lex: Error input opening file **
** line number :1, **
terminate called after throwing an instance of ‘ErrorCompile’
** what(): Compile error : lex: Error input opening file **
** line number :1,

  1. My .freefem++.pref file contents:
    verbosity = 1
    loadpath += “/usr/local/lib/ff++/4.6/lib”
    includepath += “/usr/local/lib/ff++/4.6/include/”

You are not using the version you just compiled, so of course it’s not working. You need to remove everything that is not related to your latest installation that should work.

It seems to be working, thank you!