This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new a912910d4b [fix](thirdparty) Fix the errors while building brpc
(#11714)
a912910d4b is described below
commit a912910d4b47aa246532cf09ed43d19b5aa2be93
Author: Adonis Ling <[email protected]>
AuthorDate: Fri Aug 12 13:59:44 2022 +0800
[fix](thirdparty) Fix the errors while building brpc (#11714)
---
thirdparty/build-thirdparty.sh | 4 ++--
thirdparty/download-thirdparty.sh | 9 +++++++++
thirdparty/patches/brpc-1.2.0.patch | 13 +++++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index ea3479788e..a70b843a61 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -612,7 +612,7 @@ build_hyperscan() {
fi
CXXFLAGS="${cxxflags}" \
- ./configure --prefix="${TP_INSTALL_DIR}"
+ ./configure --prefix="${TP_INSTALL_DIR}"
make install
check_if_source_exist "${HYPERSCAN_SOURCE}"
@@ -723,7 +723,7 @@ build_brpc() {
# Currently, BRPC can't be built for static libraries only (without .so).
Therefore, we should add `-fPIC`
# to the dependencies which are required by BRPC. Dependencies: zlib,
glog, protobuf, leveldb
LDFLAGS="${ldflags}" \
- "${CMAKE_CMD}" -G "${GENERATOR}" -DBUILD_SHARED_LIBS=0 -DWITH_GLOG=ON
-DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" \
+ "${CMAKE_CMD}" -G "${GENERATOR}" -DBUILD_SHARED_LIBS=1 -DWITH_GLOG=ON
-DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" \
-DCMAKE_LIBRARY_PATH="${TP_INSTALL_DIR}/lib64"
-DCMAKE_INCLUDE_PATH="${TP_INSTALL_DIR}/include" \
-DPROTOBUF_PROTOC_EXECUTABLE="${TP_INSTALL_DIR}/bin/protoc" ..
diff --git a/thirdparty/download-thirdparty.sh
b/thirdparty/download-thirdparty.sh
index dadf48a7b0..5e67ccd549 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -366,3 +366,12 @@ if [ ! -f $PATCHED_MARK ]; then
fi
cd -
echo "Finished patching $AWS_SDK_SOURCE"
+
+cd "${TP_SOURCE_DIR}/${BRPC_SOURCE}"
+if [[ ! -f $PATCHED_MARK ]]; then
+ patch -p1 <"${TP_PATCH_DIR}/brpc-1.2.0.patch"
+ touch ${PATCHED_MARK}
+fi
+cd -
+echo "Finished patching ${BRPC_SOURCE}"
+
diff --git a/thirdparty/patches/brpc-1.2.0.patch
b/thirdparty/patches/brpc-1.2.0.patch
new file mode 100644
index 0000000000..7414a388b9
--- /dev/null
+++ b/thirdparty/patches/brpc-1.2.0.patch
@@ -0,0 +1,13 @@
+diff --git a/tools/rpc_press/rpc_press_impl.cpp
b/tools/rpc_press/rpc_press_impl.cpp
+index 8a873eff..d1ff2a1e 100644
+--- a/tools/rpc_press/rpc_press_impl.cpp
++++ b/tools/rpc_press/rpc_press_impl.cpp
+@@ -222,7 +222,7 @@ void RpcPress::sync_client() {
+ int64_t last_expected_time = butil::monotonic_time_ns();
+ const int64_t interval = (int64_t) (1000000000L / req_rate);
+ // the max tolerant delay between end_time and expected_time. 10ms or 10
intervals
+- int64_t max_tolerant_delay = std::max(10000000L, 10 * interval);
++ int64_t max_tolerant_delay = std::max<int64_t>(10000000L, 10 * interval);
+ while (!_stop) {
+ brpc::Controller* cntl = new brpc::Controller;
+ msg_index = (msg_index + _options.test_thread_num) % _msgs.size();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]