Currently, ./build.sh doesn’t seem to respect CXX
and CXXFLAGS
. This
becomes more obvious when you build depends with CC
and CXX
set,
without another compiler installed. i.e when using g++-8
on Ubuntu
Bionic, but not having g++
(GGC-7) installed. The native_b2 build will
fail with:
0make -C depends/ -j9 CC=gcc-8 CXX=g++-8
1...
2/bitcoin/depends/sources/boost_1_71_0.tar.bz2: OK
3Preprocessing native_b2...
4Configuring native_b2...
5Building native_b2...
6B2_TOOLSET is gcc, but the 'gcc' command cannot be executed.
7Make sure 'gcc' is in PATH, or use a different toolset.
Instead, don’t set CXX or CXXFLAGS before calling build.sh
.
In this case, we either get the default CXX (g++
), or, we’ll get the CXX set by the user. i.e:
0make -C depends/ -j9 CC=gcc-8 CXX=g++-8
1...
2/bitcoin/depends/sources/boost_1_71_0.tar.bz2: OK
3Preprocessing native_b2...
4Configuring native_b2...
5Building native_b2...
6g++-8 --version
7g++-8 (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
8Copyright (C) 2018 Free Software Foundation, Inc.
9This is free software; see the source for copying conditions. There is NO
10warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12g++-8 -x c++ -std=c++11 -O2 -s .... <snip>