diff --git a/third_party/protobuf/protobuf.patch b/third_party/protobuf/protobuf.patch index 8ce4a84375..d77e1f81f3 100644 --- a/third_party/protobuf/protobuf.patch +++ b/third_party/protobuf/protobuf.patch @@ -1,25 +1,25 @@ diff --git a/BUILD b/BUILD -index dbae719ff..87dc38470 100644 +index 79871d621..096967b99 100644 --- a/BUILD +++ b/BUILD -@@ -23,7 +23,7 @@ config_setting( +@@ -26,7 +26,7 @@ config_setting( # ZLIB configuration ################################################################################ - + -ZLIB_DEPS = ["@zlib//:zlib"] +ZLIB_DEPS = ["@zlib"] - + ################################################################################ # Protobuf Runtime Library -@@ -143,6 +143,7 @@ cc_library( +@@ -156,6 +156,7 @@ cc_library( copts = COPTS, includes = ["src/"], linkopts = LINK_OPTS, + alwayslink = 1, visibility = ["//visibility:public"], ) - -@@ -213,6 +214,7 @@ cc_library( + +@@ -228,6 +229,7 @@ cc_library( copts = COPTS, includes = ["src/"], linkopts = LINK_OPTS, @@ -27,17 +27,24 @@ index dbae719ff..87dc38470 100644 visibility = ["//visibility:public"], deps = [":protobuf_lite"] + PROTOBUF_DEPS, ) +@@ -900,7 +902,6 @@ py_proto_library( + py_extra_srcs = glob(["python/**/__init__.py"]), + py_libs = [ + ":python_srcs", +- "@six//:six", + ], + srcs_version = "PY2AND3", + visibility = ["//visibility:public"], diff --git a/protobuf.bzl b/protobuf.bzl -index e0653321f..253d9cbb5 100644 +index 829464d44..4ac23594b 100644 --- a/protobuf.bzl +++ b/protobuf.bzl -@@ -84,7 +84,9 @@ def _proto_gen_impl(ctx): - +@@ -87,6 +87,8 @@ def _proto_gen_impl(ctx): for dep in ctx.attr.deps: import_flags += dep.proto.import_flags deps += dep.proto.deps + import_flags = depset(import_flags).to_list() + deps = depset(deps).to_list() - + if not ctx.attr.gen_cc and not ctx.attr.gen_py and not ctx.executable.plugin: - return struct( + return struct( diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index ead41e83c3..448fbee13f 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -476,14 +476,14 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): tf_http_archive( name = "com_google_protobuf", patch_file = clean_dep("//third_party/protobuf:protobuf.patch"), - sha256 = "cfcba2df10feec52a84208693937c17a4b5df7775e1635c1e3baffc487b24c9b", - strip_prefix = "protobuf-3.9.2", + sha256 = "a79d19dcdf9139fa4b81206e318e33d245c4c9da1ffed21c87288ed4380426f9", + strip_prefix = "protobuf-3.11.4", system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"), system_link_files = { "//third_party/systemlibs:protobuf.bzl": "protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", - "https://github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz", ], )