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 <[email protected]>
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 <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
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.