soy:SoyToPySrcCompiler fails to compile due to out-of-line definition of 'MergePartialFromCodedStream
samccone opened this issue · 1 comments
samccone commented
Command to reproduce error
bazel build java/src/com/google/template/soy:SoyToPySrcCompiler
stack trace
ERROR: /private/var/tmp/_bazel_samccone/25533a60e16bf2fe8b86024c76fed5ee/external/com_google_protobuf/BUILD:321:1: C++ compilation of rule '@com_google_protobuf//:protoc_lib' failed (Exit 1) cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 40 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
external/com_google_protobuf/src/google/protobuf/compiler/plugin.pb.cc:353:15: error: out-of-line definition of 'MergePartialFromCodedStream' does not match any declaration in 'google::protobuf::compiler::Version'
bool Version::MergePartialFromCodedStream(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/compiler/plugin.pb.cc:768:28: error: out-of-line definition of 'MergePartialFromCodedStream' does not match any declaration in 'google::protobuf::compiler::CodeGeneratorRequest'
bool CodeGeneratorRequest::MergePartialFromCodedStream(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/compiler/plugin.pb.cc:1167:34: error: out-of-line definition of 'MergePartialFromCodedStream' does not match any declaration in 'google::protobuf::compiler::CodeGeneratorResponse_File'
bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/compiler/plugin.pb.cc:1520:29: error: out-of-line definition of 'MergePartialFromCodedStream' does not match any declaration in 'google::protobuf::compiler::CodeGeneratorResponse'
bool CodeGeneratorResponse::MergePartialFromCodedStream(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
Target //java/src/com/google/template/soy:SoyToPySrcCompiler failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 8.639s, Critical Path: 7.88s
INFO: 2 processes: 2 darwin-sandbox.
FAILED: Build did NOT complete successfully
samccone commented
Ok I think I got to the bottom here, I had an exiting proto install on my system from brew which I was able to purge by following the advice here protocolbuffers/protobuf#5376 (comment)
The curious question I have is why is the build rule in this case not hermetic.
This looks to be tracked here from the bazel team: bazelbuild/bazel#8485
closing in favor of that tracking bug.