Build issue utilizing Boost::regex
Hi, I am trying to upgrade from Boost 1.73 to Boost 1.76 and down to only one consumer left that will not build. This appears to be an issue with Boost::regex. I noticed this in the Boost 1.76 release notes.. "Regex is now header only except in C++03 mode." Clang defaults to C++14, but I noticed BOOST_REGEX_CXX03 is defined. The project does not specify a particular C++ version so it should be using C++14. The functions below exist in the Boost 1.73 Boost::regex library but not in the 1.76 library. The project in question uses the function regex_match(). Any hints as to how to resolve this? ld: error: undefined symbol: boost::scoped_static_mutex_lock::scoped_static_mutex_lock(boost::static_mutex&, bool)
referenced by Config.cpp � Config.o:(boost::object_cache<boost::re_detail_500::cpp_regex_traits_base<char>, boost::re_detail_500::cpp_regex_traits_implementation<char> ::get(boost::re_detail_500::cpp_regex_traits_base<char> const&, unsigned long)) referenced by Config.cpp � Config.o:(boost::cpp_regex_traits<char>::get_catalog_name()) referenced by Config.cpp � Config.o:(boost::re_detail_500::save_state_init::~save_state_init()) referenced 2 more times
ld: error: undefined symbol: boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()
referenced by Config.cpp � Config.o:(boost::object_cache<boost::re_detail_500::cpp_regex_traits_base<char>, boost::re_detail_500::cpp_regex_traits_implementation<char> ::get(boost::re_detail_500::cpp_regex_traits_base<char> const&, unsigned long)) referenced by Config.cpp � Config.o:(boost::object_cache<boost::re_detail_500::cpp_regex_traits_base<char>, boost::re_detail_500::cpp_regex_traits_implementation<char> ::get(boost::re_detail_500::cpp_regex_traits_base<char> const&, unsigned long)) referenced by Config.cpp � Config.o:(boost::cpp_regex_traits<char>::get_catalog_name()) referenced 5 more times c++: error: linker command failed with exit code 1 (use -v to see invocation)
On 28/05/2021 17:41, Brad Smith via Boost-users wrote:
Hi,
I am trying to upgrade from Boost 1.73 to Boost 1.76 and down to only one consumer left that will not build. This appears to be an issue with Boost::regex.
I noticed this in the Boost 1.76 release notes..
"Regex is now header only except in C++03 mode."
Clang defaults to C++14, but I noticed BOOST_REGEX_CXX03 is defined. The project does not specify a particular C++ version so it should be using C++14.
Are you defining BOOST_REGEX_RECURSIVE? That would force it into legacy-mode.
The functions below exist in the Boost 1.73 Boost::regex library but not in the 1.76 library.
Hmm, that's strange, do you have a test case? We do test C++03 legacy mode in CI, so this should all still be working, plus nothing should actually have changed in those classes compared to 1.73. Best, John. -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
On 5/28/2021 3:12 PM, John Maddock via Boost-users wrote:
On 28/05/2021 17:41, Brad Smith via Boost-users wrote:
Hi,
I am trying to upgrade from Boost 1.73 to Boost 1.76 and down to only one consumer left that will not build. This appears to be an issue with Boost::regex.
I noticed this in the Boost 1.76 release notes..
"Regex is now header only except in C++03 mode."
Clang defaults to C++14, but I noticed BOOST_REGEX_CXX03 is defined. The project does not specify a particular C++ version so it should be using C++14.
Are you defining BOOST_REGEX_RECURSIVE? That would force it into legacy-mode.
I do not see that anywhere in the project in question and checking to see if that is defined it does not appear to be the case.
The functions below exist in the Boost 1.73 Boost::regex library but not in the 1.76 library.
Hmm, that's strange, do you have a test case? We do test C++03 legacy mode in CI, so this should all still be working, plus nothing should actually have changed in those classes compared to 1.73.
No. I can give you access to my system if you want to take a look around.
participants (2)
-
Brad Smith
-
John Maddock