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

soy:SoyToPySrcCompiler fails to compile due to out-of-line definition of 'MergePartialFromCodedStream #209

Closed
samccone opened this issue Apr 20, 2020 · 1 comment

Comments

@samccone
Copy link

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
Copy link
Author

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.

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

No branches or pull requests

1 participant