Use Boost Library compilation error

Open
#1,059 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
build-system

Research direction

Reproduce the failure while building the examples/print_results and examples/enum targets with Boost 1.65, using the reported liblepton_core.so linker output as the starting point. Inspect the CMake-generated link configuration for these targets and verify completion when both example executables link without the reported Boost regex references.

Written by the indexing model from the issue text.

Description

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

Dominant language
HTML
Stars
8.6k
Forks
2k
Avg merge
9h 35m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/boost

All issues in boostorg/boost

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.