This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 26d6855d5b2 [fix](merge-cloud) Fix ali open sdk gcc compile issue
(#30308)
26d6855d5b2 is described below
commit 26d6855d5b2ab16813d5f322ddcf14d0cf34b753
Author: walter <[email protected]>
AuthorDate: Wed Jan 24 21:36:56 2024 +0800
[fix](merge-cloud) Fix ali open sdk gcc compile issue (#30308)
---
thirdparty/build-thirdparty.sh | 3 +-
thirdparty/download-thirdparty.sh | 11 ++++++
thirdparty/patches/ali-sdk-1.36.1586.patch | 62 ++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+), 1 deletion(-)
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index ba661f6390a..04efb76adcc 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -1769,7 +1769,8 @@ build_ali_sdk() {
CPPFLAGS="-I${TP_INCLUDE_DIR}" \
CXXFLAGS="-I${TP_INCLUDE_DIR}" \
LDFLAGS="-L${TP_LIB_DIR}" \
- "${CMAKE_CMD}" -G "${GENERATOR}" -DBUILD_SHARED_LIBS=OFF
-DBUILD_PRODUCT=core -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" ..
+ "${CMAKE_CMD}" -G "${GENERATOR}" -DBUILD_PRODUCT=core
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" \
+ -DTP_INSTALL_DIR="${TP_INSTALL_DIR}" ..
"${BUILD_SYSTEM}" -j "${PARALLEL}"
"${BUILD_SYSTEM}" install
}
diff --git a/thirdparty/download-thirdparty.sh
b/thirdparty/download-thirdparty.sh
index 4dfa838e8b4..57f1ed1cabd 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -399,3 +399,14 @@ if [[ "${BRPC_SOURCE}" == 'brpc-1.4.0' ]]; then
cd -
fi
echo "Finished patching ${BRPC_SOURCE}"
+
+# patch ali sdk
+if [[ "${ALI_SDK_SOURCE}" = "aliyun-openapi-cpp-sdk-1.36.1586" ]]; then
+ cd "${TP_SOURCE_DIR}/${ALI_SDK_SOURCE}"
+ if [[ ! -f "${PATCHED_MARK}" ]]; then
+ patch -p1 <"${TP_PATCH_DIR}/ali-sdk-1.36.1586.patch"
+ touch "${PATCHED_MARK}"
+ fi
+ cd -
+fi
+echo "Finished patching ${ALI_SDK_SOURCE}"
diff --git a/thirdparty/patches/ali-sdk-1.36.1586.patch
b/thirdparty/patches/ali-sdk-1.36.1586.patch
new file mode 100644
index 00000000000..6738ea60b79
--- /dev/null
+++ b/thirdparty/patches/ali-sdk-1.36.1586.patch
@@ -0,0 +1,62 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 25e0a8d7f..afb8c68c5 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,10 +11,13 @@ message(STATUS "Project version: ${PROJECT_VERSION}")
+ set(TARGET_OUTPUT_NAME_PREFIX "alibabacloud-sdk-" CACHE STRING "The target's
output name prefix")
+ set(BUILD_PRODUCT "" CACHE STRING "Build by lower name of product")
+
+-option(BUILD_SHARED_LIBS "Enable shared library" ON)
++option(BUILD_SHARED_LIBS "Enable shared library" OFF)
+ option(BUILD_UNIT_TESTS "Enable unit tests" OFF)
+ option(BUILD_FUNCTION_TESTS "Enable function test" OFF)
+
++option(TP_INSTALL_DIR "Third party install dir")
++message("Third party install dir: ${TP_INSTALL_DIR}")
++
+ set(LIB_TYPE STATIC)
+
+ if(BUILD_SHARED_LIBS)
+diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
+index b0ab27d3b..222a3e5f7 100755
+--- a/core/CMakeLists.txt
++++ b/core/CMakeLists.txt
+@@ -160,6 +160,10 @@ endif()
+ target_include_directories(core
+ PRIVATE include )
+
++link_directories(${TP_INSTALL_DIR}/include/)
++
++include_directories(${TP_INSTALL_DIR}/lib64)
++
+ if(CMAKE_HOST_WIN32)
+ ExternalProject_Get_Property(curl INSTALL_DIR)
+ set(curl_install_dir ${INSTALL_DIR})
+@@ -185,7 +189,7 @@ if(CMAKE_HOST_WIN32)
+ _CRT_SECURE_NO_WARNINGS)
+ else()
+ target_include_directories(core
+- PRIVATE /usr/include/jsoncpp)
++ PRIVATE ${TP_INSTALL_DIR}/include)
+ target_link_libraries(core
+ crypto
+ curl
+@@ -207,4 +211,4 @@ install(TARGETS core
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+- )
+\ No newline at end of file
++ )
+diff --git a/core/include/alibabacloud/core/NetworkProxy.h
b/core/include/alibabacloud/core/NetworkProxy.h
+index 033f6b31d..44e1ea655 100644
+--- a/core/include/alibabacloud/core/NetworkProxy.h
++++ b/core/include/alibabacloud/core/NetworkProxy.h
+@@ -19,6 +19,7 @@
+
+ #include "CoreExport.h"
+ #include <string>
++#include <cstdint> // Fix GCC compile issue
+
+ namespace AlibabaCloud {
+ class ALIBABACLOUD_CORE_EXPORT NetworkProxy {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]