Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WORKSPACE: Fix Bazel 4 protobuf build error #1

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

tomtseng
Copy link
Member

@tomtseng tomtseng commented Dec 13, 2021

On my macOS machine with Bazel 4.2.1, when I try to build, I get an immediate build error:

ERROR: /private/var/tmp/_bazel_t/12fcc22211704038f32f3c5236102e5e/external/com_google_protobuf/BUILD:979:21: in proto_lang_toolchain rule @com_google_protobuf//:cc_toolchain: '@com_google_protobuf//:cc_toolchain' does not have mandatory provider 'ProtoInfo'.
ERROR: Analysis of target '//clusterers/ldd_clusterer:ldd-clusterer' failed; build aborted: Analysis of target '@com_google_protobuf//:cc_toolchain' failed

Moving the rules_proto section higher in WORKSPACE fixes this issue on my machine.

Building with this change on an Ubuntu 18.04 machine with Bazel 3 still works.

(I still can't build on macOS because of external/gbbs/gbbs/io.cc:20:11: error: use of undeclared identifier ‘M_MMAP_MAX’ but that's a separate issue.)

cc @jeshi96 @yushangdi

@tomtseng tomtseng requested review from ldhulipala, yushangdi and jeshi96 and removed request for ldhulipala, yushangdi and jeshi96 December 13, 2021 19:11
@yushangdi
Copy link
Contributor

I have the same problem. For a temporary fix, I commented out line 18-25 in gbbs/io.cc and it worked on my mac. But we should figure out a better fix.

@tomtseng tomtseng merged commit cf529ce into master Dec 14, 2021
@tomtseng tomtseng deleted the tomtseng/build-bazel4 branch December 14, 2021 16:29
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