This is an automated email from the ASF dual-hosted git repository.
rok pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 62d2dd8270a GH-50581: [C++][R] Use bundled simdjson for C++ wrapper
builds (#50587)
62d2dd8270a is described below
commit 62d2dd8270a303165a5f57de97c20aa1fe09f161
Author: Aaditya Srinivasan <[email protected]>
AuthorDate: Fri Jul 24 22:21:01 2026 +0530
GH-50581: [C++][R] Use bundled simdjson for C++ wrapper builds (#50587)
### Rationale
The R build may pick up a system-installed simdjson when `simdjson_SOURCE`
is not explicitly set. This causes build failures in environments where the
system version is incompatible or unsuitable for the build.
### What changes are included?
This change defaults `simdjson_SOURCE` to `BUNDLED` when it is not already
set, ensuring C++ wrapper builds invoked through `build_arrow_static.sh` use
the bundled simdjson by default, while still allowing users to override it
explicitly.
This addresses the macOS CRAN release and ubuntu-r-only-r (AUTO deps)
failures reported in GH-50581.
Related: #50581
* GitHub Issue: #50581
Authored-by: Aaditya Srinivasan <[email protected]>
Signed-off-by: Rok Mihevc <[email protected]>
---
.env | 4 ++--
cpp/cmake_modules/ThirdpartyToolchain.cmake | 16 +++++++++++++++-
cpp/src/arrow/CMakeLists.txt | 2 +-
r/inst/build_arrow_static.sh | 3 ++-
4 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/.env b/.env
index 6051a433873..ca77b9441d7 100644
--- a/.env
+++ b/.env
@@ -98,5 +98,5 @@ VCPKG="9b965a116838c6cdcd36bca60d1b81b030c8ab8d" #
2026.05.27 (not release, u
# ci/docker/python-*-windows-*.dockerfile or the vcpkg config.
# This is a workaround for our CI problem that "archery docker build" doesn't
# use pulled built images in dev/tasks/python-wheels/github.windows.yml.
-PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2026-07-13
-PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2026-07-13
+PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2026-07-24
+PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2026-07-24
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index c34bd87edd7..895b88118e4 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -410,6 +410,15 @@ if(ARROW_AZURE)
set(ARROW_WITH_AZURE_SDK ON)
endif()
+# The macOS 11.3 SDK has incomplete C++20 concepts support, which prevents
+# simdjson headers from compiling. Disable simdjson concepts for this SDK.
+if(ARROW_JSON
+ AND CMAKE_OSX_SYSROOT
+ AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11\\.3\\.sdk$")
+ message(STATUS "Disabling simdjson concepts for macOS SDK 11.3")
+ add_compile_definitions(SIMDJSON_CONCEPT_DISABLED=1)
+endif()
+
if(ARROW_JSON OR ARROW_FLIGHT_SQL_ODBC)
set(ARROW_WITH_RAPIDJSON ON)
endif()
@@ -2827,7 +2836,7 @@ function(build_simdjson)
TRUE
PARENT_SCOPE)
- list(APPEND ARROW_BUNDLED_STATIC_LIBS simdjson::simdjson)
+ list(APPEND ARROW_BUNDLED_STATIC_LIBS simdjson)
set(ARROW_BUNDLED_STATIC_LIBS
"${ARROW_BUNDLED_STATIC_LIBS}"
PARENT_SCOPE)
@@ -2844,6 +2853,11 @@ if(ARROW_WITH_SIMDJSON)
${ARROW_SIMDJSON_REQUIRED_VERSION}
IS_RUNTIME_DEPENDENCY
FALSE)
+ if(SIMDJSON_VENDORED)
+ add_library(arrow::simdjson ALIAS simdjson)
+ else()
+ add_library(arrow::simdjson ALIAS simdjson::simdjson)
+ endif()
endif()
function(build_rapidjson)
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index e792574a183..0b21fec6058 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -1044,7 +1044,7 @@ if(ARROW_JSON)
json/parser.cc
json/reader.cc)
foreach(ARROW_JSON_TARGET ${ARROW_JSON_TARGETS})
- target_link_libraries(${ARROW_JSON_TARGET} PRIVATE RapidJSON
simdjson::simdjson)
+ target_link_libraries(${ARROW_JSON_TARGET} PRIVATE RapidJSON
arrow::simdjson)
endforeach()
else()
set(ARROW_JSON_TARGET_SHARED)
diff --git a/r/inst/build_arrow_static.sh b/r/inst/build_arrow_static.sh
index e7f453bb64e..870e60055c4 100755
--- a/r/inst/build_arrow_static.sh
+++ b/r/inst/build_arrow_static.sh
@@ -107,8 +107,9 @@ ${CMAKE_WRAPPER} ${CMAKE} -DARROW_BOOST_USE_SHARED=OFF \
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON \
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \
-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} \
- -Dre2_SOURCE=${re2_SOURCE:-BUNDLED} \
-Dabsl_SOURCE=${absl_SOURCE:-BUNDLED} \
+ -Dre2_SOURCE=${re2_SOURCE:-BUNDLED} \
+ -Dsimdjson_SOURCE=${simdjson_SOURCE:-BUNDLED} \
-Dxsimd_SOURCE=${xsimd_SOURCE:-} \
-Dzstd_SOURCE=${zstd_SOURCE:-} \
${EXTRA_CMAKE_FLAGS} \