库链接错误
-
../chain/libgraphene_chain.a(account.cpp.o):account.cpp:(.text+0x2c75): more undefined references to
fc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' follow ../chain/libgraphene_chain.a(market.cpp.o): In function
void fc::to_variant_visitorgraphene::chain::call_order_update_operation::addgraphene::chain::asset(fc::mutable_variant_object&, char const*, graphene::chain::asset const&) const [clone .isra.113]':
market.cpp:(.text+0x8b2): undefined reference tofc::mutable_variant_object::set(std::string, fc::variant)' market.cpp:(.text+0x94c): undefined reference to
fc::mutable_variant_object::set(std::string, fc::variant)'
market.cpp:(.text+0x9bf): undefined reference tofc::mutable_variant_object::set(std::string, fc::variant)' ../chain/libgraphene_chain.a(market.cpp.o): In function
graphene::chain::call_order_update_operation::validate() const':
market.cpp:(.text+0xbfb): undefined reference tofc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' market.cpp:(.text+0xd39): undefined reference to
fc::log_message::log_message(fc::log_context, std::string, fc::variant_object)'
market.cpp:(.text+0xe41): undefined reference tofc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' market.cpp:(.text+0xfdf): undefined reference to
fc::mutable_variant_object::operator()(std::string, fc::variant)'
market.cpp:(.text+0x102e): undefined reference tofc::mutable_variant_object::set(std::string, fc::variant)' market.cpp:(.text+0x10b3): undefined reference to
fc::log_message::log_message(fc::log_context, std::string, fc::variant_object)'
market.cpp:(.text+0x10d5): undefined reference tofc::exception::exception(fc::log_message&&, long, std::string const&, std::string const&)' market.cpp:(.text+0x140e): undefined reference to
fc::mutable_variant_object::operator()(std::string, fc::variant)'
market.cpp:(.text+0x1484): undefined reference tofc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' market.cpp:(.text+0x1650): undefined reference to
fc::mutable_variant_object::operator()(std::string, fc::variant)'
market.cpp:(.text+0x16c3): undefined reference tofc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' ../chain/libgraphene_chain.a(proposal.cpp.o): In function
graphene::chain::proposal_create_operation::validate() const':
proposal.cpp:(.text+0x38f): undefined reference tofc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' ../chain/libgraphene_chain.a(proposal.cpp.o): In function
graphene::chain::proposal_update_operation::validate() const':
proposal.cpp:(.text+0x694): undefined reference tofc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' proposal.cpp:(.text+0x7dd): undefined reference to
fc::log_message::log_message(fc::log_context, std::string, fc::variant_object)'
proposal.cpp:(.text+0x8aa): undefined reference tofc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' ../chain/libgraphene_chain.a(proposal.cpp.o):proposal.cpp:(.text+0x977): more undefined references to
fc::log_message::log_message(fc::log_context, std::string, fc::variant_object)' follow
collect2: error: ld returned 1 exit status
libraries/egenesis/CMakeFiles/embed_genesis.dir/build.make:132: recipe for target 'libraries/egenesis/embed_genesis' failed
make[2]: *** [libraries/egenesis/embed_genesis] Error 1
CMakeFiles/Makefile2:863: recipe for target 'libraries/egenesis/CMakeFiles/embed_genesis.dir/all' failed
make[1]: *** [libraries/egenesis/CMakeFiles/embed_genesis.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
编译到81%出错,可以找到libgraphene_chain.a。
-
是fc库版本的问题
ubuntu14.04下,切换到master分支:cd gxb-core && git checkout . git pull && git checkout master git submodule update --init --recursive rm -rf build && mkdir -p build && cd build cmake -DOPENSSL_ROOT_DIR=/usr/bin -DOPENSSL_INCLUDE_DIR=/usr/include/openssl -DOPENSSL_LIBRARIES=/usr/lib/openssh -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j4
-
感谢大神回复。
但是为什么到81%编译速度这么慢?
似乎也没干嘛啊。
-
@albert
大神,补充一下,我用的是ubuntu16.04
-
使用ubuntu 14.04试一下