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

//:protobuf_lite fails to compile with bazel with commit adding any_lite.cc to :protobuf_lite #6119

Closed
jschaf opened this issue May 9, 2019 · 1 comment

Comments

@jschaf
Copy link

jschaf commented May 9, 2019

What version of protobuf and what language are you using?
Version: master
Language: build-failure

What operating system (Linux, Windows, ...) and version?
MacOS 10.14.4

What runtime / compiler are you using (e.g., python version or gcc version)

$ bazel version
Build label: 0.25.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed May 1 21:47:49 2019 (1556747269)
Build timestamp: 1556747269
Build timestamp as int: 1556747269

What did you do?
Steps to reproduce the behavior:

git checkout master
git bisect start
git bisect bad
git bisect good 'HEAD~200'
git bisect run bazel build :protobuf_lite

Failing commit is: 9fd18ae

9fd18ae9a586b31d67031da01e3e5a80d0ede388 is the first bad commit
commit 9fd18ae9a586b31d67031da01e3e5a80d0ede388
Author: Yilun Chong <yilunchong@google.com>
Date:   Tue Feb 26 13:55:31 2019 -0800

    fix BUILD for adding any_lite.cc

:100644 100644 e9e108377ad48dd752d98a211e90376cd3633442 0189fd9b51bbf7b7a2b730ca2b3ddffccea4868b M      BUILD

What did you expect to see
Bazel should compile cleanly.

What did you see instead?

Compile errors:

src/google/protobuf/any_lite.cc:60:19: error: out-of-line definition of 'InternalPackFrom' does not match any declaration in 'google::protobuf::internal::AnyMetadata'
void AnyMetadata::InternalPackFrom(const MessageLite& message,
                  ^~~~~~~~~~~~~~~~
src/google/protobuf/any_lite.cc:69:19: error: out-of-line definition of 'InternalUnpackTo' does not match any declaration in 'google::protobuf::internal::AnyMetadata'
bool AnyMetadata::InternalUnpackTo(StringPiece type_name,
                  ^~~~~~~~~~~~~~~~
src/google/protobuf/any_lite.cc:71:19: error: no viable conversion from 'google::protobuf::StringPiece' to 'const google::protobuf::Descriptor *'
  if (!InternalIs(type_name)) {
                  ^~~~~~~~~

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

@jschaf
Copy link
Author

jschaf commented May 9, 2019

The problem was incompatible libraries installed by homebrew. The fix for me is from #5376

Deleting /usr/local/Cellar/protobuf directory resolved a similar issue for me.

Related issues:
bazelbuild/bazel#8053

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