ubuntuインストールboost 1.66.0
8511 ワード
QTum UbuntuコンパイルBoostライブラリエラー
エラー内容
root@4f5767887f5b:/cloud/qtum/qtum# make
Making all in src
make[1]: Entering directory '/cloud/qtum/qtum/src'
make[2]: Entering directory '/cloud/qtum/qtum/src'
CXXLD qtumd
libbitcoin_common.a(libbitcoin_common_a-State.o): In function `unsigned long boost::random::detail::generate_uniform_int::random::random_device, unsigned long>(boost::random::random_device&, unsigned long, unsigned long, mpl_::bool_ )':
/usr/include/boost/random/uniform_int_distribution.hpp:115: undefined reference to `boost::random::random_device::operator()()'
/usr/include/boost/random/uniform_int_distribution.hpp:202: undefined reference to `boost::random::random_device::operator()()'
/usr/include/boost/random/uniform_int_distribution.hpp:67: undefined reference to `boost::random::random_device::operator()()'
libbitcoin_common.a(libbitcoin_common_a-State.o): In function `unsigned short boost::random::detail::generate_uniform_int::random::random_device, unsigned short>(boost::random::random_device&, unsigned short, unsigned short, mpl_::bool_ )':
/usr/include/boost/random/uniform_int_distribution.hpp:202: undefined reference to `boost::random::random_device::operator()()'
libbitcoin_common.a(libbitcoin_common_a-ICAP.o): In function `unsigned short boost::random::detail::generate_uniform_int::random::random_device, unsigned short>(boost::random::random_device&, unsigned short, unsigned short, mpl_::bool_ )':
/usr/include/boost/random/uniform_int_distribution.hpp:202: undefined reference to `boost::random::random_device::operator()()'
libbitcoin_common.a(libbitcoin_common_a-Common.o):/usr/include/boost/random/uniform_int_distribution.hpp:202: more undefined references to `boost::random::random_device::operator()()' follow
libbitcoin_common.a(libbitcoin_common_a-FixedHash.o): In function `_GLOBAL__sub_I__ZN3dev17s_fixedHashEngineE':
/cloud/qtum/qtum/src/cpp-ethereum/libdevcore/FixedHash.cpp:29: undefined reference to `boost::random::random_device::random_device()'
/cloud/qtum/qtum/src/cpp-ethereum/libdevcore/FixedHash.cpp:29: undefined reference to `boost::random::random_device::~random_device()'
collect2: error: ld returned 1 exit status
Makefile:5077: recipe for target 'qtumd' failed
make[2]: *** [qtumd] Error 1
make[2]: Leaving directory '/cloud/qtum/qtum/src'
Makefile:13546: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cloud/qtum/qtum/src'
Makefile:693: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
解決策
# boost
rm -f /usr/lib/libboost*
rm -fr 'find / -name libboost*'
# boost
mv /usr/include/boost /usr/include/boost-bak
# wget
apt-get install wget
# Boost
wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
tar -zxvf boost_1_66_0.tar.gz
cd boost_1_66_0
#
./bootstrap.sh
#
./b2 install