From 8cd275f15a712d0e5a52e3e1d8ee602064f2b552 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 11 Sep 2020 13:56:15 -0400 Subject: [PATCH] Testing upb fix from upstream Ref: https://github.com/bazelbuild/bazel/issues/11885#issuecomment-691186429 Signed-off-by: Vincent Batts --- ...8f60973ba60d578ae6a653cdd993a2d206d7.patch | 42 +++++++++++++++++++ bazel.spec | 4 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 b3ac8f60973ba60d578ae6a653cdd993a2d206d7.patch diff --git a/b3ac8f60973ba60d578ae6a653cdd993a2d206d7.patch b/b3ac8f60973ba60d578ae6a653cdd993a2d206d7.patch new file mode 100644 index 0000000..b57e11a --- /dev/null +++ b/b3ac8f60973ba60d578ae6a653cdd993a2d206d7.patch @@ -0,0 +1,42 @@ +From b3ac8f60973ba60d578ae6a653cdd993a2d206d7 Mon Sep 17 00:00:00 2001 +From: Yun Peng +Date: Fri, 11 Sep 2020 07:39:36 -0700 +Subject: [PATCH] Patch upb to fix build error with gcc 10 + +Fixes #12056 + +This is a replacement of https://github.com/bazelbuild/bazel/pull/12077 after an unsuccessful attempt to upgrade upb version. + +Closes #12083. + +PiperOrigin-RevId: 331145667 +--- + WORKSPACE | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/WORKSPACE b/WORKSPACE +index 117dcb500de..65d6663b50a 100644 +--- a/WORKSPACE ++++ b/WORKSPACE +@@ -1056,6 +1056,21 @@ register_local_rc_exe_toolchains() + + register_toolchains("//src/main/res:empty_rc_toolchain") + ++# Patch upb for grpc due to https://github.com/bazelbuild/bazel/issues/12056 ++# TODO: Remove the following after upgrading grpc to a newer version that's not ++# affected by this issue. ++http_archive( ++ name = "upb", ++ sha256 = "61d0417abd60e65ed589c9deee7c124fe76a4106831f6ad39464e1525cef1454", ++ patches = ["//third_party/grpc:upb_gcc10_fix.patch"], ++ patch_args = ["-p1"], ++ strip_prefix = "upb-9effcbcb27f0a665f9f345030188c0b291e32482", ++ urls = [ ++ "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz", ++ "https://github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz", ++ ], ++) ++ + http_archive( + name = "com_github_grpc_grpc", + urls = [ diff --git a/bazel.spec b/bazel.spec index 6604de1..e7c7e1f 100644 --- a/bazel.spec +++ b/bazel.spec @@ -4,7 +4,7 @@ Name: bazel3 Version: 3.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Correct, reproducible, and fast builds for everyone. License: Apache License 2.0 URL: http://bazel.io/ @@ -12,6 +12,7 @@ Source0: https://github.com/bazelbuild/bazel/releases/download/%{version} # FIXME: Java 11 log.warning generates backtrace Patch1: bazel-1.0.0-log-warning.patch +Patch2: https://github.com/bazelbuild/bazel/commit/b3ac8f60973ba60d578ae6a653cdd993a2d206d7.patch # for folks with 'bazel' v1 package installed Conflicts: bazel @@ -50,6 +51,7 @@ Correct, reproducible, and fast builds for everyone. %setup -q -c -n bazel-%{version} %patch1 -p0 +%patch2 -p1 %build