Freefem installation error on ubuntu 18.04

config.status: creating examples/3dCurve/Makefile
config.status: creating config.h
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --disable-pastix, --disable-iohdf5
configure: FreeFEM used download: yes
configure: – Dynamic load facility: yes
configure: – ARPACK (eigen value): yes
configure: – UMFPACK (sparse solver): yes
configure: – BLAS: yes
configure: – with MPI: yes
configure: – with PETSc: yes / PETSc complex: yes
configure: – with SLEPc: yes / SLEPc complex: yes
configure: – with hpddm: yes (need MPI & c++11: yes)
configure: – with htool: yes (need MPI & c++11: yes)
configure: – with bemtool: yes (need boost: yes and htool: yes )
configure: – without libs:
configure: – without plugins:
configure: progs: FreeFem+±nw bamg cvmsh2 FreeFem+±mpi ffmedit ffglut
configure: use of download freeyams see 3rdparty/yams/freeyams.2011.02.22 (suface mesh adaptation)
configure: use of download mmg3d (v4) see 3rdparty/mmg3d/mmg3d4/LICENCE.txt
configure: use of download mmg see 3rdparty/mmg/mmg-sources/LICENSE
configure: use of download parmmg see 3rdparty/parmmg/parmmg-sources/LICENSE
configure: try to download: bem yams mshmet parmmg mmg mmg3d
configure: use of download boost see 3rdparty/boost/LICENSE_1_0.txt
configure: Please run “3rdparty/getall” to download all necessary packages before running make
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$ sudo make install
Making install in 3rdparty
make[1]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
Making install in blas
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/blas’
make[2]: Nothing to be done for ‘install’.
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/blas’
Making install in arpack
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/arpack’
make[2]: Nothing to be done for ‘install’.
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/arpack’
Making install in umfpack
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[3]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[3]: Nothing to be done for ‘install-exec-am’.
make[3]: Nothing to be done for ‘install-data-am’.
make[3]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
make[3]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
\n\n ****** mshmet ****** \n\n
grep: WHERE-LD: Arquivo ou diretório inexistente
make[4]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/mshmet’
grep ‘abs_top_builddir *=’ …/Makefile >> ff-flags
grep ‘CC *=’ …/Makefile >> ff-flags
grep ‘CFLAGS *=’ …/Makefile >> ff-flags
grep ‘LDFLAGS *=’ …/Makefile >> ff-flags
grep ‘AR *=’ …/Makefile >> ff-flags
grep ‘ARFLAGS *=’ …/Makefile >> ff-flags
grep ‘RANLIB *=’ …/Makefile >> ff-flags
grep ‘WGET *=’ …/Makefile >> ff-flags
grep ‘mshmet_VERSION *=’ ./Makefile >> ff-flags
make[4]: Nothing to be done for ‘all-local’.
make[4]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/mshmet’
make[3]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
make[3]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
\n\n ****** yams ****** \n\n
grep: WHERE-LD: Arquivo ou diretório inexistente
make[4]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/yams’
grep ‘abs_top_builddir *=’ …/Makefile > ff-flags
grep ‘CC *=’ …/Makefile >> ff-flags
grep ‘CFLAGS *=’ …/Makefile >> ff-flags
grep ‘LDFLAGS *=’ …/Makefile >> ff-flags
grep ‘AR *=’ …/Makefile >> ff-flags
grep ‘ARFLAGS *=’ …/Makefile >> ff-flags
grep ‘RANLIB *=’ …/Makefile >> ff-flags
grep ‘yams_VERSION *=’ ./Makefile >> ff-flags
grep ‘WGET *=’ …/Makefile >> ff-flags
grep ‘LIBS *=’ …/Makefile >> ff-flags
make install WHERE
make[5]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/yams’
sed s/defines.h/freeyams_defines.h/ </home/hpc/FreeFem-sources/3rdparty/yams/./freeyams.2012.02.05/sourceslib/yamslib.h >…/include/freeyamslib.h
cp /home/hpc/FreeFem-sources/3rdparty/yams/./freeyams.2012.02.05/sourceslib/defines.h …/include/freeyams_defines.h
mkdir …/lib
mkdir: não foi possível criar o diretório “…/lib”: Arquivo existe
Makefile:45: recipe for target ‘install’ failed
make[5]: [install] Error 1 (ignored)
cp /home/hpc/FreeFem-sources/3rdparty/yams/./freeyams.2012.02.05/objects/libyams.a …/lib/libfreeyams.a
echo freeyams LD -L@DIR@/lib -lfreeyams >./freeyams.2012.02.05/…/…/lib/WHERE.freeyams ;
echo freeyams INCLUDE -I@DIR@/include>> ./freeyams.2012.02.05/…/…/lib/WHERE.freeyams ;
make[5]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/yams’
touch FAIRE
make[4]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/yams’
make[3]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
make[3]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
\n\n ****** mmg3d ****** \n\n
grep: WHERE-LD: Arquivo ou diretório inexistente
make[4]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/mmg3d’
grep ‘abs_top_builddir *=’ …/Makefile > ff-flags
grep ‘CC *=’ …/Makefile >> ff-flags
grep ‘CFLAGS *=’ …/Makefile >> ff-flags
grep ‘LDFLAGS *=’ …/Makefile >> ff-flags
grep ‘AR *=’ …/Makefile >> ff-flags
grep ‘ARFLAGS *=’ …/Makefile >> ff-flags
grep ‘RANLIB *=’ …/Makefile >> ff-flags
grep ‘WGET *=’ …/Makefile >> ff-flags
grep ‘STD_LIBS *=’ …/Makefile >> ff-flags
grep ‘CNOFLAGS *=’ …/Makefile >> ff-flags
make[4]: Nothing to be done for ‘all-local’.
make[4]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/mmg3d’
make[3]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
make[3]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
\n\n ****** mmg ****** \n\n
grep: WHERE-LD: Arquivo ou diretório inexistente
make[4]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/mmg’
grep ‘abs_top_builddir *=’ …/Makefile > ff-flags
grep ‘CC *=’ …/Makefile >> ff-flags
grep ‘CFLAGS *=’ …/Makefile >> ff-flags
grep ‘CXX *=’ …/Makefile >> ff-flags
grep ‘CXXFLAGS *=’ …/Makefile >> ff-flags
grep ‘CXX11FLAGS *=’ …/Makefile >> ff-flags
grep ‘LDFLAGS *=’ …/Makefile >> ff-flags
grep ‘AR *=’ …/Makefile >> ff-flags
grep ‘ARFLAGS *=’ …/Makefile >> ff-flags
grep ‘RANLIB *=’ …/Makefile >> ff-flags
grep ‘WGET *=’ …/Makefile >> ff-flags
grep ‘STD_LIBS *=’ …/Makefile >> ff-flags
grep ‘CNOFLAGS *=’ …/Makefile >> ff-flags
grep ‘FF_prefix_petsc_real *=’ …/Makefile >> ff-flags
awk ‘/^scotch LD /&&/petsc/ {print “scotch_dir=(FF_prefix_petsc_real)" }' ../../plugin/seq/WHERE_LIBRARY-config >> ff-flags awk '/^scotch LD /{print "scotch_dir=../../../3rdparty/" }' ../lib/WHERE.scotch >> ff-flags awk: fatal: impossível abrir arquivo `../lib/WHERE.scotch' para leitura (Arquivo ou diretório inexistente) Makefile:72: recipe for target 'ff-flags' failed make[4]: [ff-flags] Error 2 (ignored) ../getall -o mmg -a mmg mmg.zip done make[4]: Leaving directory '/home/hpc/FreeFem-sources/3rdparty/mmg' make[3]: Leaving directory '/home/hpc/FreeFem-sources/3rdparty' make[3]: Entering directory '/home/hpc/FreeFem-sources/3rdparty' \n\n ****** gmm ****** \n\n grep: WHERE-LD: Arquivo ou diretório inexistente make[4]: Entering directory '/home/hpc/FreeFem-sources/3rdparty/gmm' grep 'CXX *=' ../Makefile >cxxflags grep 'CC *=' ../Makefile >>cxxflags grep 'CXXFLAGS *=' ../Makefile >>cxxflags grep 'CFLAGS *=' ../Makefile >>cxxflags grep 'WGET *=' ../Makefile >>cxxflags grep 'WIN32DLLTARGET *=' ../Makefile >>cxxflags make[4]: Nothing to be done for 'gmm'. make[4]: Leaving directory '/home/hpc/FreeFem-sources/3rdparty/gmm' make[3]: Leaving directory '/home/hpc/FreeFem-sources/3rdparty' make[3]: Entering directory '/home/hpc/FreeFem-sources/3rdparty' \n\n ****** parmmg ****** \n\n grep: WHERE-LD: Arquivo ou diretório inexistente make[4]: Entering directory '/home/hpc/FreeFem-sources/3rdparty/parmmg' grep 'abs_top_builddir *=' ../Makefile > ff-flags grep 'CC *=' ../Makefile >> ff-flags grep 'FC *=' ../Makefile >> ff-flags grep 'CFLAGS *=' ../Makefile >> ff-flags grep 'CXX *=' ../Makefile >> ff-flags grep 'CXXFLAGS *=' ../Makefile >> ff-flags grep 'CXX11FLAGS *=' ../Makefile >> ff-flags grep 'LDFLAGS *=' ../Makefile >> ff-flags grep 'AR *=' ../Makefile >> ff-flags grep 'ARFLAGS *=' ../Makefile >> ff-flags grep 'RANLIB *=' ../Makefile >> ff-flags grep 'WGET *=' ../Makefile >> ff-flags grep 'STD_LIBS *=' ../Makefile >> ff-flags grep 'CNOFLAGS *=' ../Makefile >> ff-flags grep 'FF_prefix_petsc_real *=' ../Makefile >> ff-flags grep 'MPICC *=' ../Makefile >> ff-flags grep 'MPICXX *=' ../Makefile >> ff-flags grep 'MPIFC *=' ../Makefile >> ff-flags grep 'MPIRUN *=' ../Makefile >> ff-flags awk '/^scotch LD /&&/petsc/ {print "scotch_dir=(FF_prefix_petsc_real)” }’ …/…/plugin/seq/WHERE_LIBRARY-config >> ff-flags
awk ‘/^scotch LD /{print “scotch_dir=…/…/…/3rdparty/” }’ …/lib/WHERE.scotch >> ff-flags
awk: fatal: impossível abrir arquivo ../lib/WHERE.scotch' para leitura (Arquivo ou diretório inexistente) Makefile:80: recipe for target 'ff-flags' failed make[4]: [ff-flags] Error 2 (ignored) awk '/^metis LD /&&/petsc/ {print "metis_dir=$(FF_prefix_petsc_real)" }' ../../plugin/seq/WHERE_LIBRARY-config >> ff-flags awk '/^metis LD /{print "metis_dir=../../../3rdparty/" }' ../lib/WHERE.metis >> ff-flags awk: fatal: impossível abrir arquivo …/lib/WHERE.metis’ para leitura (Arquivo ou diretório inexistente)
Makefile:80: recipe for target ‘ff-flags’ failed
make[4]: [ff-flags] Error 2 (ignored)
…/getall -o parmmg -a
parmmg parmmg.zip done
mkdir build
mkdir: não foi possível criar o diretório “build”: Arquivo existe
Makefile:20: recipe for target ‘FAIT.done’ failed
make[4]: [FAIT.done] Error 1 (ignored)
cd build && cmake …/parmmg-sources
-DCMAKE_C_COMPILER=gcc
-DCMAKE_C_FLAGS="-g -DNDEBUG -O3 -mmmx -mavx -fPIC -fPIC"
-DCMAKE_CXX_COMPILER=“g++”
-DCMAKE_CXX_FLAGS="-g -DNDEBUG -O3 -mmmx -mavx -std=c++11 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -std=c++11 -fPIC"
-DMPI_C_COMPILER="/usr/bin/mpicc"
-DMPI_CXX_COMPILER="/usr/bin/mpic++"
-DMPI_Fortran_COMPILER="/usr/bin/mpif90"
-DMPIEXEC_EXECUTABLE="/usr/bin/mpirun"
-DDOWNLOAD_MMG=OFF
-DDOWNLOAD_METIS=OFF
-DMMG_DIR=…/…/mmg/mmg-sources
-DMMG_BUILDDIR=…/…/mmg/build
-DSCOTCH_DIR=/usr/local/ff-petsc/r
-DMETIS_DIR=/usr/local/ff-petsc/r
-DCMAKE_BUILD_TYPE=Release && make
grep: /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include;/usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h: Arquivo ou diretório inexistente
– Compilation with mpi

