[Boost-bugs] [Boost C++ Libraries] #12635: Strange undefined reference link errors for boost_regex

Subject: [Boost-bugs] [Boost C++ Libraries] #12635: Strange undefined reference link errors for boost_regex
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-11-30 06:22:42


#12635: Strange undefined reference link errors for boost_regex
------------------------------+-------------------------
 Reporter: shzhang@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: |
------------------------------+-------------------------
 Hi,

 When I link boost library to my application, it will report lots of link
 errors, unless i have already added libboost_regex library.
 I am working on Centos6.7, gcc-4.8.4, 64bit.

 Here is the errors:
 MakeFiles/myapp.dir/source/cornerAnal.cc.o: In function
 `CustomRandomMgr::nameMatchPattern(stlp_std::basic_string<char,
 stlp_std::char_traits<char>, stlp_std::allocator<char> > const&,
 stlp_std::basic_string<char, stlp_std::char_traits<char>,
 stlp_std::allocator<char> > const&)':
 cornerAnal.cc:(.text+0x5740): undefined reference to
 `boost::re_detail_106000::perl_matcher<char const*,
 stlp_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)'
 CMakeFiles/myapp.dir/source/cornerAnal.cc.o: In function `void
 boost::re_detail_106000::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)':
 cornerAnal.cc:(.text._ZN5boost16re_detail_10600011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[_ZN5boost16re_detail_10600011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE]+0x98):
 undefined reference to
 `boost::re_detail_106000::raise_runtime_error(stlp_std::runtime_error
 const&)'
 CMakeFiles/myapp.dir/source/cornerAnal.cc.o: In function
 `boost::re_detail_106000::perl_matcher<char const*,
 stlp_std::allocator<boost::sub_match<char const*> >,
 boost::regex_traits<char, boost::cpp_regex_traits<char> >
>::match_prefix()':
 cornerAnal.cc:(.text._ZN5boost16re_detail_10600012perl_matcherIPKcN8stlp_std9allocatorINS_9sub_matchIS3_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12match_prefixEv[_ZN5boost16re_detail_10600012perl_matcherIPKcN8stlp_std9allocatorINS_9sub_matchIS3_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12match_prefixEv]+0x110):
 undefined reference to `boost::match_results<char const*,
 stlp_std::allocator<boost::sub_match<char const*> >
>::maybe_assign(boost::match_results<char const*,
 stlp_std::allocator<boost::sub_match<char const*> > > const&)'
 CMakeFiles/myapp.dir/source/cornerAnal.cc.o: In function
 `boost::re_detail_106000::perl_matcher<char const*,
 stlp_std::allocator<boost::sub_match<char const*> >,
 boost::regex_traits<char, boost::cpp_regex_traits<char> >
>::match_match()':
 cornerAnal.cc:(.text._ZN5boost16re_detail_10600012perl_matcherIPKcN8stlp_std9allocatorINS_9sub_matchIS3_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE11match_matchEv[_ZN5boost16re_detail_10600012perl_matcherIPKcN8stlp_std9allocatorINS_9sub_matchIS3_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE11match_matchEv]+0x33f):
 undefined reference to `boost::match_results<char const*,
 stlp_std::allocator<boost::sub_match<char const*> >
>::maybe_assign(boost::match_results<char const*,
 stlp_std::allocator<boost::sub_match<char const*> > > const&)'
 CMakeFiles/myapp.dir/source/cornerAnal.cc.o: In function `bool
 boost::regex_search<char const*, stlp_std::allocator<boost::sub_match<char
 const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >
>(char const*, char const*, boost::match_results<char const*,
 stlp_std::allocator<boost::sub_match<char const*> > >&,
 boost::basic_regex<char, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > > const&,
 boost::regex_constants::_match_flags, char const*)':
 cornerAnal.cc:(.text._ZN5boost12regex_searchIPKcN8stlp_std9allocatorINS_9sub_matchIS2_EEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SC_RNS_13match_resultsISC_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsESC_[_ZN5boost12regex_searchIPKcN8stlp_std9allocatorINS_9sub_matchIS2_EEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SC_RNS_13match_resultsISC_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsESC_]+0xf7):
 undefined reference to `boost::re_detail_106000::perl_matcher<char const*,
 stlp_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)'
 CMakeFiles/myapp.dir/source/fftAnal.cc.o: In function `bool
 boost::regex_match<char, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >(char const*, boost::basic_regex<char,
 boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&,
 boost::regex_constants::_match_flags)':
 fftAnal.cc:(.text._ZN5boost11regex_matchIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbPKT_RKNS_11basic_regexIS5_T0_EENS_15regex_constants12_match_flagsE[_ZN5boost11regex_matchIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbPKT_RKNS_11basic_regexIS5_T0_EENS_15regex_constants12_match_flagsE]+0x13c):
 undefined reference to `boost::re_detail_106000::perl_matcher<char const*,
 stlp_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)'
 CMakeFiles/myapp.dir/source/waveformPostMeas.cc.o: In function `bool
 boost::regex_match<char const*, stlp_std::allocator<boost::sub_match<char
 const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >
>(char const*, char const*, boost::match_results<char const*,
 stlp_std::allocator<boost::sub_match<char const*> > >&,
 boost::basic_regex<char, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > > const&,
 boost::regex_constants::_match_flags)':
 waveformPostMeas.cc:(.text._ZN5boost11regex_matchIPKcN8stlp_std9allocatorINS_9sub_matchIS2_EEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SC_RNS_13match_resultsISC_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE[_ZN5boost11regex_matchIPKcN8stlp_std9allocatorINS_9sub_matchIS2_EEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SC_RNS_13match_resultsISC_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE]+0xcb):
 undefined reference to `boost::re_detail_106000::perl_matcher<char const*,
 stlp_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)'
 CMakeFiles/myapp.dir/source/analOutput.cc.o: In function
 `analOutput::extractSignalName(char const*, stlp_std::basic_string<char,
 stlp_std::char_traits<char>, stlp_std::allocator<char> >&,
 stlp_std::basic_string<char, stlp_std::char_traits<char>,
 stlp_std::allocator<char> >&, stlp_std::basic_string<char,
 stlp_std::char_traits<char>, stlp_std::allocator<char> >&)':
 analOutput.cc:(.text+0x15fa3): undefined reference to
 `boost::re_detail_106000::perl_matcher<char const*,
 stlp_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)'
 ../kernelCommon/dist/Release_64/GNU-
 Linux-x86/libkernelcommon.a(Kernel.cc.o): In function
 `Kernel::checkNoFilterByName(char const*, int)':
 Kernel.cc:(.text+0x16686): undefined reference to
 `boost::re_detail_106000::perl_matcher<char const*,
 stlp_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)'
 ../kernelCommon/dist/Release_64/GNU-
 Linux-x86/libkernelcommon.a(kdbNodeBox.cc.o):kdbNodeBox.cc:(.text+0x51757):
 more undefined references to `boost::re_detail_106000::perl_matcher<char
 const*, stlp_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)' follow

 Thanks,
 Shaohua

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12635>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC