-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48787: [C++] Upgrade s2n-tls to v1.6.4 and fix CMake 4.0 compatibility #48791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
|
@github-actions crossbow submit test-ubuntu-24.04-cpp-thread-sanitizer |
|
|
|
Revision: 7ebcda0 Submitted crossbow builds: ursacomputing/crossbow @ actions-82a9f13dfd
|
|
Can we disable |
|
I have some changes in #48797 could be applied here if that looks good! |
Thank you so much! @HyukjinKwon |
cpp/CMakeLists.txt
Outdated
| # Allow older bundled dependencies to build with CMake 4.0+ | ||
| set(CMAKE_POLICY_VERSION_MINIMUM 3.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just my two cents. I would rather make this PR minimized to fix the issue, and separately file an issue for this and make a PR :-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We should not mix separated problems as much as possible.
Let's revert this change from this PR, open a separated issue and let's discuss it there.
FYI: We already have similar code:
arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake
Lines 1023 to 1026 in b126c6e
| # We set CMAKE_POLICY_VERSION_MINIMUM temporarily due to failures with CMake 4 | |
| # We should remove it once we have updated the dependencies: | |
| # https://github.com/apache/arrow/issues/45985 | |
| set(CMAKE_POLICY_VERSION_MINIMUM 3.5) |
|
@github-actions crossbow submit test-ubuntu-24.04-cpp-thread-sanitizer |
|
Revision: 5852bc1 Submitted crossbow builds: ursacomputing/crossbow @ actions-d8e1dd6f27
|
|
I have reverted the extra changes as requested. This PR now only contains the -Wno-error suppression. I will open a separate PR shortly for the CMake 4.0 compatibility fix. Thank you once again! |
|
@github-actions crossbow submit test-ubuntu-24.04-cpp-thread-sanitizer |
|
Could you update the PR description? |
|
Revision: 92b2cd0 Submitted crossbow builds: ursacomputing/crossbow @ actions-0a32f5ea59
|
Could you open an issue before this? It's for "openness" of the Apache way. And could you add a "take" comment to #48787 to assign the issue to you? |
|
@github-actions crossbow submit -g cpp |
|
The Python / AMD64 Conda Python 3.10 Sphinx & Numpydoc failure is unrelated and has been fixed on main now. |
|
Revision: 92b2cd0 Submitted crossbow builds: ursacomputing/crossbow @ actions-5488c7cb94 |
raulcd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| # 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable to me, do we want to be more explicit as we do with substrait flags for example?
set(SUBSTRAIT_SUPPRESSED_FLAGS)
if(MSVC)
# Protobuf generated files trigger some spurious warnings on MSVC.
# Implicit conversion from uint64_t to uint32_t:
list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "/wd4244")
# Missing dll-interface:
list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "/wd4251")
else()
# GH-44954: silence [[deprecated]] declarations in protobuf-generated code
list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "-Wno-deprecated")
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL
"Clang")
# Protobuf generated files trigger some errors on CLANG TSAN builds
list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "-Wno-error=shorten-64-to-32")
endif()
endif()Thinking on something like:
if(TARGET s2n)
set(S2N_SUPPRESSED_FLAGS)
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Disable specific warnings for s2n-tls: it has Clang 18 warnings that it intentionally allows.
# See: https://github.com/aws/s2n-tls/issues/5696
list(APPEND S2N_SUPPRESSED_FLAGS "-Wno-error=documentation")
list(APPEND S2N_SUPPRESSED_FLAGS "-Wno-error=documentation-deprecated-sync")
list(APPEND S2N_SUPPRESSED_FLAGS "-Wno-error=shorten-64-to-32")
endif()
if(S2N_SUPPRESSED_FLAGS)
target_compile_options(s2n PRIVATE ${S2N_SUPPRESSED_FLAGS})
endif()
endif()@kou @HyukjinKwon what are your thoughts?
Also maybe only add the flags for Clang compiler?


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?
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.