mpirun cannot provide the help message when run as root.
Running at root is strongly discouraged as any mistake (e.g., in
defining TMPDIR) or bug can result in catastrophic damage to the OS
file system, leaving your system in an unusable state.

You can override this protection by adding the --allow-run-as-root
option to your cmd line. However, we reiterate our strong advice
against doing so - please do so at your own risk.

CMake Error at CMakeLists.txt:150 (STRING):
STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.

– A cache variable, namely SCOTCH_DIR, has been set to specify the install directory of SCOTCH
– Looking for SCOTCH_graphInit
– Looking for SCOTCH_graphInit - found
– Compilation with scotch: /usr/local/ff-petsc/r/lib/libscotch.a;/usr/local/ff-petsc/r/lib/libscotcherrexit.a;-lpthread;-lz;-lm;-lrt
– Manual installation of Mmg: please, specify the MMG_DIR and MMG_BUILDDIR CMake variables
– A cache variable, namely MMG_DIR, has been set to specify the install directory of MMG
– Looking for MMG5_loadMshMesh_part1
– Looking for MMG5_loadMshMesh_part1 - found
– Compilation with Mmg: /home/hpc/FreeFem-sources/3rdparty/mmg/build/lib/libmmg.a
– A cache variable, namely METIS_DIR, has been set to specify the install directory of METIS
– Looking for METIS_NodeND
– Looking for METIS_NodeND - found
– Compilation with metis: /usr/local/ff-petsc/r/lib/libmetis.so
– Up-to-date: /home/hpc/FreeFem-sources/3rdparty/parmmg/build/include/parmmg/libparmmg.h
– Up-to-date: /home/hpc/FreeFem-sources/3rdparty/parmmg/build/include/parmmg/libparmmgtypes.h
– Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
– Configuring incomplete, errors occurred!
See also “/home/hpc/FreeFem-sources/3rdparty/parmmg/build/CMakeFiles/CMakeOutput.log”.
See also “/home/hpc/FreeFem-sources/3rdparty/parmmg/build/CMakeFiles/CMakeError.log”.
Makefile:20: recipe for target ‘FAIT.done’ failed
make[4]: *** [FAIT.done] Error 1
make[4]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/parmmg’
Makefile:981: recipe for target ‘compile-dir’ failed
make[3]: *** [compile-dir] Error 2
make[3]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
Makefile:991: recipe for target ‘tag-compile-pkg’ failed
make[2]: *** [tag-compile-pkg] Error 1
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
Makefile:587: recipe for target ‘install-recursive’ failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
Makefile:791: recipe for target ‘install-recursive’ failed
make: *** [install-recursive] Error 1
hpc@hpc:~/FreeFem-sources$

