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

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)

Hi,

Do you have all the Spack prerequisites installed on your machine? (See https://spack.readthedocs.io/en/latest/getting_started.html#system-prerequisites)

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: opencarp.org/download/installation#install-the-opencarp-spack-package

Otherwise, a similar issue is raised here, but it is quite old: https://github.com/spack/spack/issues/1487

by (3.6k points)
Hi,

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

$HOME/.spack/linux/compilers.yaml
compilers:
- compiler:
    spec: gcc@=9.2.0
    paths:
      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 https://spack.readthedocs.io/en/latest/getting_started.html#compiler-configuration)
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
...