From e4fe5dc57ba7a408c0d5c36cfb0682fbeb9e6357 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 29 Jul 2020 16:57:39 +0200 Subject: [PATCH] Fix environment for protobuf compilation Patch using upstream https://github.com/grpc/grpc/pull/23664 --- tensorflow/workspace.bzl | 1 + third_party/grpc/generate_cc_env_fix.patch | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 third_party/grpc/generate_cc_env_fix.patch diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 76d23dd81ab..b9c187733f6 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -688,6 +688,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f", strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd", system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), + patch_file = clean_dep("//third_party/grpc:generate_cc_env_fix.patch"), system_link_files = { "//third_party/systemlibs:BUILD": "bazel/BUILD", "//third_party/systemlibs:grpc.BUILD": "src/compiler/BUILD", diff --git a/third_party/grpc/generate_cc_env_fix.patch b/third_party/grpc/generate_cc_env_fix.patch new file mode 100644 index 00000000000..51832fe9628 --- /dev/null +++ b/third_party/grpc/generate_cc_env_fix.patch @@ -0,0 +1,10 @@ +--- a/bazel/generate_cc.bzl ++++ b/bazel/generate_cc.bzl +@@ -141,6 +141,7 @@ def generate_cc_impl(ctx): + outputs = out_files, + executable = ctx.executable._protoc, + arguments = arguments, ++ use_default_shell_env = True, + ) + + return struct(files = depset(out_files))