Do not use sudo, use the --prefix option so that you won’t have to do sudo make install, simply make install.

hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$ make install --prefix
make: opção não reconhecida “–prefix”
Uso: make [opções] [alvo] …
Opções:
-b, -m Ignorado para compatibilidade.
-B, --always-make Processa todos os alvos incondicionalmente.
-C DIRETÓRIO, --directory=DIRETÓRIO
Muda para o DIRETÓRIO antes de fazer algo.
-d Imprime muita informação de depuração.
–debug[=OPÇÕES] Imprime vários tipos de informações de depuração.
-e, --environment-overrides
Assume os valores das variáveis de ambiente.
–eval=STRING Avalia a STRING como uma declaração para um makefile.
-f ARQUIVO, --file=ARQUIVO, --makefile=ARQUIVO
Lê o ARQUIVO como se fosse um arquivo make.
-h, --help Imprime esta mensagem e sai.
-i, --ignore-errors Ignora os erros dos comandos.
-I DIRETÓRIO, --include-dir=DIRETÓRIO
Pesquisa o DIRETÒRIO por arquivos make a incluir.
-j [N], --jobs[=N] Permite N tarefas de uma vez; tarefas infinitas sem argumentos.
-k, --keep-going Continua mesmo que alguns alvos não possam ser processados.
-l [N], --load-average[=N], --max-load[=N]
Não inicia múltiplas tarefas a menos que a carga seja menor que N.
-L, --check-symlink-times Usa o tempo mais antigo entre o vínculo simbólico e o alvo.
-n, --just-print, --dry-run, --recon
Não executa quaisquer comandos; apenas imprime-os.
-o ARQUIVO, --old-file=ARQUIVO, --assume-old=ARQUIVO
Considera o ARQUIVO como muito antigo e não reprocessá-o.
-O[TYPE], --output-sync[=TYPE]
Synchronize output of parallel jobs by TYPE.
-p, --print-data-base Imprime o banco de dados interno do make.
-q, --question Não executa os comandos; O código de saida indica se está atualizado.
-r, --no-builtin-rules Desabilita as regras implícitas.
-R, --no-builtin-variables Desabilita a configuração das variáveis embutidas.
-s, --silent, --quiet Não ecoa os comandos.
-S, --no-keep-going, --stop
Desativa a opção -k.
-t, --touch Executa um `touch’ nos alvos ao invés de reprocessá-los.
–trace Print tracing information.
-v, --version Imprime o número de versão do make e sai.
-w, --print-directory Imprime o diretório atual.
–no-print-directory Desativa a opção -w, mesmo que ela esteja implicitamente ativada.
-W ARQUIVO, --what-if=ARQUIVO, --new-file=ARQUIVO, --assume-new=ARQUIVO
Considera o ARQUIVO infinitamente novo.
–warn-undefined-variables Avisa quando um variável não definida for referenciada.

Este programa foi compilado para x86_64-pc-linux-gnu
Informe os problemas para bug-make@gnu.org.
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$ make install
Making install in 3rdparty
make[1]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
Making install in blas
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/blas’
make[2]: Nothing to be done for ‘install’.
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/blas’
Making install in arpack
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/arpack’
make[2]: Nothing to be done for ‘install’.
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/arpack’
Making install in umfpack
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[3]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[3]: Nothing to be done for ‘install-exec-am’.
make[3]: Nothing to be done for ‘install-data-am’.
make[3]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty/umfpack’
make[2]: Entering directory ‘/home/hpc/FreeFem-sources/3rdparty’
cd …/src/libMesh && make
make[3]: Entering directory ‘/home/hpc/FreeFem-sources/src/libMesh’
make[3]: Nothing to be done for ‘all’.
make[3]: Leaving directory ‘/home/hpc/FreeFem-sources/src/libMesh’
test -f …/src/libMesh/libMesh.a
mkdir -p include/libMesh
cp …/src/libMesh/*h include/libMesh
cp: não foi possível criar arquivo comum ‘include/libMesh/chrono.h’: Permissão negada
cp: não foi possível criar arquivo comum ‘include/libMesh/eigenv.h’: Permissão negada
cp: não foi possível criar arquivo comum ‘include/libMesh/libmeshb7.h’: Permissão negada
cp: não foi possível criar arquivo comum ‘include/libMesh/memory.h’: Permissão negada
Makefile:867: recipe for target ‘lib/libMesh.a’ failed
make[2]: *** [lib/libMesh.a] Error 1
make[2]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
Makefile:587: recipe for target ‘install-recursive’ failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory ‘/home/hpc/FreeFem-sources/3rdparty’
Makefile:791: recipe for target ‘install-recursive’ failed
make: *** [install-recursive] Error 1
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$
hpc@hpc:~/FreeFem-sources$

Please look at the README.md. Alternatively, you can add the flag --disable-parmmg.

Now working properly, thank you very much