← All tasks
cppapache/arrow #51140Not a task: not reproduced

[C++] Require simdjson 4.3.0 for fractured_json APIs

envgap__apache__arrow-51140

01 / FAILURE SIGNATURE

As reported upstream

...cpp/src/arrow/util/simdjson_internal.h:94:23: error: no type named 'fractured_json_options' in namespace 'simdjson'
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
a4e3909bcf59911316a696990f1eb1d583cddae1
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

apache/arrow #51140 · read the original issue
### Describe the bug, including details regarding any error messages, version, and platform.

Commit c8240bd63a introduced use of `simdjson::fractured_json_options` and `simdjson::fractured_json_string` (commit 06e3b9a864 later moved that).

These APIs are available starting with [simdjson 4.3.0](https://github.com/simdjson/simdjson/releases/tag/v4.3.0),
but `ARROW_SIMDJSON_REQUIRED_VERSION` is still set to `4.0.0`
https://github.com/apache/arrow/blob/a62870ce4c7a7c9b570fbb5d1376cb482f144659/cpp/cmake_modules/ThirdpartyToolchain.cmake#L2855

CMake may accept system simdjson 4.2.3 install and fail:

```console
[2/800] Building CXX object src/arrow/CMake.../arrow_util.dir/util/simdjson_internal.cc.
FAILED: [code=1] src/arrow/CMakeFiles/arrow_util.dir/util/simdjson_internal.cc.o ... 

In file included from ...cpp/src/arrow/util/simdjson_internal.cc:18:
...cpp/src/arrow/util/simdjson_internal.h:94:23: error: no type named 'fractured_json_options' in namespace 'simdjson'
   94 |       const simdjson::fractured_json_options& options = {}) const;
      |             ~~~~~~~~~~^
...cpp/src/arrow/util/simdjson_internal.cc:353:21: error: no type named 'fractured_json_options' in namespace 'simdjson'
  353 |     const simdjson::fractured_json_options& options) const {
      |           ~~~~~~~~~~^
...cpp/src/arrow/util/simdjson_internal.cc:355:20: error: no member named 'fractured_json_string' in namespace 'simdjson'
  355 |   return simdjson::fractured_json_string(json, options);
      |          ~~~~~~~~~~^
3 errors generated.
[3/800] Building CXX object src/arrow/CMake...ation.dir/integration/json_integration.cc.
FAILED: [code=1] src/arrow/CMakeFiles/arrow_integration.dir/integration/json_integration.cc.o 
...
```

This was reproduced on macOS with system simdjson 4.2.3.
Builds using bundled simdjson 4.6.4 or Conda simdjson 4.6.4 are not affected 
https://github.com/apache/arrow/blob/a4e3909bcf59911316a696990f1eb1d583cddae1/cpp/thirdparty/versions.txt#L105

### Component(s)

C++
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]