Skip to content

Commit 2ecb29d

Browse files
authored
GH-55267: [C++][R] Arrow 26.0.0 fails to build on CRAN macOS builders: bundled simdjson C++20 concepts don't compile with the macOS 11 SDK (#55273)
### Rationale for this change CRAN failures on 26.0.0 release due to regex not catching incompatible MacOSX11.sdk version ### What changes are included in this PR? Make regex more permissive ### Are these changes tested? No ### Are there any user-facing changes? No **PR code and description written by:** - [x] Human - [x] AI **Reviewed before submission by:** - [x] Human - [x] AI - [ ] Not reviewed * GitHub Issue: #55267 Authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
1 parent 0b250b7 commit 2ecb29d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

‎cpp/cmake_modules/ThirdpartyToolchain.cmake‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,10 +2878,19 @@ function(build_simdjson)
28782878

28792879
target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0)
28802880

2881-
# The macOS 11.3 SDK has incomplete C++20 concepts support, which prevents
2882-
# simdjson headers from compiling. Disable simdjson concepts for this SDK.
2883-
if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11\\.3\\.sdk$")
2884-
message(STATUS "Disabling simdjson concepts for macOS SDK 11.3")
2881+
# macOS SDKs before 13.3 ship a libc++ without <ranges> and with incomplete
2882+
# <concepts>, but simdjson enables its C++20 concepts API from the compiler's
2883+
# __cpp_concepts alone, so its headers fail to compile against those SDKs
2884+
# (GH-55267). Disable simdjson concepts for them. Arrow doesn't use that part
2885+
# of the simdjson API. simdjson considers these SDKs unsupported and won't fix
2886+
# this upstream, see https://github.com/simdjson/simdjson/issues/2787.
2887+
#
2888+
# The SDK directory name may omit the minor version ("MacOSX11.sdk" on CRAN,
2889+
# "MacOSX11.3.sdk" in our as-cran CI job), so match both forms. This treats
2890+
# "MacOSX13.sdk" as too old, which is harmless.
2891+
if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES
2892+
"MacOSX(1[0-2](\\.[0-9]+)?|13(\\.[0-2])?)\\.sdk$")
2893+
message(STATUS "Disabling simdjson concepts for macOS SDK older than 13.3")
28852894
target_compile_definitions(simdjson PUBLIC SIMDJSON_CONCEPT_DISABLED=1)
28862895
endif()
28872896

0 commit comments

Comments
 (0)