abseil / abseil/abseil-cpp

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

未關閉
#1,832 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
18.1k
分支
3.2k
平均合併
20 小時 36 分鐘
30 天內合併 PR
1

描述

### 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_

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。