pubref / rules_kotlin

Bazel rules for Kotlin
Other
159 stars 20 forks source link

Upgrade protobuf to v3.3.0 #26

Closed marczych closed 7 years ago

marczych commented 7 years ago

The existing version of protobuf didn't work when building in a Bazel workspace with a custom CROSSTOOL that treats all warnings as errors (or at least I assume that's the cause). For example:

ERROR: /home/marc.zych/.cache/bazel/_bazel_marc.zych/45ba23047e061ecba1878da72758f36b/external/com_google_protobuf/BUILD:113:1: C++ compilation of rule '@com_google_protobuf//:protobuf' failed: gcc failed: error executing command tools/cpp/gcc-4.8/bin/gcc -nostdinc -isystem external/gcc_4_8/usr/include -isystem external/gcc_4_8/usr/include/x86_64-linux-gnu -isystem external/gcc_4_8/usr/lib/gcc/x86_64-linux-gnu/4.8/include ... (remaining 63 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/com_google_protobuf/src/google/protobuf/dynamic_message.cc: In member function 'const google::protobuf::Message* google::protobuf::DynamicMessageFactory::GetPrototypeNoLock(const google::protobuf::Descriptor*)':
external/com_google_protobuf/src/google/protobuf/dynamic_message.cc:770:22: error: missing initializer for member 'google::protobuf::internal::ReflectionSchema::weak_field_map_offset_' [-Werror=missing-field-initializers]
       type_info->size};
                      ^
cc1plus: all warnings being treated as errors
INFO: Elapsed time: 32.146s, Critical Path: 20.49s

Fortunately, this warning has been fixed in protobuf so upgrading to v3.3.0 (the latest release I could find on the releases page: https://github.com/google/protobuf/releases) fixes the issue with building these rules.

pcj commented 7 years ago

LGTM