abseil-cpp
abseil-cpp copied to clipboard
[Bug]: undefined reference to testing::Matcher on Ubuntu 24.10
Describe the issue
Following the instructions detailed in the cmake quickstart
- https://abseil.io/docs/cpp/quickstart-cmake
I obtain the following error
[ 49%] Linking CXX executable ../../bin/absl_flat_hash_set_test
/usr/bin/ld: CMakeFiles/absl_flat_hash_set_test.dir/flat_hash_set_test.cc.o: in function `testing::Matcher<std::basic_string_view<char, std::char_traits<char> > const&> testing::internal::MatcherCastImpl<std::basic_string_view<char, std::char_traits<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::CastImpl<true>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::integral_constant<bool, true>, std::integral_constant<bool, true>)':
flat_hash_set_test.cc:(.text._ZN7testing8internal15MatcherCastImplIRKSt17basic_string_viewIcSt11char_traitsIcEENSt7__cxx1112basic_stringIcS4_SaIcEEEE8CastImplILb1EEENS_7MatcherIS7_EERKSB_St17integral_constantIbLb1EESI_IbXT_EE[_ZN7testing8internal15MatcherCastImplIRKSt17basic_string_viewIcSt11char_traitsIcEENSt7__cxx1112basic_stringIcS4_SaIcEEEE8CastImplILb1EEENS_7MatcherIS7_EERKSB_St17integral_constantIbLb1EESI_IbXT_EE]+0x23): undefined reference to `testing::Matcher<std::basic_string_view<char, std::char_traits<char> > const&>::Matcher(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
gmake[2]: *** [absl/container/CMakeFiles/absl_flat_hash_set_test.dir/build.make:163: bin/absl_flat_hash_set_test] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:4065: absl/container/CMakeFiles/absl_flat_hash_set_test.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
The OS is Ubuntu 24.10. The compiler is
gcc (Ubuntu 14.2.0-4ubuntu2) 14.2.0
g++ (Ubuntu 14.2.0-4ubuntu2) 14.2.0
Steps to reproduce the problem
Follow the instructions provided in the cmake quickstart
What version of Abseil are you using?
The default version provided by
git clone https://github.com/abseil/abseil-cpp.git
What operating system and version are you using?
uname -r
6.11.0-14-generic
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.10
Release: 24.10
Codename: oracular
What compiler and version are you using?
gcc (Ubuntu 14.2.0-4ubuntu2) 14.2.0
g++ (Ubuntu 14.2.0-4ubuntu2) 14.2.0
What build system are you using?
cmake
cmake version 3.30.3
Additional context
No response
Btw, the issue is resolved if I check out tag 20251027.0