[Bug]: undefined reference to testing::Matcher on Ubuntu 24.10
- Vorherrschende Sprache
- C++
- Sterne
- 18.1k
- Forks
- 3.2k
- Ø Merge
- 20 Std. 36 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
### 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 > const&> testing::internal::MatcherCastImpl > const&, std::__cxx11::basic_string, std::allocator > >::CastImpl(std::__cxx11::basic_string, std::allocator > const&, std::integral_constant, std::integral_constant)':
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 > const&>::Matcher(std::__cxx11::basic_string, std::allocator > 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_
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.