gpt4 book ai didi

mongodb - Fiware - ContextBroker - 编译 ubuntu Trusty (14.04)

转载 作者:可可西里 更新时间:2023-11-01 10:03:32 25 4
gpt4 key购买 nike

我正在尝试构建 contextbroker (Fiware/orion) 源代码,但我经历了几次困难时期。这是最后一个。我查看了缺少的依赖项,但找不到任何内容。

版本:ubuntu 可信 (14.04)

时间:

:~/fiware-orion# make

获取:

Scanning dependencies of target contextBroker
make[3]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make[3]: Entering directory `/root/fiware-orion/BUILD_RELEASE'
[ 99%] Building CXX object src/app/contextBroker/CMakeFiles/contextBroker.dir/contextBroker.cpp.o
Linking CXX executable contextBroker
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)':
/usr/include/boost/regex/v4/basic_regex.hpp:382: undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool)':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:1117: undefined reference to `boost::re_detail::put_mem_block(void*)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:447: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)':
/usr/include/boost/regex/pattern_except.hpp:75: undefined reference to `boost::re_detail::raise_runtime_error(std::runtime_error const&)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:445: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::cpp_regex_traits<char>::transform_primary(char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:923: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::cpp_regex_traits<char>::transform(char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:919: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::extend_stack()':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:213: undefined reference to `boost::re_detail::get_mem_block()'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `save_state_init':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:107: undefined reference to `boost::re_detail::get_mem_block()'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp()':
/usr/include/boost/regex/v4/perl_matcher_common.hpp:208: undefined reference to `boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `~save_state_init':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:115: undefined reference to `boost::re_detail::put_mem_block(void*)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_prefix()':
/usr/include/boost/regex/v4/perl_matcher_common.hpp:333: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > > const&)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `~save_state_init':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:115: undefined reference to `boost::re_detail::put_mem_block(void*)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `perl_matcher':
/usr/include/boost/regex/v4/perl_matcher.hpp:374: undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
/usr/local/lib/libmongoclient.a(dbclient.o): In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_match()':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:973: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > > const&)'
collect2: error: ld returned 1 exit status
make[3]: *** [src/app/contextBroker/contextBroker] Error 1
make[3]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make[2]: *** [src/app/contextBroker/CMakeFiles/contextBroker.dir/all] Error 2
make[2]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make: *** [release] Error 2

非常感谢;)

最佳答案

能够通过以下方式使其工作:

  • 将 Ubuntu 更新到 14.04.3
  • 将此添加到 src/app/contextBroker/CMakeLists.txt:

ELSEIF(${DISTRO} STREQUAL "Ubuntu_14.04.3_LTS")
MESSAGE("contextBroker: Ubuntu ===TEST===== DISTRO: '${DISTRO}'")
TARGET_LINK_LIBRARIES(contextBroker ${STATIC_LIBS} -lmicrohttpd -lmongoclient -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -lssl -lcrypto -lgnutls -lgcrypt)

  • 要使用 make unit_tests 运行单元测试,请在 test/unittests/CMakeLists.txt 中添加:

ELSEIF(${DISTRO} STREQUAL "Ubuntu_14.04.3_LTS")
MESSAGE("contextBroker: Ubuntu ===TEST===== DISTRO: '${DISTRO}'")
TARGET_LINK_LIBRARIES(unitTest ${STATIC_LIBS} -lmicrohttpd -lmongoclient -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -lssl -lcrypto -lgnutls -lgcrypt)

关于mongodb - Fiware - ContextBroker - 编译 ubuntu Trusty (14.04),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31972924/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com