any_proto weirdness under Bazel 0.15 -c opt vs fastbuild
When I link in the any_proto target and build my executable with -c opt, at startup the program tries to add any.proto to the internal descriptor pool twice and fails. With the default configuration (fastbuild), it does not do this. I can't drop any_proto as a transitive dependency because I have other messages that require the definition of the Any message. What could be going wrong, and why would it differ between build configurations?
I've got an open issue in our project (https://github.com/google/kythe/issues/2834) with more details. The target I'm trying to fix is //kythe/cxx/common:path_utils_test
It seems like the any proto is linked into the binary twice? Can you try to add a test in the protobuf code base to reproduce the issue?
Yes, that's what it looks like. Why would this only happen with -c opt? It seems to affect any target that depends (transitively) on any_proto.
Fixed by updating to protobuf 3.6.0. Further details in https://github.com/google/kythe/commit/27addcb0b06688d3b080486d57cab0459e9f0f06