Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
h-vetinari opened this issue Aug 19, 2024 · 1 comment
Closed

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

h-vetinari opened this issue Aug 19, 2024 · 1 comment

Comments

@h-vetinari
Copy link
Contributor

h-vetinari commented Aug 19, 2024

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

[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

[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

[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++

@kou kou changed the title BUG: compilation error with boost 1.86 [C++] Add support for Boost 1.86 Aug 19, 2024
kou added a commit to kou/arrow that referenced this issue Aug 20, 2024
boost/process/*.hpp are deprecated since Boost 1.86. And it seems that
it also adds backward incompatible change. We need to use
boost/process/v2/*.hpp instead.

This introduces `arrow::util::Process` for testing. It wraps
boost/process/ API. So we don't need to use boost/process/ API
directly in our tests.
kou added a commit to kou/arrow that referenced this issue Aug 22, 2024
boost/process/*.hpp are deprecated since Boost 1.86. And it seems that
it also adds backward incompatible change. We need to use
boost/process/v2/*.hpp instead.

This introduces `arrow::util::Process` for testing. It wraps
boost/process/ API. So we don't need to use boost/process/ API
directly in our tests.
kou added a commit to kou/arrow that referenced this issue Aug 23, 2024
boost/process/*.hpp are deprecated since Boost 1.86. And it seems that
it also adds backward incompatible change. We need to use
boost/process/v2/*.hpp instead.

This introduces `arrow::util::Process` for testing. It wraps
boost/process/ API. So we don't need to use boost/process/ API
directly in our tests.
kou added a commit to kou/arrow that referenced this issue Aug 29, 2024
boost/process/*.hpp are deprecated since Boost 1.86. And it seems that
it also adds backward incompatible change. We need to use
boost/process/v2/*.hpp instead.

This introduces `arrow::util::Process` for testing. It wraps
boost/process/ API. So we don't need to use boost/process/ API
directly in our tests.
kou added a commit that referenced this issue Sep 3, 2024
### Rationale for this change

`boost/process/*.hpp` are deprecated since Boost 1.86. And it seems that it also adds backward incompatible change. We need to use `boost/process/v2/*.hpp` instead.

### What changes are included in this PR?

This introduces `arrow::util::Process` for testing. It wraps boost/process/ API. So we don't need to use boost/process/ API directly in our tests.

We still use the v1 API on Windows because the v2 API doesn't process group and we don't have a workaround for it on Windows. If GCS's testbench doesn't use multiple processes, we can use the v2 API on Windows because we don't need to use process group in our use case.

See also:
* The v2 API and process group: boostorg/process#259
* GCS's testbench and multiple processes: googleapis/storage-testbench#669

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #43746

Lead-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@kou kou added this to the 18.0.0 milestone Sep 3, 2024
@kou
Copy link
Member

kou commented Sep 3, 2024

Issue resolved by pull request 43766
#43766

@kou kou closed this as completed Sep 3, 2024
mapleFU pushed a commit to mapleFU/arrow that referenced this issue Sep 3, 2024
### Rationale for this change

`boost/process/*.hpp` are deprecated since Boost 1.86. And it seems that it also adds backward incompatible change. We need to use `boost/process/v2/*.hpp` instead.

### What changes are included in this PR?

This introduces `arrow::util::Process` for testing. It wraps boost/process/ API. So we don't need to use boost/process/ API directly in our tests.

We still use the v1 API on Windows because the v2 API doesn't process group and we don't have a workaround for it on Windows. If GCS's testbench doesn't use multiple processes, we can use the v2 API on Windows because we don't need to use process group in our use case.

See also:
* The v2 API and process group: boostorg/process#259
* GCS's testbench and multiple processes: googleapis/storage-testbench#669

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#43746

Lead-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
zanmato1984 pushed a commit to zanmato1984/arrow that referenced this issue Sep 6, 2024
### Rationale for this change

`boost/process/*.hpp` are deprecated since Boost 1.86. And it seems that it also adds backward incompatible change. We need to use `boost/process/v2/*.hpp` instead.

### What changes are included in this PR?

This introduces `arrow::util::Process` for testing. It wraps boost/process/ API. So we don't need to use boost/process/ API directly in our tests.

We still use the v1 API on Windows because the v2 API doesn't process group and we don't have a workaround for it on Windows. If GCS's testbench doesn't use multiple processes, we can use the v2 API on Windows because we don't need to use process group in our use case.

See also:
* The v2 API and process group: boostorg/process#259
* GCS's testbench and multiple processes: googleapis/storage-testbench#669

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#43746

Lead-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
khwilson pushed a commit to khwilson/arrow that referenced this issue Sep 14, 2024
### Rationale for this change

`boost/process/*.hpp` are deprecated since Boost 1.86. And it seems that it also adds backward incompatible change. We need to use `boost/process/v2/*.hpp` instead.

### What changes are included in this PR?

This introduces `arrow::util::Process` for testing. It wraps boost/process/ API. So we don't need to use boost/process/ API directly in our tests.

We still use the v1 API on Windows because the v2 API doesn't process group and we don't have a workaround for it on Windows. If GCS's testbench doesn't use multiple processes, we can use the v2 API on Windows because we don't need to use process group in our use case.

See also:
* The v2 API and process group: boostorg/process#259
* GCS's testbench and multiple processes: googleapis/storage-testbench#669

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#43746

Lead-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants