From f120ada808dc329c64b04dbf5db978c1714b5025 Mon Sep 17 00:00:00 2001 From: Yancheng Zheng <103552181+anakinxc@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:49:51 +0800 Subject: [PATCH] Fix build issues in release-ci (#368) --- bazel/patches/brpc.patch | 13 +++++++++++++ bazel/yacl.bzl | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/bazel/patches/brpc.patch b/bazel/patches/brpc.patch index 5104aa5..357afe7 100644 --- a/bazel/patches/brpc.patch +++ b/bazel/patches/brpc.patch @@ -159,3 +159,16 @@ index 0bdaa4d3..43597f63 100644 }) LINKOPTS = [ +diff --git a/src/brpc/versioned_ref_with_id.h b/src/brpc/versioned_ref_with_id.h +index c78f019b..68dda744 100644 +--- a/src/brpc/versioned_ref_with_id.h ++++ b/src/brpc/versioned_ref_with_id.h +@@ -617,7 +617,7 @@ template + std::string VersionedRefWithId::description() const { + std::string result; + result.reserve(128); +- butil::string_appendf(&result, "Socket{id=%" PRIu64, id()); ++ butil::string_appendf(&result, "Socket{id=%d", (int)id()); + result.append(WRAPPER_CALL( + OnDescription, const_cast(static_cast(this)))); + butil::string_appendf(&result, "} (0x%p)", this); diff --git a/bazel/yacl.bzl b/bazel/yacl.bzl index 6876deb..59f2e57 100644 --- a/bazel/yacl.bzl +++ b/bazel/yacl.bzl @@ -65,9 +65,11 @@ def _yacl_copts(): def yacl_cc_binary( copts = [], + linkopts = [], **kargs): cc_binary( copts = copts + _yacl_copts(), + linkopts = linkopts + ["-ldl"], **kargs ) @@ -96,11 +98,13 @@ def yacl_configure_make(**attrs): def yacl_cc_test( copts = [], deps = [], + linkopts = [], **kwargs): cc_test( copts = _yacl_copts() + copts, deps = deps + [ "@com_google_googletest//:gtest_main", ], + linkopts = linkopts + ["-ldl"], **kwargs )