Unable to build bazel distribution on mac
Description of the bug:
Hi,
I'm trying to build a bazel distro on mac, but I'm running into some issues:
~/d/urbancompass►cd ~/Downloads/bazel-6.0.0-dist/ (evanarb/bazel-upgrade|💩) 11:29
~/D/bazel-6.0.0-dist►./compile.sh 12:29
🍃 Building Bazel from scratch......
🍃 Building Bazel with Bazel.
.DEBUG: /var/folders/vx/w42hd34s3mqd6g08p42qt0th0000gp/T/bazel_TtJPf8uj/out/external/build_bazel_rules_nodejs/index.bzl:122:10: WARNING: check_rules_nodejs_version has been removed. This is a no-op, please remove the call.
INFO: Analyzed target //src:bazel_nojdk (384 packages loaded, 10459 targets configured).
INFO: Found 1 target...
[0 / 253] [Prepa] @upb//upbc:protoc-gen-upb
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.devtools.build.lib.unsafe.StringUnsafe (file:/private/var/folders/vx/w42hd34s3mqd6g08p42qt0th0000gp/T/bazel_TtJPf8uj/archive/libblaze.jar) to constructor java.lang.String(byte[],byte)
WARNING: Please consider reporting this to the maintainers of com.google.devtools.build.lib.unsafe.StringUnsafe
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
INFO: From Linking src/main/java/net/starlark/java/eval/libcpu_profiler.so:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ERROR: /var/folders/vx/w42hd34s3mqd6g08p42qt0th0000gp/T/bazel_TtJPf8uj/out/external/com_google_protobuf/BUILD:207:11: Compiling src/google/protobuf/util/message_differencer.cc [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target @com_google_protobuf//:protobuf)
(cd /var/folders/vx/w42hd34s3mqd6g08p42qt0th0000gp/T/bazel_TtJPf8uj/out/execroot/io_bazel && \
exec env - \
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Users/evan.arbeitman/Library/Python/3.9/bin:/Users/evan.arbeitman/.jenv/shims:/Users/evan.arbeitman/.jenv/bin \
PWD=/proc/self/cwd \
external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/darwin-opt-exec-EDC14992/bin/external/com_google_protobuf/_objs/protobuf/message_differencer.d '-frandom-seed=bazel-out/darwin-opt-exec-EDC14992/bin/external/com_google_protobuf/_objs/protobuf/message_differencer.o' '-DBAZEL_CURRENT_REPOSITORY="com_google_protobuf"' -iquote external/com_google_protobuf -iquote bazel-out/darwin-opt-exec-EDC14992/bin/external/com_google_protobuf -iquote . -iquote bazel-out/darwin-opt-exec-EDC14992/bin -isystem external/com_google_protobuf/src -isystem bazel-out/darwin-opt-exec-EDC14992/bin/external/com_google_protobuf/src -isystem third_party/zlib -isystem bazel-out/darwin-opt-exec-EDC14992/bin/third_party/zlib -g0 -g0 -DHAVE_ZLIB -Wmissing-field-initializers -Woverloaded-virtual -Wno-sign-compare -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/com_google_protobuf/src/google/protobuf/util/message_differencer.cc -o bazel-out/darwin-opt-exec-EDC14992/bin/external/com_google_protobuf/_objs/protobuf/message_differencer.o)
# Configuration: 7049231504ff0d7c6aa9d8d62d0e7f20ede027bb2954e18049d0227535360f89
# Execution platform: //:default_host_platform
external/com_google_protobuf/src/google/protobuf/util/message_differencer.cc:336:47: error: out-of-line definition of 'scope' does not match any declaration in 'google::protobuf::util::MessageDifferencer'
MessageDifferencer::Scope MessageDifferencer::scope() { return scope_; }
^~~~~
/usr/local/include/google/protobuf/util/message_differencer.h:574:9: note: member declaration does not match because it is const qualified
Scope scope() const;
^ ~~~~~
external/com_google_protobuf/src/google/protobuf/util/message_differencer.cc:350:21: error: out-of-line definition of 'repeated_field_comparison' does not match any declaration in 'google::protobuf::util::MessageDifferencer'
MessageDifferencer::repeated_field_comparison() {
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/util/message_differencer.h:590:27: note: member declaration does not match because it is const qualified
RepeatedFieldComparison repeated_field_comparison() const;
^ ~~~~~
2 errors generated.
Target //src:bazel_nojdk failed to build
INFO: Elapsed time: 38.451s, Critical Path: 10.57s
INFO: 715 processes: 647 internal, 68 local.
FAILED: Build did NOT complete successfully
ERROR: Could not build Bazel
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Download
bazel-6.0.0-dist/ - Unzip archive
- CD into expanded folder
- Run
./compile.sh
Which operating system are you running Bazel on?
MacOS Monterey
What is the output of bazel info release?
release 6.0.0-homebrew
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
N/A
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Hi @EArbeitman, Could you please provide more details on the above issue. Am not able to reproduce with the same given instructions.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage in a comment here and we'll take a look. Thanks!