Skip to content

Conversation

@meher745
Copy link

@meher745 meher745 commented Jan 8, 2026

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.

@kou kou changed the title MINOR: [Cpp] Upgrade s2n-tls to v1.6.4 and fix CMake 4.0 compatibility GH-48787: [C++] Upgrade s2n-tls to v1.6.4 and fix CMake 4.0 compatibility Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

⚠️ GitHub issue #48787 has been automatically assigned in GitHub to PR creator.

@kou
Copy link
Member

kou commented Jan 9, 2026

@github-actions crossbow submit test-ubuntu-24.04-cpp-thread-sanitizer

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

⚠️ GitHub issue #48787 has been automatically assigned in GitHub to PR creator.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Revision: 7ebcda0

Submitted crossbow builds: ursacomputing/crossbow @ actions-82a9f13dfd

Task Status
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@kou
Copy link
Member

kou commented Jan 9, 2026

Can we disable -Werror for bundled s2n-tls?

@HyukjinKwon
Copy link
Member

I have some changes in #48797 could be applied here if that looks good!

@meher745
Copy link
Author

meher745 commented Jan 9, 2026

I have some changes in #48797 could be applied here if that looks good!

Thank you so much! @HyukjinKwon

Comment on lines 19 to 20
# Allow older bundled dependencies to build with CMake 4.0+
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-01-09 at 10 27 09 AM While building on my local system, I was getting this error. So I thought it would be better to comply with this requirement.

Copy link
Member

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 :-).

Copy link
Member

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:

# 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)

@kou
Copy link
Member

kou commented Jan 9, 2026

@github-actions crossbow submit test-ubuntu-24.04-cpp-thread-sanitizer

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Revision: 5852bc1

Submitted crossbow builds: ursacomputing/crossbow @ actions-d8e1dd6f27

Task Status
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jan 9, 2026
@meher745
Copy link
Author

meher745 commented Jan 9, 2026

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!

@HyukjinKwon
Copy link
Member

The change LGTM! BTW seems like there was testing deletion that mistakenly happened

Screenshot 2026-01-09 at 2 44 54 PM

Might need to restore 👍

@meher745
Copy link
Author

meher745 commented Jan 9, 2026

The change LGTM! BTW seems like there was testing deletion that mistakenly happened

Screenshot 2026-01-09 at 2 44 54 PM Might need to restore 👍

Done! Thank you!

@kou
Copy link
Member

kou commented Jan 9, 2026

@github-actions crossbow submit test-ubuntu-24.04-cpp-thread-sanitizer

@kou
Copy link
Member

kou commented Jan 9, 2026

Could you update the PR description?

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Revision: 92b2cd0

Submitted crossbow builds: ursacomputing/crossbow @ actions-0a32f5ea59

Task Status
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@kou
Copy link
Member

kou commented Jan 9, 2026

I will open a separate PR shortly for the CMake 4.0 compatibility fix.

Could you open an issue before this? It's for "openness" of the Apache way.
See also: https://theapacheway.com/open/

And could you add a "take" comment to #48787 to assign the issue to you?

@raulcd
Copy link
Member

raulcd commented Jan 9, 2026

@github-actions crossbow submit -g cpp

@raulcd
Copy link
Member

raulcd commented Jan 9, 2026

The Python / AMD64 Conda Python 3.10 Sphinx & Numpydoc failure is unrelated and has been fixed on main now.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Revision: 92b2cd0

Submitted crossbow builds: ursacomputing/crossbow @ actions-5488c7cb94

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-cpp-ubuntu-24.04-cuda-13.0.2 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-experimental-cpp-gcc-15 GitHub Actions
test-fedora-42-cpp GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

Copy link
Member

@raulcd raulcd left a 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)
Copy link
Member

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?

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants