Skip to content

build: align the Bazel dependency versions with CMake - #1311

Merged
taku910 merged 1 commit into
google:masterfrom
BYVoid:claude/abseil-cpp-bcr-20260817
Aug 28, 2026
Merged

taku910 merged 1 commit into
google:masterfrom
BYVoid:claude/abseil-cpp-bcr-20260817

Conversation

@BYVoid

@BYVoid BYVoid commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

MODULE.bazel and CMakeLists.txt pinned different versions of the shared dependencies. This takes all three from the Bazel Central Registry at the versions CMakeLists.txt already uses, which also removes both git_override entries:

Dependency CMake Bazel (before) Bazel (after)
abseil-cpp 20260817.0 20250814.1 + git_override tag 20260817.0 20260817.0
protobuf v36.0 35.0 36.0.bcr.1
googletest v1.18.0 1.16.0 + git_override branch main 1.18.0.bcr.1

Dropping the overrides means the build no longer clones abseil and googletest at fetch time, and pinning googletest to a release instead of tracking main makes the build reproducible.

protobuf is pinned to 36.0.bcr.1 rather than 36.0 because 36.0 records the wrong SHA256 for protoc-36.0-osx-aarch_64.zip in its tool_integrity.bzl, which breaks the fetch of the prebuilt protoc on macOS arm64. 36.0.bcr.1 patches that entry.

Verified

macOS arm64, Bazel 9.1.1, with the default toolchain and no extra flags: bazel build //... (56 targets) and bazel test //... (22 of 22 tests pass).

@google-cla

google-cla Bot commented Aug 26, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@BYVoid
BYVoid force-pushed the claude/abseil-cpp-bcr-20260817 branch 3 times, most recently from ddf8c6e to 3d1d020 Compare August 26, 2026 19:33
@BYVoid BYVoid changed the title build: take abseil-cpp 20260817.0 from the BCR build: align the Bazel dependency versions with CMake Aug 26, 2026
@taku910

taku910 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR!
Regarding the osx-aarch_64 checksum failure for protobuf 36.0: BCR has already yanked 36.0 and published 36.0.bcr.1 which includes a patch fixing the exact tool_integrity.bzl checksum for macOS arm64.
Could you update MODULE.bazel to use 36.0.bcr.1 for protobuf and update MODULE.bazel.lock?

bazel_dep(name = "protobuf", version = "36.0.bcr.1", repo_name = "com_google_protobuf")

MODULE.bazel and CMakeLists.txt pinned different versions of the shared
dependencies. Take all three from the Bazel Central Registry at the
versions CMakeLists.txt already uses, which also removes the two
git_override entries:

  abseil-cpp  20250814.1 (git_override v20260817.0) -> 20260817.0
  protobuf    35.0                                  -> 36.0.bcr.1
  googletest  1.16.0 (git_override branch = main)   -> 1.18.0.bcr.1

protobuf 36.0.bcr.1 is used rather than 36.0 because 36.0 records the
wrong SHA256 for protoc-36.0-osx-aarch_64.zip in tool_integrity.bzl,
which breaks the fetch of the prebuilt protoc on macOS arm64.

Pinning googletest to a release instead of tracking the main branch also
makes the build reproducible.
@BYVoid
BYVoid force-pushed the claude/abseil-cpp-bcr-20260817 branch from 3d1d020 to de9e462 Compare August 27, 2026 17:01
@BYVoid

BYVoid commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, that was exactly it — updated.

MODULE.bazel now uses 36.0.bcr.1, and MODULE.bazel.lock is regenerated. I confirmed on macOS arm64 (Bazel 9.1.1) that the prebuilt protoc fetch now succeeds with no extra flags: bazel build //... builds all 56 targets and bazel test //... passes 22 of 22.

The PR description is updated too, so it no longer describes the checksum failure as an open issue.

@taku910
taku910 merged commit 12c3be4 into google:master Aug 28, 2026
34 checks passed
@BYVoid
BYVoid deleted the claude/abseil-cpp-bcr-20260817 branch August 28, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants