Skip to content

Deprecation warnings with Abseil 20260526.0 cause build failures with -Werror #16354

Description

@hiroyuki-sato

Hello, team. I am sharing this as a potential compatibility issue and for reference.

Does this issue affect the google-cloud-cpp project?

Yes. This issue concerns compatibility between the google-cloud-cpp source code and Abseil 20260526.0. It is not related to a Google Cloud service.

What component of google-cloud-cpp is this related to?

This appears to affect the common/core code, particularly:

  • google/cloud/stream_range.h

I encountered the problem while building with the Storage component enabled.

Describe the bug

Building google-cloud-cpp 3.8.0 against Abseil LTS 20260526.0 produces deprecation warnings for pre-C++17 Abseil polyfill APIs.

When deprecation warnings are treated as errors, for example with -Werror or -Werror=deprecated-declarations, these warnings cause the build to fail.

Abseil LTS 20260526.0 deprecated many pre-C++17 polyfill types and related APIs and recommends migrating to their std:: equivalents:

https://github.com/abseil/abseil-cpp/releases/tag/20260526.0

For example, the following use of cause a warning.

/tmp/google-cloud-cpp-3.8.0/google/cloud/stream_range.h:208:11:
warning: 'visit<UnpackVariant, std::variant<...>>' is deprecated
[-Wdeprecated-declarations]
  208 |     absl::visit(UnpackVariant{*this}, std::move(v));
      |           ^

Apache Arrow encountered a related CI failure:
apache/arrow#50868

Homebrew release Abseil 20260526.0 on 2026-08-10
https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/a/abseil.rb

To Reproduce Steps to reproduce the behavior:

  1. brew install abseil
  2. Download or check out google-cloud-cpp 3.8.0.
  3. Configure it with deprecation warnings treated as errors and build the project
cmake -S . -B cmake-out \
  -G Ninja \
  -DCMAKE_PREFIX_PATH=/tmp/local \
  -Dabsl_DIR="$(brew --prefix abseil)/lib/cmake/absl" \
  -DBUILD_TESTING=OFF \
  -DGOOGLE_CLOUD_CPP_ENABLE=storage

cmake --build cmake-out

Expected behavior

google-cloud-cpp should compile against Abseil 20260526.0 without producing deprecation warnings from its own source code.

Operating system: : macOS 26.5.2

What compiler and version are you using?

c++ -v
Apple clang version 21.0.0 (clang-2100.1.1.101)
Target: arm64-apple-darwin25.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

What version of google-cloud-cpp are you using? google-cloud-cpp 3.8.0

Additional context Add any other context about the problem here.

Best regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions