arrow icon indicating copy to clipboard operation
arrow copied to clipboard

[C++][Acero] Build failure on OS X and cppstd 23

Open taepper opened this issue 1 year ago • 6 comments

Describe the bug, including details regarding any error messages, version, and platform.

To reproduce:

git clone https://github.com/apache/arrow
cd arrow/cpp
cmake -B build -DCMAKE_CXX_STANDARD=23 -DARROW_ACERO=ON .
cmake --build build

The relevant generated error:

[ 90%] Building CXX object src/arrow/acero/CMakeFiles/arrow_acero_objlib.dir/asof_join_node.cc.o
In file included from /Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.cc:18:
In file included from /Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.h:18:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:325:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:35:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:32:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:635:30: error: no matching constructor for initialization of 'arrow::acero::BackpressureController'
  635 |   return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...));
      |                              ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.cc:515:14: note: in instantiation of function template specialization 'std::make_unique<arrow::acero::BackpressureController, arrow::acero::ExecNode *&, arrow::acero::AsofJoinNode *&, std::atomic<int> &>' requested here
  515 |         std::make_unique<BackpressureController>(
      |              ^
/Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.cc:464:3: note: candidate constructor not viable: cannot convert argument of incomplete type 'arrow::acero::AsofJoinNode *' to 'ExecNode *' for 2nd argument
  464 |   BackpressureController(ExecNode* node, ExecNode* output,
      |   ^                                      ~~~~~~~~~~~~~~~~
/Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.cc:462:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
  462 | class BackpressureController : public BackpressureControl {
      |       ^~~~~~~~~~~~~~~~~~~~~~
/Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.cc:462:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
  462 | class BackpressureController : public BackpressureControl {
      |       ^~~~~~~~~~~~~~~~~~~~~~
/Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.cc:794:17: warning: private field 'node_' is not used [-Wunused-private-field]
  794 |   AsofJoinNode* node_;
      |                 ^
/Users/ataeppe/tmp/arrow/cpp/src/arrow/acero/asof_join_node.cc:796:10: warning: private field 'index_' is not used [-Wunused-private-field]
  796 |   size_t index_;
      |          ^
2 warnings and 1 error generated.
make[2]: *** [src/arrow/acero/CMakeFiles/arrow_acero_objlib.dir/asof_join_node.cc.o] Error 1
make[1]: *** [src/arrow/acero/CMakeFiles/arrow_acero_objlib.dir/all] Error 2
make: *** [all] Error 2

I tested this on main (commit 72b0346003c23775021eef6f0f801cb6b44307a5).

Apple clang version 17.0.0 (clang-1700.0.13.5)

This originally surfaced for me when using with the dependency manager conan, which obfuscated the error quite a bit.

Component(s)

C++

taepper avatar Sep 16 '25 16:09 taepper

Yes, C++ 23 is still failing when building acero/asof_join_node.cc, see:

  • https://github.com/apache/arrow/issues/47207

@kou is that the right issue to track C++23 support?

raulcd avatar Sep 16 '25 16:09 raulcd

Yes. I've changed this issue as a subissue of #47207.

kou avatar Sep 17 '25 02:09 kou

@taepper Is this issue still valid?

pitrou avatar Oct 26 '26 15:10 pitrou

Still valid on main(4a6ebc06dc) with Apple clang 21.0.0 (clang-2100.3.34.2)

taepper avatar Oct 27 '26 07:10 taepper

We're patching our builds with https://github.com/apache/arrow/pull/50975

jmcarcell avatar Oct 29 '26 18:10 jmcarcell

Issue resolved by pull request 50975 https://github.com/apache/arrow/pull/50975

kou avatar Oct 30 '26 07:10 kou