MoFEM installation

47 views
Skip to first unread message
Assigned to lik...@wp.pl by me

Preslav Aleksandrov

unread,
Sep 23, 2021, 7:51:59 AM9/23/21
to MoFEM Q&A
Hello,

So I tried installing MoFEM user modules again using both:

./install_mofem_user.sh
and
spack install mofem-users-modules

both times I get an error. 

Using ./install_mofem_user.sh gives:
ERROR: Compiler 'g...@8.4.0' does not support compiling C++ programs.
  >> 29    make[1]: *** [CMakeFiles/cmTC_0e05b.dir/build.make:66: CMakeFiles/cmTC_0e05b.dir/testCXXCompiler.cxx.o] Error 1

Using spack install mofem-users-modules:
-- Check for working CXX compiler: /home/preslav/mofem_install/spack/lib/spack/env/gcc/g++
     12    -- Check for working CXX compiler: /home/preslav/mofem_install/spack/lib/spack/env/gcc/g++ -- broken
  >> 13    CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
     14      The C++ compiler
     15    
     16        "/home/preslav/mofem_install/spack/lib/spack/env/gcc/g++"
     17    
     18      is not able to compile a simple test program.

So obviously there is an issue with gcc. Does anyone know how to solve it?

Lukasz Kaczmraczyk

unread,
Sep 23, 2021, 8:06:53 AM9/23/21
to MoFEM Q&A
Hi,

What system are you using? What versions, etc.

The easiest solution is to install gcc, that we know that it works. Follow, snipped below, 

export MOFEM_INSTALL_DIR="$HOME/mofem_install"
export SPACK_ROOT_DIR=$MOFEM_INSTALL_DIR/spack
. $SPACK_ROOT_DIR/share/spack/setup-env.sh

spack clean -a
spack uninstall -a
spack install g...@9.3.0
spack compiler find
spack install --only dependencies mofem-cephas ^petsc+X
spack install --test all mofem-fracture-module build_type=Release ^petsc+X

spack view --verbose symlink -i um_view mofem-fracture-module

Regards,
L.

Preslav Aleksandrov

unread,
Sep 23, 2021, 8:22:01 AM9/23/21
to MoFEM Q&A
Hello, 
Ubuntu 20.04.3 LTS
AMD® Ryzen 5 5600h

spack install g...@9.3.0 i get:
==> Error: g...: Identifier cannot contain '.'
['g...@9.3.0']

did you mean :
spack install g...@9.3.0?

Preslav Aleksandrov

unread,
Sep 23, 2021, 8:23:07 AM9/23/21
to MoFEM Q&A
Oops I made the same mistake. I meant `spack install g...@9.3.0`

Preslav Aleksandrov

unread,
Sep 23, 2021, 8:25:35 AM9/23/21
to MoFEM Q&A
Ok google groups doesn't like gcc 

if the above line is spack install g c c @ 9.3.0
I get the same error as before when running spack install --only dependencies mofem-cephas ^petsc+X

Preslav Aleksandrov

unread,
Sep 23, 2021, 9:05:11 AM9/23/21
to MoFEM Q&A
This is a warning I get on every try:
==> Warning: gcc @8.4.0 cannot build optimized binaries for "zen2". Using best target possible: "zen"
==> Warning: Missing a source id for python @3.8.10

Lukasz Kaczmraczyk

unread,
Sep 23, 2021, 10:14:59 AM9/23/21
to MoFEM Q&A
Preslav, have you installed gcc @ 9.3.0

If you have, when you do, it should be listed,  as follows,
spack compiler list

Then you can force installation with it, as follows, 
spack install --only dependencies mofem-cephas%gcc AT 9.3.0 ^petsc+X
spack install --test all mofem-fracture-module%gcc AT 9.3.0 build_type=Release ^petsc+X

Instead of AT put "@"
Reply all
Reply to author
Forward
0 new messages