-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
Description
Describe the bug
In the 20211102.0 version of abseil-cpp some of the test code started using the GTEST_FLAG_GET macro. This causes the following build failures when attempting a CMake build with a pre-installed, latest released version (1.11.0) of googletest:
[ 47%] Built target absl_cord_internal_test"
absl/strings/cord_ring_test.cc: In function 'absl::lts_20211102::{anonymous}::Composition absl::lts_20211102::{anonymous}::RandomComposition()':"
absl/strings/cord_ring_test.cc:278:35: error: 'random_seed' was not declared in this scope; did you mean 'random_r'?"
278 | RandomEngine rng(GTEST_FLAG_GET(random_seed));"
| ^~~~~~~~~~~"
| random_r"
absl/strings/cord_ring_test.cc:278:20: error: 'GTEST_FLAG_GET' was not declared in this scope; did you mean 'GTEST_FLAG'?"
278 | RandomEngine rng(GTEST_FLAG_GET(random_seed));"
| ^~~~~~~~~~~~~~"
| GTEST_FLAG"
After taking a look at the GoogleTest GitHub repository it seems, that the changes introducing this macro are only present in the main branch but haven't been packed into an official release, yet.
Steps to reproduce the bug
- Install the 1.11.0 version of GoogleTest.
- Configure the
abseil-cppbuild with CMake (version >= 3.20.0) and the-DABSL_FIND_GOOGLETEST=ON -DABSL_USE_EXTERNAL_GOOGLETEST=ON -DBUILD_TESTING=ONoptions. - Build with
make.
What version of Abseil are you using?
20211102.0
What operating system and version are you using
Docker container on a Ubuntu 18.04 host.
What compiler and version are you using?
gcc: 9.1.0
What build system are you using?
cmake: 3.21.4
make: 4.2.1
Additional context
None.
musicinmybrain