mercredi 9 juin 2021

How should I do to make a version of gcc support compiling C++ programs?

I am trying to install hpctoolkit using spack. In order to do that, I executed :

git clone https://github.com/spack/spack.git
cd spack/share/spack
source setup-env.sh 
spack fetch -D hpctoolkit
spack install hpctoolkit 

I can't execute the last command because I get the following error:

Error: ProcessError: Command exited with status 1:
    './bootstrap.sh' '--prefix=/home/hakim/spack/opt/spack/linux-ubuntu20.04-haswell/gcc-10.2.0/boost-1.76.0-oc2u6jxritfsbci4xkhr5lov3i4o4riq' '--with-toolset=gcc' '--with-libraries=serialization,atomic,log,exception,regex,math,random,program_options,wave,iostreams,chrono,system,test,graph,locale,timer,filesystem,date_time,thread' '--without-icu'

It recommended me to take a look at build log by displaying the following message:

See build log for details:
  /tmp/hakim/spack-stage/spack-stage-boost-1.76.0-oc2u6jxritfsbci4xkhr5lov3i4o4riq/spack-build-out.txt

and the previous file contains:

A C++11 capable compiler is required for building the B2 engine.
Toolset 'gcc' does not appear to support C++11.

> g++ -x c++ -std=c++11  check_cxx11.cpp
ERROR: Compiler 'gcc@10.2.0' does not support compiling C++ programs.

While reading a little bit the Spack notation, I learned that ’@’ specifies the package version so I guess that the version of gcc I'm using does not support compiling C++ programs.

How should I do to make it support compiling C++ programs ? Any help, please ?

Aucun commentaire:

Enregistrer un commentaire