From fe882553c988a9656553b69bcca078e9bbbdaf6b Mon Sep 17 00:00:00 2001 From: Alexandre Strube <a.strube@fz-juelich.de> Date: Mon, 14 Dec 2020 15:10:39 +0000 Subject: [PATCH] Bazel 3.6.0 (removes 3.4.1) for TensorFlow --- .pre-commit-config.yaml | 5 ++++ .../b/Bazel/Bazel-3.4.1-fix-grpc-protoc.patch | 27 +++++++++++++++++++ .../Bazel-3.4.1_fix_protobuf_libstdc.patch | 10 ------- ...-9.3.0.eb => Bazel-3.6.0-GCCcore-9.3.0.eb} | 13 ++++++--- 4 files changed, 42 insertions(+), 13 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 Golden_Repo/b/Bazel/Bazel-3.4.1-fix-grpc-protoc.patch delete mode 100644 Golden_Repo/b/Bazel/Bazel-3.4.1_fix_protobuf_libstdc.patch rename Golden_Repo/b/Bazel/{Bazel-3.4.1-GCCcore-9.3.0.eb => Bazel-3.6.0-GCCcore-9.3.0.eb} (63%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..9e2cc1e3e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: +- repo: https://github.com/pre-commit/mirrors-autopep8 + rev: '' # Use the sha / tag you want to point at + hooks: + - id: autopep8 \ No newline at end of file diff --git a/Golden_Repo/b/Bazel/Bazel-3.4.1-fix-grpc-protoc.patch b/Golden_Repo/b/Bazel/Bazel-3.4.1-fix-grpc-protoc.patch new file mode 100644 index 000000000..ecc4021a0 --- /dev/null +++ b/Golden_Repo/b/Bazel/Bazel-3.4.1-fix-grpc-protoc.patch @@ -0,0 +1,27 @@ +From cd3c41eb5a29ca475b7bafc42aa71e94363d46df Mon Sep 17 00:00:00 2001 +From: Alexander Grund <alexander.grund@tu-dresden.de> +Date: Tue, 28 Jul 2020 19:51:13 +0200 +Subject: [PATCH] Fix environment for protobuf compilation in grpc + +Add use_default_shell_env = True to protoc invocation for grpc to mirror +what the protobuf cc_proto_library & co are doing +Fixes a failure in invocing protoc when it is build in a non-default +environment (e.g. with a custom LD_LIBRARY_PATH) + +Fixes #11852, fixes #11855 +--- + third_party/grpc/bazel/generate_cc.bzl | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/third_party/grpc/bazel/generate_cc.bzl b/third_party/grpc/bazel/generate_cc.bzl +index 38a5b460f90..d5a4e27bc88 100644 +--- a/third_party/grpc/bazel/generate_cc.bzl ++++ b/third_party/grpc/bazel/generate_cc.bzl +@@ -123,6 +123,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)) diff --git a/Golden_Repo/b/Bazel/Bazel-3.4.1_fix_protobuf_libstdc.patch b/Golden_Repo/b/Bazel/Bazel-3.4.1_fix_protobuf_libstdc.patch deleted file mode 100644 index 05d72c491..000000000 --- a/Golden_Repo/b/Bazel/Bazel-3.4.1_fix_protobuf_libstdc.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- third_party/grpc/bazel/generate_cc.bzl.orig 2020-08-04 14:19:51.304155177 +0200 -+++ third_party/grpc/bazel/generate_cc.bzl 2020-08-04 14:20:08.316748158 +0200 -@@ -123,6 +123,7 @@ - outputs = out_files, - executable = ctx.executable.protoc, - arguments = arguments, -+ use_default_shell_env = True, - ) - - return struct(files = depset(out_files)) diff --git a/Golden_Repo/b/Bazel/Bazel-3.4.1-GCCcore-9.3.0.eb b/Golden_Repo/b/Bazel/Bazel-3.6.0-GCCcore-9.3.0.eb similarity index 63% rename from Golden_Repo/b/Bazel/Bazel-3.4.1-GCCcore-9.3.0.eb rename to Golden_Repo/b/Bazel/Bazel-3.6.0-GCCcore-9.3.0.eb index 1ba88f724..3bcaab022 100644 --- a/Golden_Repo/b/Bazel/Bazel-3.4.1-GCCcore-9.3.0.eb +++ b/Golden_Repo/b/Bazel/Bazel-3.6.0-GCCcore-9.3.0.eb @@ -1,5 +1,5 @@ name = 'Bazel' -version = '3.4.1' +version = '3.6.0' homepage = 'http://bazel.io/' description = """Bazel is a build tool that builds code quickly and reliably. @@ -11,9 +11,16 @@ toolchain = {'name': 'GCCcore', 'version': '9.3.0'} source_urls = ['https://github.com/bazelbuild/bazel/releases/download/%(version)s'] sources = ['%(namelower)s-%(version)s-dist.zip'] -patches = ['%(name)s-%(version)s_fix_protobuf_libstdc.patch'] +patches = ['%(name)s-3.4.1-fix-grpc-protoc.patch'] + +builddependencies = [ + ('binutils', '2.34'), + ('Python', '3.8.5'), + ('Zip', '3.0'), +] + +prebuildopts = "export BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc BAZEL_LINKLIBS=-l%:libstdc++.a:-lm && " -builddependencies = [('binutils', '2.34')] dependencies = [('Java', '1.8', '', True)] moduleclass = 'devel' -- GitLab