This is an automated email from the ASF dual-hosted git repository.

hellostephen pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 9339ad716cf [compile](fix) fix thirdparty compile under clang (#60360)
9339ad716cf is described below

commit 9339ad716cf6b85a3b92002ce503c57e51d37894
Author: shuke <[email protected]>
AuthorDate: Thu Jan 29 22:00:36 2026 +0800

    [compile](fix) fix thirdparty compile under clang (#60360)
---
 thirdparty/build-thirdparty.sh                     |  6 +++-
 .../azure-sdk-for-cpp-azure-core_1.16.0.patch      | 33 ++++++++++++++++++++--
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index 3af6de36dbd..8bf68daa2c1 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -1896,8 +1896,12 @@ build_azure() {
         AZURE_PORTS="vcpkg-custom-ports"
         AZURE_MANIFEST_DIR="."
 
+        # Add -ldl for clang compatibility (libcrypto.a requires 
dlopen/dlsym/dlclose/dlerror)
         "${CMAKE_CMD}" -G "${GENERATOR}" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-        -DCMAKE_CXX_FLAGS="-Wno-maybe-uninitialized" 
-DDISABLE_RUST_IN_BUILD=ON -DVCPKG_MANIFEST_MODE=ON 
-DVCPKG_OVERLAY_PORTS="${azure_dir}/${AZURE_PORTS}" 
-DVCPKG_MANIFEST_DIR="${azure_dir}/${AZURE_MANIFEST_DIR}" 
-DWARNINGS_AS_ERRORS=FALSE -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" 
-DCMAKE_BUILD_TYPE=Release ..
+        -DCMAKE_CXX_FLAGS="-Wno-maybe-uninitialized" \
+        -DCMAKE_EXE_LINKER_FLAGS="-ldl" \
+        -DCMAKE_SHARED_LINKER_FLAGS="-ldl" \
+        -DDISABLE_RUST_IN_BUILD=ON -DVCPKG_MANIFEST_MODE=ON 
-DVCPKG_OVERLAY_PORTS="${azure_dir}/${AZURE_PORTS}" 
-DVCPKG_MANIFEST_DIR="${azure_dir}/${AZURE_MANIFEST_DIR}" 
-DWARNINGS_AS_ERRORS=FALSE -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" 
-DCMAKE_BUILD_TYPE=Release ..
         "${BUILD_SYSTEM}" -j "${PARALLEL}"
         "${BUILD_SYSTEM}" install
     fi
diff --git a/thirdparty/patches/azure-sdk-for-cpp-azure-core_1.16.0.patch 
b/thirdparty/patches/azure-sdk-for-cpp-azure-core_1.16.0.patch
index c0e8def8f26..fe0c9340c3b 100644
--- a/thirdparty/patches/azure-sdk-for-cpp-azure-core_1.16.0.patch
+++ b/thirdparty/patches/azure-sdk-for-cpp-azure-core_1.16.0.patch
@@ -1,7 +1,7 @@
 From 0c18bd91955f6ad48582c01901ffadd4ad5a149c Mon Sep 17 00:00:00 2001
 From: BiteTheDDDDt <[email protected]>
 Date: Tue, 15 Jul 2025 12:57:25 +0800
-Subject: [PATCH] resolve missing uint8_t define
+Subject: [PATCH 1/2] resolve missing uint8_t define
 
 ---
  .../azure-security-attestation/src/private/crypto/inc/crypto.hpp | 1 +
@@ -13,12 +13,39 @@ index 9a98f204..8f338436 100644
 +++ 
b/sdk/attestation/azure-security-attestation/src/private/crypto/inc/crypto.hpp
 @@ -2,6 +2,7 @@
  // Licensed under the MIT License.
- 
+
  #pragma once
 +#include <cstdint>
  #include <ctime>
  #include <memory>
  #include <string>
--- 
+--
 2.43.5
 
+From 0c18bd91955f6ad48582c01901ffadd4ad5a149d Mon Sep 17 00:00:00 2001
+From: Claude <[email protected]>
+Date: Wed, 29 Jan 2026 16:00:00 +0800
+Subject: [PATCH 2/2] fix clang link error: always link libdl for openssl
+
+libcrypto.a requires dlopen/dlsym/dlclose/dlerror from libdl.
+With clang, find_library may not find libdl, but -ldl is still needed.
+---
+ vcpkg-custom-ports/openssl/vcpkg-cmake-wrapper.cmake.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vcpkg-custom-ports/openssl/vcpkg-cmake-wrapper.cmake.in 
b/vcpkg-custom-ports/openssl/vcpkg-cmake-wrapper.cmake.in
+index 1234567..abcdefg 100644
+--- a/vcpkg-custom-ports/openssl/vcpkg-cmake-wrapper.cmake.in
++++ b/vcpkg-custom-ports/openssl/vcpkg-cmake-wrapper.cmake.in
+@@ -53,7 +53,8 @@ if(OPENSSL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL 
"static")
+             set_property(TARGET OpenSSL::SSL APPEND PROPERTY 
INTERFACE_LINK_LIBRARIES "crypt32;ws2_32")
+         endif()
+     else()
+-        find_library(OPENSSL_DL_LIBRARY NAMES dl)
++        # Always link dl for clang compatibility
++        set(OPENSSL_DL_LIBRARY "dl")
+         if(OPENSSL_DL_LIBRARY)
+             list(APPEND OPENSSL_LIBRARIES "dl")
+             if(TARGET OpenSSL::Crypto)
+--
+2.43.5


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to