v3 compilation fails when using --prefix option
garceri opened this issue · comments
This is a server rurnning Ubuntu 18.04LTS
GCC v7.3.0
Boost 1.66
Compiling using
./install.sh --build-png --build-icu --build-zlib --build-png --build-qrencode --build-boost --build-zmq
Suceeds, while using
./install.sh --build-png --build-icu --build-zlib --build-png --build-qrencode --build-boost --build-zmq --prefix=/opt/libbitcoin3
Fails with:
/opt/libbitcoin3/include/boost/multiprecision/cpp_int.hpp:181:56: error: right operand of shift expression ‘(1 << 63)’ is >= than the precision of the left operand [-fpermissive] BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits - 1)); ~~~^~~~~~~~~~~~~~~~~~ /opt/libbitcoin3/include/boost/multiprecision/cpp_int.hpp:401:56: error: right operand of shift expression ‘(1 << 63)’ is >= than the precision of the left operand [-fpermissive] BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits - 1)); ~~~^~~~~~~~~~~~~~~~~~ /opt/libbitcoin3/include/boost/multiprecision/cpp_int.hpp:548:56: error: right operand of shift expression ‘(1 << 63)’ is >= than the precision of the left operand [-fpermissive] BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits - 1)); ~~~^~~~~~~~~~~~~~~~~~ Makefile:3030: recipe for target 'src/chain/src_libbitcoin_la-point.lo' failed
@garceri This is a known issue. Boost version 1.57.0 does not compile cleanly with gcc7 or gcc8. Your options are to 1) Use gcc-5 if it's supported on your system (by prefixing your ./install.sh
line with CC=gcc-5 CXX=g++-5 ./install.sh
), or 2) Edit the install.sh to include a later version of boost (such as 1.62 or above).
@thecodefactory As i said, i'm using boost 1.66, modified install.sh to use 1.66 instead of 1.57
@pmienk Did we have a solution for this? I suppose either we could upgrade boost, or downgrade the warning/error for this? I thought the -isystem
option should have taken care of that though ...
@thecodefactory As i said, i'm using boost 1.66, modified install.sh to use 1.66 instead of 1.57
Ok, that wasn't clear to me, as it read as though it was a system installed boost version.
You seem to have a bigger issue then, as boost 1.66.0 does not have the lines that appear to be erroring. If you rm -rf /opt/libbitcoin3
and build boost again, you still have this error?
Looks like cleaning up the directory resolved the issue, thanks a lot!
@garceri No problem, glad to hear!