gpt4 book ai didi

c++ - Wangle:/usr/local/lib/libfolly.so: 对 boost::re_detail_106000 的 undefined reference

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:12:23 27 4
gpt4 key购买 nike

我在安装Wangle的时候遇到了如下问题。我已经安装了 Boost,但我不知道为什么。

[ 65%] Built target wangle
Linking CXX executable bin/AcceptorTest
/usr/bin/ld: warning: libboost_filesystem.so.1.54.0, needed by /usr/local/lib/libfolly.so, may conflict with libboost_filesystem.so.1.61.0
/usr/bin/ld: warning: libboost_system.so.1.54.0, needed by /usr/local/lib/libfolly.so, may conflict with libboost_system.so.1.61.0
/usr/local/lib/libfolly.so: undefined reference to `boost::re_detail_106000::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, 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/libfolly.so: undefined reference to `boost::re_detail_106000::get_mem_block()'
/usr/local/lib/libfolly.so: undefined reference to `boost::re_detail_106000::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
/usr/local/lib/libfolly.so: undefined reference to `boost::re_detail_106000::verify_options(unsigned int, boost::regex_constants::_match_flags)'
/usr/local/lib/libfolly.so: undefined reference to `boost::re_detail_106000::get_default_error_string(boost::regex_constants::error_type)'
/usr/local/lib/libfolly.so: undefined reference to `boost::re_detail_106000::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/libfolly.so: undefined reference to `boost::re_detail_106000::put_mem_block(void*)'
/usr/local/lib/libfolly.so: undefined reference to `boost::re_detail_106000::raise_runtime_error(std::runtime_error const&)'
/usr/local/lib/libfolly.so: undefined reference to `boost::re_detail_106000::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
collect2: error: ld returned 1 exit status

make[2]: *** [bin/AcceptorTest] Error 1

make[1]: *** [CMakeFiles/AcceptorTest.dir/all] Error 2

make: *** [all] Error 2

enter image description here

最佳答案

使用 clang 而不是 gcc,删除 CMakeList.txt 中的原子检查并禁用测试,使 wangle 在 Arch 上为我构建。

目前无法使用 GCC 7 构建 (Issue) GCC 5 向我提出了与您类似的问题。

CC=clang CXX=clang cmake 。 -DBUILD_TEST=0

(上面的代码不包括您需要自己在 CMakeList.txt 中删除的原子检查!只需搜索 atomic。)

关于c++ - Wangle:/usr/local/lib/libfolly.so: 对 boost::re_detail_106000 的 undefined reference ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39076383/

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