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

laiyingchun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new d00b25136 fix: Fix build failure on ARM architecture chips (#2013)
d00b25136 is described below

commit d00b25136aeb04c70eb62ba4ea8b0250804483a8
Author: Yingchun Lai <[email protected]>
AuthorDate: Wed May 22 19:07:46 2024 +0800

    fix: Fix build failure on ARM architecture chips (#2013)
    
    Fix build failures like:
    
    1.
    ```
    /bin/ld: 
/.../thirdparty/output/lib/libcurl.a(libcurl_la-content_encoding.o): in 
function `brotli_close_writer':
    content_encoding.c:(.text+0x2c): undefined reference to 
`BrotliDecoderDestroyInstance'
    ```
    
    2.
    ```
    /bin/ld: /.../thirdparty/output/lib/libcurl.a(libcurl_la-easy.o): 
relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `malloc' which may bind 
externally can not be used when making a shared object; recompile with -fPIC
    /bin/ld: 
/.../thirdparty/output/lib/libcurl.a(libcurl_la-easy.o)(.text+0x30): 
unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `malloc'
    ```
    
    3.
    ```
    /bin/ld: idn.c:(.text+0x34): undefined reference to `idn2_lookup_ul'
    ```
---
 thirdparty/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
index 26a8ae089..07e908c9a 100644
--- a/thirdparty/CMakeLists.txt
+++ b/thirdparty/CMakeLists.txt
@@ -234,6 +234,7 @@ ExternalProject_Add(fmt
 )
 
 set(CURL_OPTIONS
+        --enable-shared
         --disable-dict
         --disable-file
         --disable-ftp
@@ -245,11 +246,12 @@ set(CURL_OPTIONS
         --disable-manual
         --disable-pop3
         --disable-rtsp
-        --disable-shared
         --disable-smtp
         --disable-telnet
         --disable-tftp
+        --without-brotli
         --without-libidn
+        --without-libidn2
         --without-librtmp
         --without-libssh2
         --without-ssl
@@ -261,8 +263,6 @@ if (APPLE)
     set(CURL_OPTIONS
             ${CURL_OPTIONS}
             --without-nghttp2
-            --without-libidn2
-            --without-brotli
             )
 endif ()
 ExternalProject_Add(curl


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

Reply via email to