Skip to content

[C++] Add support for Boost 1.86 #43746

@h-vetinari

Description

@h-vetinari

Compiling arrow 17 (using -DARROW_BUILD_TESTS=ON) with the headers from the recently-released boost 1.86 results in compilation errors, see below.

Looking at the errors, the key point from the release notes seems to be:

Moved the old boost.process to v1 subfolder and inline namespace. deprecated process/*.hpp v1 headers

GCC 12

Details
[429/930] Building CXX object src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o
FAILED: src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o 
$BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ -DARROW_FLIGHT_EXPORTING -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DGRPC_ENABLE_ASYNC -DGRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS=grpc::experimental -DGRPC_USE_CERTIFICATE_VERIFIER -DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DPROTOBUF_USE_DLLS -I$SRC_DIR/cpp/build/src -I$SRC_DIR/cpp/src -I$SRC_DIR/cpp/src/generated -Wno-noexcept-type -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/apache-arrow-17.0.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fdiagnostics-color=always -fuse-ld=gold  -Wall -fno-semantic-interposition -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/apache-arrow-17.0.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -O3 -DNDEBUG -O2 -ftree-vectorize  -std=c++17 -fPIC -pthread -MD -MT src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o -MF src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o.d -o src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o -c $SRC_DIR/cpp/src/arrow/flight/test_util.cc
$SRC_DIR/cpp/src/arrow/flight/test_util.cc: In member function 'void arrow::flight::TestServer::Start(const std::vector<std::__cxx11::basic_string<char> >&)':
$SRC_DIR/cpp/src/arrow/flight/test_util.cc:133:16: error: parse error in template argument list
  133 |           std::make_shared<bp::child>(bp::search_path(executable_name_, search_path),
      |                ^~~~~~~~~~~~~~~~~~~~~~
$SRC_DIR/cpp/src/arrow/flight/test_util.cc:133:38: error: no matching function for call to 'make_shared<<expression error> >(boost::filesystem::path, const char [6], std::string&, boost::process::v1::detail::arg_setter_<char, true>)'
  133 |           std::make_shared<bp::child>(bp::search_path(executable_name_, search_path),
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  134 |                                       "-port", str_port, bp::args(extra_args));
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Clang 17

Details
[430/931] Building CXX object src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o
FAILED: src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o 
$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -DARROW_FLIGHT_EXPORTING -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DGRPC_ENABLE_ASYNC -DGRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS=grpc::experimental -DGRPC_USE_CERTIFICATE_VERIFIER -DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DPROTOBUF_USE_DLLS -I$SRC_DIR/cpp/build/src -I$SRC_DIR/cpp/src -I$SRC_DIR/cpp/src/generated -fno-aligned-new -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/apache-arrow-17.0.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -D_LIBCPP_DISABLE_AVAILABILITY -Qunused-arguments -fcolor-diagnostics  -Wall -Wno-unknown-warning-option -Wno-pass-failed -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/apache-arrow-17.0.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -D_LIBCPP_DISABLE_AVAILABILITY -O3 -DNDEBUG -O2  -std=c++17 -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.13 -fPIC -MD -MT src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o -MF src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o.d -o src/arrow/flight/CMakeFiles/arrow_flight_testing_objlib.dir/test_util.cc.o -c $SRC_DIR/cpp/src/arrow/flight/test_util.cc
$SRC_DIR/cpp/src/arrow/flight/test_util.cc:133:32: error: reference to 'child' is ambiguous
  133 |           std::make_shared<bp::child>(bp::search_path(executable_name_, search_path),
      |                                ^
$SRC_DIR/cpp/src/arrow/flight/test_util.h:44:7: note: candidate found by name lookup is 'boost::process::child'
   44 | class child;
      |       ^
$PREFIX/include/boost/process/v1/detail/execute_impl.hpp:45:7: note: candidate found by name lookup is 'boost::process::v1::child'
   45 | class child;
      |       ^

MSVC 19.40

Details
[106/369] Building CXX object src\arrow\flight\CMakeFiles\arrow_flight_testing_shared.dir\Unity\unity_0_cxx.cxx.obj
FAILED: src/arrow/flight/CMakeFiles/arrow_flight_testing_shared.dir/Unity/unity_0_cxx.cxx.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\cl.exe  /nologo /TP -DABSL_CONSUME_DLL -DARROW_FLIGHT_EXPORTING -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB -DGPR_DLL_IMPORTS -DGRPCXX_DLL_IMPORTS -DGRPC_DLL_IMPORTS -DGRPC_ENABLE_ASYNC -DGRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS=grpc::experimental -DGRPC_USE_CERTIFICATE_VERIFIER -DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DPROTOBUF_USE_DLLS -DUPB_DLL_IMPORTS -DUSE_IMPORT_EXPORT -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -Darrow_flight_testing_shared_EXPORTS -I%SRC_DIR%\cpp\build\src -I%SRC_DIR%\cpp\src -I%SRC_DIR%\cpp\src\generated -external:I%PREFIX%\Library\include -external:W0 /DWIN32 /D_WINDOWS /GR /EHsc /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING  /EHsc /wd5105 /bigobj /utf-8 /W3 /wd4800 /wd4996 /wd4065  /O2 /Ob2 /DNDEBUG -std:c++17 -MD /showIncludes /Fosrc\arrow\flight\CMakeFiles\arrow_flight_testing_shared.dir\Unity\unity_0_cxx.cxx.obj /Fdsrc\arrow\flight\CMakeFiles\arrow_flight_testing_shared.dir\ /FS -c %SRC_DIR%\cpp\build\src\arrow\flight\CMakeFiles\arrow_flight_testing_shared.dir\Unity\unity_0_cxx.cxx
D:/bld/apache-arrow_1724038670570/work/cpp/src/arrow/flight/test_util.cc(133): error C2872: 'child': ambiguous symbol
%SRC_DIR%\cpp\src\arrow/flight/test_util.h(44): note: could be 'boost::process::child'
%PREFIX%\Library\include\boost/process/v1/detail/execute_impl.hpp(45): note: or       'boost::process::v1::child'

Component(s)

C++

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions