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

[CI][C++] test-build-cpp-fuzz failed because Boost libraries are required #45423

Closed
kou opened this issue Feb 5, 2025 · 1 comment
Closed

Comments

@kou
Copy link
Member

kou commented Feb 5, 2025

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

https://github.com/ursacomputing/crossbow/actions/runs/13125731106/job/36621579172#step:7:271

CMake Warning at /usr/local/share/cmake-3.29/Modules/FindBoost.cmake:1398 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/local/share/cmake-3.29/Modules/FindBoost.cmake:1523 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.29/Modules/FindBoost.cmake:2135 (_Boost_MISSING_DEPENDENCIES)
  cmake_modules/ThirdpartyToolchain.cmake:313 (find_package)
  cmake_modules/ThirdpartyToolchain.cmake:1292 (resolve_dependency)
  CMakeLists.txt:546 (include)

This happened after #45397 is merged.

In general, libarrow_testing.{a,so} that are also used by fuzzer require boost::filesystem because arrow::util::Process uses it:

# ifdef BOOST_PROCESS_USE_V2
namespace process = BOOST_PROCESS_V2_NAMESPACE;
namespace filesystem = process::filesystem;
// For Boost < 1.87.0
# ifdef BOOST_PROCESS_V2_ASIO_NAMESPACE
namespace asio = BOOST_PROCESS_V2_ASIO_NAMESPACE;
# else
namespace asio = process::net;
# endif
# elif defined(BOOST_PROCESS_HAVE_V1)
namespace process = boost::process::v1;
namespace filesystem = boost::process::v1::filesystem;
# else
namespace process = boost::process;
namespace filesystem = boost::filesystem;
# endif
#endif

But it seems that we can use libarrow_testing.a without boost::filesystem when we don't use arrow::util::Process.

test-build-cpp-fuzz prepare only Boost headers: https://github.com/google/oss-fuzz/blob/e007cb7be3868cb4f55e030c6c2a4199ca750bb6/projects/arrow/build.sh#L20-L28

So, let's require boost::filesystem only when libarrow_testing.so is used.

Component(s)

C++, Continuous Integration

@kou kou added the Type: bug label Feb 5, 2025
kou added a commit to kou/arrow that referenced this issue Feb 5, 2025
…ON/ARROW_BUILD_SHARED=OFF

Because we can use `libarrow_testing.a` without `boost::filesystem`
when `arrow::util::Process` isn't used.
kou added a commit that referenced this issue Feb 6, 2025
…OW_BUILD_SHARED=OFF (#45424)

### Rationale for this change

We can use `libarrow_testing.a` without `boost::filesystem` when `arrow::util::Process` isn't used.

### What changes are included in this PR?

`ARROW_TESTING=ON` requires Boost. If `ARROW_BUILD_SHARED=ON` is also used, Boost libraries are also required.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #45423

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@kou kou added this to the 20.0.0 milestone Feb 6, 2025
@kou
Copy link
Member Author

kou commented Feb 6, 2025

Issue resolved by pull request 45424
#45424

@kou kou closed this as completed Feb 6, 2025
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

1 participant