Use Boost Library compilation error

未关闭
#1,059 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
cpp
领域
build-system

调研方向

使用已报告的 liblepton_core.so 链接器输出作为起点,使用 Boost 1.65 构建 targets examples/print_results 和 examples/enum 时重现该失败。检查 CMake 为这些 targets 生成的链接配置,并在两个示例可执行文件都能在没有已报告的 Boost regex 引用的情况下完成链接时验证完成情况。

由索引模型根据 Issue 内容生成。

描述

My boost library version is 1.65. Then, when compiling the code, an exception occurred. The exception is as follows:

/usr/bin/ld: ../../lib/liblepton_core.so: undefined reference to boost::re_detail_106501::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, 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/bin/ld: ../../lib/liblepton_core.so: undefined reference to boost::re_detail_106501::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >, boost::regex_traits<char, boost::cpp_regex_traits > >::find()'
/usr/bin/ld: ../../lib/liblepton_core.so: undefined reference to boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)' collect2: error: ld returned 1 exit status /usr/bin/ld: ../../lib/liblepton_core.so: undefined reference to boost::re_detail_106501::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >, boost::regex_traits<char, boost::cpp_regex_traits > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits > > const&, boost::regex_constants::_match_flags)'
/usr/bin/ld: ../../lib/liblepton_core.so: undefined reference to boost::re_detail_106501::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find()' /usr/bin/ld: ../../lib/liblepton_core.so: undefined reference to boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits > >::do_assign(char const*, char const*, unsigned int)'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/print_results/CMakeFiles/print_results.dir/build.make:127:bin/print_results] error 1
make[2]: *** [examples/enum/CMakeFiles/enum.dir/build.make:127:bin/enum] error 1
make[1]: *** [CMakeFiles/Makefile2:295:examples/print_results/CMakeFiles/print_results.dir/all] error 2
make[1]: *** [CMakeFiles/Makefile2:243:examples/enum/CMakeFiles/enum.dir/all] error 2

I'm not sure if it's caused by the high boost version

主要语言
HTML
星标
8.6k
派生
2k
平均合并
9 小时 35 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

boostorg/boost 的其他 Issue

查看 boostorg/boost 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。