Boost.Process V2 doesn't compile with musl library

Open
#469 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp, linux

Research direction

Reproduce the failure on Void Linux with musl, then inspect boost/process/v2/posix/detail/close_handles.ipp around lines 128-145, where the compiler reports missing close_range declarations. Done means Boost.Process V2 compiles successfully in that environment without the reported errors.

Written by the indexing model from the issue text.

Description

If I try to build code which works with glibc https://github.com/freeorion/freeorion/pull/5156 it failes to build on Void linux with musl library:

2025-03-11T03:42:09.7575013Z /usr/include/boost/process/v2/posix/detail/close_handles.ipp: In function 'void boost::process::v2::posix::detail::close_all(const std::vector<int>&, boost::system::error_code&)':
2025-03-11T03:42:09.7576711Z /usr/include/boost/process/v2/posix/detail/close_handles.ipp:128:15: error: '::close_range' has not been declared; did you mean 'copy_range'?
2025-03-11T03:42:09.7578069Z   128 |             ::close_range(0, whitelist.front() - 1, CLOSE_RANGE_UNSHARE);
2025-03-11T03:42:09.7578554Z       |               ^~~~~~~~~~~
2025-03-11T03:42:09.7578891Z       |               copy_range
2025-03-11T03:42:09.7579757Z /usr/include/boost/process/v2/posix/detail/close_handles.ipp:138:19: error: '::close_range' has not been declared; did you mean 'copy_range'?
2025-03-11T03:42:09.7580810Z   138 |                 ::close_range(mine + 1, next - 1, CLOSE_RANGE_UNSHARE);
2025-03-11T03:42:09.7581305Z       |                   ^~~~~~~~~~~
2025-03-11T03:42:09.7581672Z       |                   copy_range
2025-03-11T03:42:09.7582604Z /usr/include/boost/process/v2/posix/detail/close_handles.ipp:142:11: error: '::close_range' has not been declared; did you mean 'copy_range'?
2025-03-11T03:42:09.7583836Z   142 |         ::close_range(whitelist.back() + 1, std::numeric_limits<int>::max(), CLOSE_RANGE_UNSHARE);
2025-03-11T03:42:09.7584466Z       |           ^~~~~~~~~~~
2025-03-11T03:42:09.7584805Z       |           copy_range
2025-03-11T03:42:09.7585693Z /usr/include/boost/process/v2/posix/detail/close_handles.ipp:145:11: error: '::close_range' has not been declared; did you mean 'copy_range'?
2025-03-11T03:42:09.7586932Z   145 |         ::close_range(0, std::numeric_limits<int>::max(), CLOSE_RANGE_UNSHARE);
2025-03-11T03:42:09.7587491Z       |           ^~~~~~~~~~~
2025-03-11T03:42:09.7587829Z       |           copy_range
Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/process

All issues in boostorg/process

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.