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 '[email protected]' 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 ?
As you can see in the error, compiler '[email protected]' does not support compiling C++ programs.
In order to display the compilers, use the command:
Before retiring the misleading version, I had the following result for the previous command:
In order to get rid of the version '[email protected]', I modified
compilers.yaml
which is a separate file to store information about available compilers. This file is normally in your home directory at~/.spack/platform
where‘platform’
is normally‘linux’
(or else‘cray’
or‘bgq’
).In my case, I did:
and found (I'm displaying only the part related to the gcc compiler):
In order to get rid of [email protected], just delete its part. Verify now the list of compilers and you should find:
Last step:
Now, Everything is OK.