From 650360d399a63461d0e70965af0d245895049812 Mon Sep 17 00:00:00 2001 From: Ihor Indyk Date: Fri, 20 Dec 2024 15:10:12 -0800 Subject: [PATCH] Update protobuf dependency to make MacOS x86_64 build work (arm64 works). PiperOrigin-RevId: 708439202 --- grain/oss/array_record/WORKSPACE.patch | 38 ++++++++++++++++++++-- grain/oss/array_record/runner_common.patch | 9 ++--- grain/oss/runner_common.sh | 2 -- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/grain/oss/array_record/WORKSPACE.patch b/grain/oss/array_record/WORKSPACE.patch index 3b0a4311..d5393b37 100644 --- a/grain/oss/array_record/WORKSPACE.patch +++ b/grain/oss/array_record/WORKSPACE.patch @@ -1,8 +1,42 @@ diff --git a/WORKSPACE b/WORKSPACE -index e63922f..02958ea 100644 +index e63922f..f25e016 100644 --- a/WORKSPACE +++ b/WORKSPACE -@@ -87,9 +87,9 @@ protobuf_deps() +@@ -3,13 +3,11 @@ workspace(name = "array_record") + load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +-# Abseil LTS 20230125.0 + http_archive( + name = "com_google_absl", +- sha256 = "3ea49a7d97421b88a8c48a0de16c16048e17725c7ec0f1d3ea2683a2a75adc21", # SHARED_ABSL_SHA +- strip_prefix = "abseil-cpp-20230125.0", ++ strip_prefix = "abseil-cpp-20230802.1", + urls = [ +- "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230125.0.tar.gz", ++ "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz", + ], + ) + # Version: pypi-v0.11.0, 2020/10/27 +@@ -70,15 +68,13 @@ http_archive( + load("@pybind11_bazel//:python_configure.bzl", "python_configure") + python_configure(name = "local_config_python") + +-# V21.12, 20230130 + # proto_library, cc_proto_library, and java_proto_library rules implicitly + # depend on @com_google_protobuf for protoc and proto runtimes. + # This statement defines the @com_google_protobuf repo. + http_archive( + name = "com_google_protobuf", +- sha256 = "22fdaf641b31655d4b2297f9981fa5203b2866f8332d3c6333f6b0107bb320de", +- strip_prefix = "protobuf-21.12", +- urls = ["https://github.com/protocolbuffers/protobuf/archive/v21.12.tar.gz"], ++ strip_prefix = "protobuf-23.1", ++ urls = ["https://github.com/protocolbuffers/protobuf/archive/v23.1.tar.gz"], + ) + + load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") +@@ -87,9 +83,9 @@ protobuf_deps() # Riegeli does not cut releases, so we reference the head http_archive( name = "com_google_riegeli", diff --git a/grain/oss/array_record/runner_common.patch b/grain/oss/array_record/runner_common.patch index e263ee68..97f5c6e3 100644 --- a/grain/oss/array_record/runner_common.patch +++ b/grain/oss/array_record/runner_common.patch @@ -1,5 +1,5 @@ diff --git a/oss/runner_common.sh b/oss/runner_common.sh -index 2ee2c8c..0e32962 100644 +index 2ee2c8c..433698f 100644 --- a/oss/runner_common.sh +++ b/oss/runner_common.sh @@ -2,7 +2,7 @@ @@ -20,11 +20,10 @@ index 2ee2c8c..0e32962 100644 do PYTHON_VERSION=${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION} PYTHON_BIN=/opt/python/cp${PYTHON_MAJOR_VERSION}${PYTHON_MINOR_VERSION}-cp${PYTHON_MAJOR_VERSION}${PYTHON_MINOR_VERSION}/bin -@@ -40,5 +40,81 @@ function build_and_test_array_record() { - bash oss/build_whl.sh +@@ -41,4 +41,78 @@ function build_and_test_array_record() { done -+ ls ${SOURCE_DIR}/all_dist/*.whl + ls ${SOURCE_DIR}/all_dist/*.whl +} + +function install_and_init_pyenv { @@ -99,7 +98,5 @@ index 2ee2c8c..0e32962 100644 + # Build and test ArrayRecord. + bash ${SOURCE_DIR}/oss/build_whl.sh + done -+ - ls ${SOURCE_DIR}/all_dist/*.whl } \ No newline at end of file diff --git a/grain/oss/runner_common.sh b/grain/oss/runner_common.sh index bd696ac4..eace1cb3 100644 --- a/grain/oss/runner_common.sh +++ b/grain/oss/runner_common.sh @@ -123,6 +123,4 @@ function build_and_test_grain_macos() { bash grain/oss/build_whl.sh done - - ls ${SOURCE_DIR}/all_dist/*.whl } \ No newline at end of file