Repository navigation
Description
Describe the bug, including details regarding any error messages, version, and platform.
The test-r-macos-as-cran crossbow job fails when compiling vector_sort.cc against the macOS 11.3 SDK:
error: cannot convert initializer list argument to 'std::span<uint64_t>'
This was introduced in #50248
arrow/cpp/src/arrow/compute/kernels/vector_sort.cc
Lines 234 to 248 in bc9d134
| auto range_start = indices.begin(); | |
| auto range_cur = range_start; | |
| auto last_value = GetView::LogicalValue(array.GetView(*range_cur - offset)); | |
| while (++range_cur != indices.end()) { | |
| auto v = GetView::LogicalValue(array.GetView(*range_cur - offset)); | |
| if (v != last_value) { | |
| visit({range_start, range_cur}); | |
| range_start = range_cur; | |
| last_value = v; | |
| } | |
| } | |
| if (range_start != range_cur) { | |
| visit({range_start, range_cur}); | |
| } | |
| } |
The macOS 11.3 libc++ implementation uses __wrap_iter for span iterators but only accepts raw pointers in this constructor. Using indices.data() for the internal range iteration, or constructing the range with subspan(), would likely retain the span interface and fix the issue.
diff --git a/cpp/src/arrow/compute/kernels/vector_sort.cc b/cpp/src/arrow/compute/kernels/vector_sort.cc
- auto range_start = indices.begin();
+ auto range_start = indices.data();
auto range_cur = range_start;
+ const auto range_end = range_start + indices.size();
auto last_value = GetView::LogicalValue(array.GetView(*range_cur - offset));
- while (++range_cur != indices.end()) {
+ while (++range_cur != range_end) {Crossbow failure:
https://github.com/ursacomputing/crossbow/actions/runs/30154135424/job/89669316217#step:9:2303
Component(s)
C++, R
Activity
KHARSHAVARDHAN-eng commentedon Jul 27, 2026
I'd like to work on this issue.
kou commentedon Jul 30, 2026
Issue resolved by pull request 50705
#50705
apacheGH-50636: [C++] Replace std::span/ranges usage to fix macOS CRAN (