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

yiguolei pushed a commit to branch 2.1-tmp
in repository https://gitbox.apache.org/repos/asf/doris.git

commit be9fe12b26dd59e65fff0fca96045852ff157f97
Author: Adonis Ling <adonis0...@gmail.com>
AuthorDate: Sun Apr 7 19:30:56 2024 +0800

    Fix compatibility issues with GLIBC(>= 2.34) for prebuilt thirdparty 
packages (#33314)
    
    Some symbols changed after GLIBC 2.34 according to the release 
notes(https://lists.gnu.org/archive/html/info-gnu/2021-08/msg00001.html).
    
    This may cause linkage errors if we use GLIBC(>= 2.34).
---
 thirdparty/download-thirdparty.sh  | 11 +++++++++++
 thirdparty/patches/krb5-1.19.patch | 13 +++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/thirdparty/download-thirdparty.sh 
b/thirdparty/download-thirdparty.sh
index 6965a96a112..e0d74f2fe95 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -421,3 +421,14 @@ if [[ "${BASE64_SOURCE}" = "base64-0.5.2" ]]; then
     cd -
 fi
 echo "Finished patching ${BASE64_SOURCE}"
+
+# patch krb
+if [[ "${KRB5_SOURCE}" = "krb5-1.19" ]]; then
+    cd "${TP_SOURCE_DIR}/${KRB5_SOURCE}"
+    if [[ ! -f "${PATCHED_MARK}" ]]; then
+        patch -p1 <"${TP_PATCH_DIR}/krb5-1.19.patch"
+        touch "${PATCHED_MARK}"
+    fi
+    cd -
+fi
+echo "Finished patching ${KRB5_SOURCE}"
diff --git a/thirdparty/patches/krb5-1.19.patch 
b/thirdparty/patches/krb5-1.19.patch
new file mode 100644
index 00000000000..463f2c9cb67
--- /dev/null
+++ b/thirdparty/patches/krb5-1.19.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lib/krb5/os/dnsglue.c b/src/lib/krb5/os/dnsglue.c
+index 0cd213f..2514fcd 100644
+--- a/src/lib/krb5/os/dnsglue.c
++++ b/src/lib/krb5/os/dnsglue.c
+@@ -87,6 +87,8 @@ static int initparse(struct krb5int_dns_state *);
+ 
+ #elif HAVE_RES_NINIT && HAVE_RES_NSEARCH
+ 
++__asm__(".symver __res_nsearch,__res_nsearch@GLIBC_2.2.5");
++
+ /* Use res_ninit, res_nsearch, and res_ndestroy or res_nclose. */
+ #define DECLARE_HANDLE(h) struct __res_state h
+ #define INIT_HANDLE(h) (memset(&h, 0, sizeof(h)), res_ninit(&h) == 0)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to