First time here? Checkout the FAQ!
0 votes
by (3.6k points)

I am trying to use the spack package to run openCARP in a machine with centos 7. However, when I tried to run the installation of the packages I get this message "configure: error: C compiler cannot create executables"

Any idea on how to fix it?

1 Answer

0 votes
by (3.4k points)


Do you have all the Spack prerequisites installed on your machine? (See

If your compiler is taken from a module, it is also likely that you have to provide information about your compiler in the Spack configuration:

Otherwise, a similar issue is raised here, but it is quite old:

by (3.6k points)

Yes, all the prerequierements are installed and my compiler.yaml file is:

- compiler:
    spec: gcc@=9.2.0
      cc: /usr/bin/gcc
      cxx: /usr/bin/g++
      f77: /usr/bin/gfortran
      fc: /usr/bin/gfortran
    flags: {}
    operating_system: centos7
    target: x86_64
    modules: [compiler/gnu/9.2.0]
    environment: {}
    extra_rpaths: []
by (3.4k points)
What comes to my mind: are you sure the path to the executables is right? Executables from modules are usually not located in /usr/bin.
by (3.4k points)
You can also run the command "spack compiler find" to run auto-detection of the compiler, if you didn't do it that way (see
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance