Skip to content

MINOR: [C++] Bump bundled GTest version - #51242

Merged
pitrou merged 1 commit into
apache:mainfrom
pitrou:minor-bump-gtest
Sep 8, 2026
Merged

MINOR: [C++] Bump bundled GTest version#51242
pitrou merged 1 commit into
apache:mainfrom
pitrou:minor-bump-gtest

Conversation

@pitrou

@pitrou pitrou commented Sep 8, 2026

Copy link
Copy Markdown
Member

Rationale for this change

This fixes some compilation errors with recent clang compilers, as seen on some of the C++ Extra workflow builds (on macOS, but I got similar errors on Ubuntu 24.04 with recent conda-forge compilers).

Example errors include:

/Users/runner/work/arrow/arrow/build/cpp/_deps/googletest-src/googlemock/include/gmock/internal/gmock-internal-utils.h:302:10: error: 'visibility' attribute cannot be applied to types
  302 |   friend GTEST_API_ WithoutMatchers GetWithoutMatchers();
      |          ^
/usr/local/include/gtest/internal/gtest-port.h:849:22: note: expanded from macro 'GTEST_API_'
  849 | #define GTEST_API_ [[gnu::visibility("default")]]
      |                      ^
/Users/runner/work/arrow/arrow/build/cpp/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:4741:21: error: no template named 'StringLike' in namespace 'testing::internal'; did you mean 'StringType'?
 4741 |     const internal::StringLike<T>& str) {
      |           ~~~~~~~~~~^~~~~~~~~~
      |                     StringType
/Users/runner/work/arrow/arrow/build/cpp/_deps/googletest-src/googlemock/include/gmock/gmock-spec-builders.h:1470:15: error: no matching constructor for initialization of 'MutexLock' (aka 'testing::internal::GTestMutexLock')
 1470 |     MutexLock l(&g_gmock_mutex);
      |               ^ ~~~~~~~~~~~~~~
/Users/runner/work/arrow/arrow/build/cpp/_deps/googletest-src/googlemock/include/gmock/gmock-spec-builders.h:1533:19: error: no member named 'Unlock' in 'testing::internal::MutexBase'; did you mean 'unlock'?
 1533 |     g_gmock_mutex.Unlock();
      |                   ^~~~~~
      |                   unlock

Are these changes tested?

By existing CI jobs. Also tested locally.

Are there any user-facing changes?

No.

This seems to fix some compilation errors with recent clang compilers.
@pitrou pitrou added the CI: Extra: C++ Run extra C++ CI label Sep 8, 2026
@pitrou

pitrou commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Example failing C++ Extra workflow (without these changes): https://github.com/apache/arrow/actions/runs/34227884512

@pitrou
pitrou marked this pull request as ready for review September 8, 2026 17:48
@pitrou

pitrou commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@kou This fixes all the C++ Extra failures. Do you want me to open an issue?

@pitrou

pitrou commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit -g cpp

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

We don't need to create a new issue but could you add more context/information such as real error messages to the PR description or PR comment before we merge this? It may be useful when we search our history later.

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Revision: 3779014

Submitted crossbow builds: ursacomputing/crossbow @ actions-41630fb4a0

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-debian-13-cpp-amd64 GitHub Actions
test-debian-13-cpp-i386 GitHub Actions
test-debian-experimental-cpp-gcc-15 GitHub Actions
test-fedora-42-cpp GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@pitrou

pitrou commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Okay, I update the PR description and will merge. Thank you @kou !

@pitrou
pitrou merged commit e3273f4 into apache:main Sep 8, 2026
71 of 91 checks passed
@pitrou pitrou removed the awaiting merge Awaiting merge label Sep 8, 2026
@pitrou
pitrou deleted the minor-bump-gtest branch September 8, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants