google-deepmind / sonnet

TensorFlow-based neural network library
https://sonnet.dev/
Apache License 2.0
9.75k stars 1.29k forks source link

Build with bazel 0.27 fails #134

Open timokau opened 5 years ago

timokau commented 5 years ago

The build fails due to protobuf:

DEBUG: Call stack for the definition of repository 'com_google_protobuf' which is a git_repository (rule definition at /build/output/external/bazel_tools/tools/build_defs/repo/git.bzl:252:18):
 - /build/source/WORKSPACE:5:1
ERROR: /build/output/external/com_google_protobuf/protobuf.bzl:130:19: Traceback (most recent call last):
        File "/build/output/external/com_google_protobuf/protobuf.bzl", line 125
                rule(attrs = {"srcs": attr.label_list...()}, <2 more arguments>)
        File "/build/output/external/com_google_protobuf/protobuf.bzl", line 130, in rule
                attr.label(cfg = "host", executable = True, sin..., ...)
'single_file' is no longer supported. use allow_single_file instead. You can use --incompatible_disable_deprecated_attr_params=false to temporarily disable this check.

This will be fixed upstream by https://github.com/protocolbuffers/protobuf/pull/6304, so sonnets protobuf version should be updated after that is merged.

codesuki commented 5 years ago

My fix there is for protobuf lite. As far as I can see sonnet uses normal protobuf which already has the fix since this commit https://github.com/protocolbuffers/protobuf/commit/d5f0dac497f833d06f92d246431f4f2f42509e04

Available in master or v3.9.0-rc1. Good luck!

diegolascasas commented 5 years ago

Thanks for pointing it out! This will be fixed in the next release.

diegolascasas commented 5 years ago

Just an update, we decided to postpone the update until version 3.9 is released. Meanwhile you should set --incompatible_disable_deprecated_attr_params=false if you are building with bazel. I will leave this issue open for now.