Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: undefined reference to testing::Matcher on Ubuntu 24.10 #1832

Open
edbird opened this issue Feb 10, 2025 · 1 comment
Open

[Bug]: undefined reference to testing::Matcher on Ubuntu 24.10 #1832

edbird opened this issue Feb 10, 2025 · 1 comment

Comments

@edbird
Copy link

edbird commented Feb 10, 2025

Describe the issue

Following the instructions detailed in the cmake quickstart

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

@edbird
Copy link
Author

edbird commented Feb 10, 2025

Btw, the issue is resolved if I check out tag 20251027.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant