Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

close_range is missing on FreeBSD 10

Open
#400 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with libs/process/src/posix/close_handles.cpp, where Process V2 calls close_range and FreeBSD 10 reports it as undeclared. Check the surrounding platform-specific logic and the reported build configuration, then verify that Boost Process builds successfully on FreeBSD 10 without the close_range errors.

Written by the indexing model from the issue text.

Description

We're trying to build Boost 1.86.0 for FreeBSD 10 and getting the following error:

".../i686-pc-freebsd10.0_gcc7.3.0/bin/i686-pc-freebsd10.0-g++"   -fvisibility-inlines-hidden -static-libgcc -static-libstdc++ -static-libgcc -static-libstdc++ -std=gnu++14 -fPIC   -O2 -DNDEBUG -DBOOST_CHRONO_THREAD_DISABLED -m32 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -march=i686  -DBOOST_ALL_NO_LIB=1 -DBOOST_ASIO_NO_DEPRECATED -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_PROCESS_SOURCE=1 -DNDEBUG   -I"."  -c -o ".../boost/bin.v2/libs/process/build/gcc-7/release/x86_32/link-static/target-os-freebsd/threading-multi/visibility-hidden/posix/close_handles.o" "libs/process/src/posix/close_handles.cpp"

libs/process/src/posix/close_handles.cpp: In function 'void boost::process::v2::posix::detail::close_all(const std::vector<int>&, boost::system::error_code&)':
libs/process/src/posix/close_handles.cpp:125:15: error: '::close_range' has not been declared
             ::close_range(0, whitelist.front() - 1, 0);
               ^~~~~~~~~~~
libs/process/src/posix/close_handles.cpp:125:15: note: suggested alternative: 'close_all'
             ::close_range(0, whitelist.front() - 1, 0);
               ^~~~~~~~~~~
               close_all
libs/process/src/posix/close_handles.cpp:135:19: error: '::close_range' has not been declared
                 ::close_range(mine + 1, next - 1, 0);
                   ^~~~~~~~~~~
libs/process/src/posix/close_handles.cpp:135:19: note: suggested alternative: 'close_all'
                 ::close_range(mine + 1, next - 1, 0);
                   ^~~~~~~~~~~
                   close_all

It seems this is due to code that is used only in Process V2. Is there a way to fallback to Process V1?

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.