From fa3cc7a7da70c771c88b677e49f6f0775116571e Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Mon, 26 Oct 2026 16:40:00 +0000 Subject: [PATCH 1/4] make regex more permissive --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 01e1ab147af..af89672163a 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -2861,10 +2861,13 @@ function(build_simdjson) target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0) - # The macOS 11.3 SDK has incomplete C++20 concepts support, which prevents + # The macOS 11 SDK has incomplete C++20 concepts support, which prevents # simdjson headers from compiling. Disable simdjson concepts for this SDK. - if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11\\.3\\.sdk$") - message(STATUS "Disabling simdjson concepts for macOS SDK 11.3") + # The SDK directory may be named either "MacOSX11.sdk" (as on the CRAN + # macOS builders) or "MacOSX11.3.sdk" (as installed by our as-cran CI job), + # so match both. + if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11(\\.[0-9]+)?\\.sdk$") + message(STATUS "Disabling simdjson concepts for macOS SDK 11") target_compile_definitions(simdjson PUBLIC SIMDJSON_CONCEPT_DISABLED=1) endif() From 0cc3986e51a552c8524e583d805374306ff3ac8c Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Mon, 26 Oct 2026 22:26:22 +0000 Subject: [PATCH 2/4] Update regex to match all MacOSX SDKs which are affected --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index af89672163a..a661d640457 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -2861,13 +2861,20 @@ function(build_simdjson) target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0) - # The macOS 11 SDK has incomplete C++20 concepts support, which prevents - # simdjson headers from compiling. Disable simdjson concepts for this SDK. - # The SDK directory may be named either "MacOSX11.sdk" (as on the CRAN - # macOS builders) or "MacOSX11.3.sdk" (as installed by our as-cran CI job), - # so match both. - if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11(\\.[0-9]+)?\\.sdk$") - message(STATUS "Disabling simdjson concepts for macOS SDK 11") + # macOS SDKs before 13.3 ship a libc++ without and with incomplete + # , but simdjson enables its C++20 concepts API from the compiler's + # __cpp_concepts alone, so its headers fail to compile against those SDKs + # (GH-55267). Disable simdjson concepts for them. Arrow doesn't use that part + # of the simdjson API. + # + # This goes by the SDK directory name, which may or may not carry a minor + # version, e.g. "MacOSX11.sdk" on the CRAN macOS builders and "MacOSX11.3.sdk" + # in our as-cran CI job, so match both forms. "MacOSX13.sdk" can't be told + # apart from 13.3, so it's treated as too old; disabling concepts on a working + # toolchain is harmless. An unversioned "MacOSX.sdk" sysroot isn't detected. + if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES + "MacOSX(1[0-2](\\.[0-9]+)?|13(\\.[0-2])?)\\.sdk$") + message(STATUS "Disabling simdjson concepts for macOS SDK older than 13.3") target_compile_definitions(simdjson PUBLIC SIMDJSON_CONCEPT_DISABLED=1) endif() From 99ff2069621a4a0f3773ff1d7da6e10d2c82a2b2 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Mon, 26 Oct 2026 22:29:48 +0000 Subject: [PATCH 3/4] Trim comment --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index a661d640457..69689096728 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -2867,11 +2867,9 @@ function(build_simdjson) # (GH-55267). Disable simdjson concepts for them. Arrow doesn't use that part # of the simdjson API. # - # This goes by the SDK directory name, which may or may not carry a minor - # version, e.g. "MacOSX11.sdk" on the CRAN macOS builders and "MacOSX11.3.sdk" - # in our as-cran CI job, so match both forms. "MacOSX13.sdk" can't be told - # apart from 13.3, so it's treated as too old; disabling concepts on a working - # toolchain is harmless. An unversioned "MacOSX.sdk" sysroot isn't detected. + # The SDK directory name may omit the minor version ("MacOSX11.sdk" on CRAN, + # "MacOSX11.3.sdk" in our as-cran CI job), so match both forms. This treats + # "MacOSX13.sdk" as too old, which is harmless. if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES "MacOSX(1[0-2](\\.[0-9]+)?|13(\\.[0-2])?)\\.sdk$") message(STATUS "Disabling simdjson concepts for macOS SDK older than 13.3") From b435bb6096f50041d11a87c68c732a7ad39affad Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Tue, 27 Oct 2026 12:30:21 +0000 Subject: [PATCH 4/4] Too many words --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 69689096728..84d65f59178 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -2865,7 +2865,8 @@ function(build_simdjson) # , but simdjson enables its C++20 concepts API from the compiler's # __cpp_concepts alone, so its headers fail to compile against those SDKs # (GH-55267). Disable simdjson concepts for them. Arrow doesn't use that part - # of the simdjson API. + # of the simdjson API. simdjson considers these SDKs unsupported and won't fix + # this upstream, see https://github.com/simdjson/simdjson/issues/2787. # # The SDK directory name may omit the minor version ("MacOSX11.sdk" on CRAN, # "MacOSX11.3.sdk" in our as-cran CI job), so match both forms. This treats