Skip to content

GH-55429: [C++] Avoid unavailable libc++ utilities in CRAN builds - #55438

Closed
JonSnow1807 wants to merge 1 commit into
apache:mainfrom
JonSnow1807:fix-cran-sdk-cxx20
Closed

JonSnow1807 wants to merge 1 commit into
apache:mainfrom
JonSnow1807:fix-cran-sdk-cxx20

Conversation

@JonSnow1807

@JonSnow1807 JonSnow1807 commented Nov 7, 2026 •

Copy link
Copy Markdown

Closes #55429.

Closes #55430.

Rationale for this change

The CRAN macOS build uses the macOS 11.3 SDK, whose libc++ lacks std::invocable and std::in_range.

The std::invocable failure occurs first and masks the std::in_range failure, so both need to be addressed for this build configuration.

What changes are included in this PR?

Replace std::invocable with std::is_invocable_v in the two transform constraints in codegen_internal.h, and remove the unused <concepts> include.

Replace the endpoint-based std::in_range checks in Parquet’s can_hold_v with a comparison of numeric_limits::digits and signedness. The predicate continues to determine whether the destination integer type can represent the source type’s complete range.

Are these changes tested?

A Linux GCC 13 source build succeeds with the patch.

The targeted suites pass:

  • Kernel utility tests: 6 passed.
  • Parquet reader tests: 180 passed, 10 skipped.

The integer-range predicate was also checked against the previous expression for 64 signed and unsigned integer-type pairs. Formatting passes with the repository’s pinned clang-format 18.1.8.

The macOS 11.3 SDK was unavailable in the validation environment, so the exact test-r-macos-as-cran build still needs CI verification.

Are there any user-facing changes?

This addresses compilation failures with the older libc++ used by the CRAN build. No public API or intended runtime behavior changes.

Was AI used for this PR?

AI tools assisted with implementation, review, and validation. I reviewed the code, tests, and description before submission.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant