diff --git a/.bazelrc b/.bazelrc index b066fd08..0123bdae 100644 --- a/.bazelrc +++ b/.bazelrc @@ -13,8 +13,10 @@ build:manylinux2014 --crosstool_top=//third_party/toolchains/preconfig/ubuntu16. build -c opt build --cxxopt="-std=c++17" +build --host_cxxopt="-std=c++17" # We can remove this flag (we keep it explicit for now) build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" +build --host_cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" build --auto_output_filter=subpackages build --copt="-Wall" --copt="-Wno-sign-compare" build --linkopt="-lrt -lm" diff --git a/WORKSPACE b/WORKSPACE index 56e82dfe..1d86c9b8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -15,6 +15,7 @@ load( "//reverb/cc/platform/default:repo.bzl", "absl_deps", "cc_tf_configure", + "github_apple_deps", "github_grpc_deps", "googletest_deps", "protoc_deps", @@ -28,6 +29,8 @@ absl_deps() # Note that the Python dependencies are not tracked by bazel here, but # in setup.py. +github_apple_deps() + ## Begin GRPC related deps github_grpc_deps() diff --git a/docker/release.dockerfile b/docker/release.dockerfile index 45389b51..798d48ff 100644 --- a/docker/release.dockerfile +++ b/docker/release.dockerfile @@ -51,7 +51,7 @@ RUN ${APT_COMMAND} update && ${APT_COMMAND} install -y --no-install-recommends \ RUN curl -O https://bootstrap.pypa.io/get-pip.py # Installs known working version of bazel. -ARG bazel_version=3.7.2 +ARG bazel_version=5.3.0 ENV BAZEL_VERSION ${bazel_version} RUN mkdir /bazel && \ cd /bazel && \ @@ -96,12 +96,14 @@ RUN ln -s "/usr/include/x86_64-linux-gnu/python3.11" "/dt9/usr/include/x86_64-li # bazel build -c opt --copt=-mavx --config=manylinux2014 --test_output=errors //... # Update binutils to avoid linker(gold) issue. See b/227299577#comment9 -RUN wget http://old-releases.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.35.1-1ubuntu1_amd64.deb \ +RUN \ + wget http://old-releases.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.35.1-1ubuntu1_amd64.deb \ && wget http://old-releases.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-x86-64-linux-gnu_2.35.1-1ubuntu1_amd64.deb \ && wget http://old-releases.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-common_2.35.1-1ubuntu1_amd64.deb \ && wget http://old-releases.ubuntu.com/ubuntu/pool/main/b/binutils/libbinutils_2.35.1-1ubuntu1_amd64.deb -RUN dpkg -i binutils_2.35.1-1ubuntu1_amd64.deb \ +RUN \ + dpkg -i binutils_2.35.1-1ubuntu1_amd64.deb \ binutils-x86-64-linux-gnu_2.35.1-1ubuntu1_amd64.deb \ binutils-common_2.35.1-1ubuntu1_amd64.deb \ libbinutils_2.35.1-1ubuntu1_amd64.deb diff --git a/reverb/cc/platform/default/repo.bzl b/reverb/cc/platform/default/repo.bzl index bc6ba310..e5a53d94 100644 --- a/reverb/cc/platform/default/repo.bzl +++ b/reverb/cc/platform/default/repo.bzl @@ -317,6 +317,18 @@ def python_deps(): ], ) +def github_apple_deps(): + http_archive( + name = "build_bazel_rules_apple", + sha256 = "36072d4f3614d309d6a703da0dfe48684ec4c65a89611aeb9590b45af7a3e592", + urls = ["https://github.com/bazelbuild/rules_apple/releases/download/1.0.1/rules_apple.1.0.1.tar.gz"], + ) + http_archive( + name = "build_bazel_apple_support", + sha256 = "ce1042cf936540eaa7b49c4549d7cd9b6b1492acbb6e765840a67a34b8e17a97", + urls = ["https://github.com/bazelbuild/apple_support/releases/download/1.1.0/apple_support.1.1.0.tar.gz"], + ) + def github_grpc_deps(): http_archive( name = "com_github_grpc_grpc", @@ -347,11 +359,11 @@ def googletest_deps(): def absl_deps(): http_archive( name = "com_google_absl", - sha256 = "94aef187f688665dc299d09286bfa0d22c4ecb86a80b156dff6aabadc5a5c26d", # SHARED_ABSL_SHA - strip_prefix = "abseil-cpp-273292d1cfc0a94a65082ee350509af1d113344d", + sha256 = "8eeec9382fc0338ef5c60053f3a4b0e0708361375fe51c9e65d0ce46ccfe55a7", # SHARED_ABSL_SHA + strip_prefix = "abseil-cpp-b971ac5250ea8de900eae9f95e06548d14cd95fe", urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/abseil/abseil-cpp/archive/273292d1cfc0a94a65082ee350509af1d113344d.tar.gz", - "https://github.com/abseil/abseil-cpp/archive/273292d1cfc0a94a65082ee350509af1d113344d.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/abseil/abseil-cpp/archive/b971ac5250ea8de900eae9f95e06548d14cd95fe.tar.gz", + "https://github.com/abseil/abseil-cpp/archive/b971ac5250ea8de900eae9f95e06548d14cd95fe.tar.gz", ], )