Skip to content

Commit

Permalink
Fix build issues in release-ci (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc authored Jul 31, 2024
1 parent 21cf4d6 commit f120ada
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bazel/patches/brpc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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<typename T>
std::string VersionedRefWithId<T>::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<T*>(static_cast<const T*>(this))));
butil::string_appendf(&result, "} (0x%p)", this);
4 changes: 4 additions & 0 deletions bazel/yacl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ def _yacl_copts():

def yacl_cc_binary(
copts = [],
linkopts = [],
**kargs):
cc_binary(
copts = copts + _yacl_copts(),
linkopts = linkopts + ["-ldl"],
**kargs
)

Expand Down Expand Up @@ -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
)

0 comments on commit f120ada

Please sign in to comment.