You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2026/01/11 08:32:29 UTC

(arrow) branch main updated: GH-48787: [C++] Disable `-Werror` for s2n-tls (#48791)

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

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new ec56b37734 GH-48787: [C++] Disable `-Werror` for s2n-tls (#48791)
ec56b37734 is described below

commit ec56b377340feb8d46b289342b403aa489effaa1
Author: meher745 <75...@users.noreply.github.com>
AuthorDate: Sun Jan 11 14:02:23 2026 +0530

    GH-48787: [C++] Disable `-Werror` for s2n-tls (#48791)
    
    ### Rationale for this change
    
    Fixes the test-ubuntu-24.04-cpp-thread-sanitizer failure where s2n-tls builds were failing due to strict compiler warnings (documentation and integer precision) on newer Clang versions.
    
    ### What changes are included in this PR?
    
    1. Added -Wno-error specifically for the s2n target in cpp/cmake_modules/ThirdpartyToolchain.cmake. This allows the build to proceed despite intentional warnings in the s2n-tls project that Clang 18 now flags as errors.
    
    ### Are these changes tested?
    
    I am relying on the GitHub CI to verify that this suppression resolves the Ubuntu 24.04 compiler failures.
    
    ### Are there any user-facing changes?
    
    No. These changes only affect the C++ build system and third-party dependency management.
    
    * GitHub Issue: #48787
    
    Authored-by: Meher <me...@gmail.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 0357ebae8c..b95d649145 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -3984,6 +3984,11 @@ function(build_awssdk)
         # We don't need to link aws-lc. It's used only by s2n-tls.
       elseif("${AWSSDK_PRODUCT}" STREQUAL "s2n-tls")
         list(PREPEND AWSSDK_LINK_LIBRARIES s2n)
+        # Disable -Werror for s2n-tls: it has Clang 18 warnings that it intentionally allows.
+        # See: https://github.com/aws/s2n-tls/issues/5696
+        if(TARGET s2n)
+          target_compile_options(s2n PRIVATE -Wno-error)
+        endif()
       else()
         list(PREPEND AWSSDK_LINK_LIBRARIES ${AWSSDK_PRODUCT})
         # This is for find_package(aws-*) in aws-crt-cpp and aws-sdk-cpp.