Skip to content

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Jun 21, 2021

Pass boost's build settings to boost-specific library detection. As boost::process is header-only, setting the CPPFLAGS is enough, there is no need to set LIBS.

Closes #22269.

Pass boost's build settings to boost-specific library detection. As
boost::process is header-only, setting the CPPFLAGS is enough, there is
no need to set LIBS.

Closes bitcoin#22269.
@DrahtBot
Copy link
Contributor

Guix builds

File commit 6a67366
(master)
commit 62a677c9ad8702885c78e96acf61ec82e9db13aa
(master and this pull)
SKIPATTEST.TAG e3b0c44298fc1c14... e3b0c44298fc1c14...
*.tar.gz ed3096aa949f1b56... 09ab7371ba18012f...
guix_build.log 7920a375a22476b1... 96ef752b407daf68...
guix_build.log.diff 6eba84a29347b780...

@DrahtBot
Copy link
Contributor

Gitian builds

File commit 398dd67
(master)
commit 030c99decc37f964c5bc42a7c210bf63c5bdd8ec
(master and this pull)
*-osx-unsigned.dmg 92e2d116b58d4214... b0eab3680b3992e5...
*-osx64.tar.gz 02578406a266bd45... adf004565ec5cf57...
*.tar.gz b16fc2a40cba5b8c... a5d540ce0163bf48...
bitcoin-core-osx-22-res.yml f2972b31a41adb54... 12ab96996f4f1fa2...
linux-build.log 6c8e74cad31e39a3... 6a4dad873cf3c729...
osx-build.log bb8f3e7c16328172... 3d74c82e6fd2fe54...
win-build.log 2eea226b75083143... 7b244d60830e6f7f...
bitcoin-core-osx-22-res.yml.diff 37bb5243ec83208c...
linux-build.log.diff 8aa0e569c5b93f7c...
osx-build.log.diff 4f209023899dc278...
win-build.log.diff 4ac255f3cbdf36a6...

Copy link
Contributor

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8d87a0c

Confirming bug #22269 on my FreeBSD 13 machine. This PR fixes the configuration error and allows me to build.

master:

checking for Boost Process... configure: error: Boost::Process is required for external signer support, but not available!

pr:

checking for Boost Process... yes

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this patch, the boost::process header is now found on my OpenBSD 6.9 machine. Unfortunately, it still fails:

configure:31594: checking for Boost Process
configure:31609: c++ -std=c++17 -c -g -O2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DPROVIDE_FUZZ_MAIN_FUNCTION -I/usr/local/include conftest.cpp >&5
In file included from conftest.cpp:79:
In file included from /usr/local/include/boost/process.hpp:25:
In file included from /usr/local/include/boost/process/group.hpp:32:
/usr/local/include/boost/process/detail/posix/wait_group.hpp:38:17: error: no member named 'waitid' in the global namespace
        ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
              ~~^
/usr/local/include/boost/process/detail/posix/wait_group.hpp:38:24: error: use of undeclared identifier 'P_PGID'
        ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                       ^
/usr/local/include/boost/process/detail/posix/wait_group.hpp:38:48: error: use of undeclared identifier 'WEXITED'
        ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                                               ^
/usr/local/include/boost/process/detail/posix/wait_group.hpp:144:17: error: no member named 'waitid' in the global namespace
        ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
              ~~^
/usr/local/include/boost/process/detail/posix/wait_group.hpp:144:24: error: use of undeclared identifier 'P_PGID'
        ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                       ^
/usr/local/include/boost/process/detail/posix/wait_group.hpp:144:49: error: use of undeclared identifier 'WEXITED'
        ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                                                ^
/usr/local/include/boost/process/detail/posix/wait_group.hpp:144:59: error: use of undeclared identifier 'WSTOPPED'
        ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                                                          ^
7 errors generated.

It seems like this is an issue with Boost integration in OpenBSD though (which e.g. indeed has no waitid).

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8d87a0c
(the patch fulfills its purpose and my report above about boost::process failing on OpenBSD is unrelated; OpenBSD users just have to wait untill boost::process integration is fixed)

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member Author

laanwj commented Jun 24, 2021

It seems like this is an issue with Boost integration in OpenBSD though (which e.g. indeed has no waitid).

Should we recommend --disable-external-signer in doc/build-openbsd.md? Otherwise, the build fails by default there?

@laanwj
Copy link
Member Author

laanwj commented Jun 24, 2021

Closing in favor of #22320

@laanwj laanwj closed this Jun 24, 2021
fanquake added a commit that referenced this pull request Jun 24, 2021
957f358 build: remove check for Boost Process header (fanquake)
df2c933 build: remove workaround for Boost and std::atomic (fanquake)
2bf2116 build: set minimum required Boost to 1.64.0 (fanquake)

Pull request description:

  Setting a newer minimum required Boost means we can remove the awkward header / compile check for Boost Process.

  If we don't do this, we should at-least make Boost Process being missing no longer a failure, otherwise anyone building using Boost < 1.64.0 would have to pass `--disable-external-signer` as well.

  The only system I can see that is affected here, (doesn't have new enough system packages) is Debian Oldstable. However, anyone compiling there, can use depends. They can also no-longer use the system GCC (6.0), and I'd assume would be using Clang 7, which would be the newest compiler available to them. It's extended, LTS support also end in 1 year from now, so anyone still using it should be considering upgrading.

  Debian Buster (Stable) has 1.67+, Ubuntu Bionic has 1.65+, any of the BSDs, recent Fedora, macOS etc all also have well and truly new enough Boost versions available.

  I think this is something we should just do for 22.0. If not, definitely for 23.0.

  Fixes #22319. Compiling Bitcoin Core should work, as `windows.h` will be included.
  Alternative to #22294.
  Would also close #22269.
  #19128 could be re-opened.

ACKs for top commit:
  laanwj:
    Tested ACK 957f358 that this fixes #22269.
  MarcoFalke:
    review ACK 957f358

Tree-SHA512: a8ffa7933dce8bf994892ef16664103d7b4e1008e52628e9becb918a7727232dfb51b23100a82dc2b60cd9af5877abc32dc2d3754a7e1b3ac5410a92fdf393f3
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 24, 2021
957f358 build: remove check for Boost Process header (fanquake)
df2c933 build: remove workaround for Boost and std::atomic (fanquake)
2bf2116 build: set minimum required Boost to 1.64.0 (fanquake)

Pull request description:

  Setting a newer minimum required Boost means we can remove the awkward header / compile check for Boost Process.

  If we don't do this, we should at-least make Boost Process being missing no longer a failure, otherwise anyone building using Boost < 1.64.0 would have to pass `--disable-external-signer` as well.

  The only system I can see that is affected here, (doesn't have new enough system packages) is Debian Oldstable. However, anyone compiling there, can use depends. They can also no-longer use the system GCC (6.0), and I'd assume would be using Clang 7, which would be the newest compiler available to them. It's extended, LTS support also end in 1 year from now, so anyone still using it should be considering upgrading.

  Debian Buster (Stable) has 1.67+, Ubuntu Bionic has 1.65+, any of the BSDs, recent Fedora, macOS etc all also have well and truly new enough Boost versions available.

  I think this is something we should just do for 22.0. If not, definitely for 23.0.

  Fixes bitcoin#22319. Compiling Bitcoin Core should work, as `windows.h` will be included.
  Alternative to bitcoin#22294.
  Would also close bitcoin#22269.
  bitcoin#19128 could be re-opened.

ACKs for top commit:
  laanwj:
    Tested ACK 957f358 that this fixes bitcoin#22269.
  MarcoFalke:
    review ACK 957f358

Tree-SHA512: a8ffa7933dce8bf994892ef16664103d7b4e1008e52628e9becb918a7727232dfb51b23100a82dc2b60cd9af5877abc32dc2d3754a7e1b3ac5410a92fdf393f3
laanwj added a commit to bitcoin-core/gui that referenced this pull request Jul 12, 2021
…r` in OpenBSD build guide

e65d1d4 doc: recommend `--disable-external-signer` in OpenBSD build guide (Sebastian Falbesoner)

Pull request description:

  Building the master branch with the default build settings (i.e. with external signer support enabled) leads to the following errors on my OpenBSD 6.9 machine:

  ```
  In file included from util/system.cpp:9:
  In file included from /usr/local/include/boost/process.hpp:25:
  In file included from /usr/local/include/boost/process/group.hpp:32:
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:38:17: error: no member named 'waitid' in the global namespace
          ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                ~~^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:38:24: error: use of undeclared identifier 'P_PGID'
          ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                         ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:38:48: error: use of undeclared identifier 'WEXITED'
          ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                                                 ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:17: error: no member named 'waitid' in the global namespace
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                ~~^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:24: error: use of undeclared identifier 'P_PGID'
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                         ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:49: error: use of undeclared identifier 'WEXITED'
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                                                  ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:59: error: use of undeclared identifier 'WSTOPPED'
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                                                            ^
  7 errors generated.
  ```

  This PR recommends passing `--disable-external-signer` in the OpenBSD build guide ([as suggested by laanwj](bitcoin/bitcoin#22294 (comment))). The same commit also bumps the OpenBSD version mentioned in the header to 6.9 -- I recently used this document to setup a Bitcoin Core build on 6.9 and the description and all mentioned versions were still valid (before external signer support was enabled by default).

  Would be nice if another OpenBSD user could confirm the build error.

ACKs for top commit:
  laanwj:
    ACK e65d1d4

Tree-SHA512: c3ae7eca29cf42b4b52024477e1c3fb7242bbf9d809bc95f8fa08b2f9bf4bcfd4f22457d58569a208ac1d8e5fe41b270addd13d85a5bba0521a0f9e325288448
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 14, 2021
…enBSD build guide

e65d1d4 doc: recommend `--disable-external-signer` in OpenBSD build guide (Sebastian Falbesoner)

Pull request description:

  Building the master branch with the default build settings (i.e. with external signer support enabled) leads to the following errors on my OpenBSD 6.9 machine:

  ```
  In file included from util/system.cpp:9:
  In file included from /usr/local/include/boost/process.hpp:25:
  In file included from /usr/local/include/boost/process/group.hpp:32:
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:38:17: error: no member named 'waitid' in the global namespace
          ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                ~~^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:38:24: error: use of undeclared identifier 'P_PGID'
          ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                         ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:38:48: error: use of undeclared identifier 'WEXITED'
          ret = ::waitid(P_PGID, p.grp, &status, WEXITED | WNOHANG);
                                                 ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:17: error: no member named 'waitid' in the global namespace
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                ~~^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:24: error: use of undeclared identifier 'P_PGID'
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                         ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:49: error: use of undeclared identifier 'WEXITED'
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                                                  ^
  /usr/local/include/boost/process/detail/posix/wait_group.hpp:144:59: error: use of undeclared identifier 'WSTOPPED'
          ret = ::waitid(P_PGID, p.grp, &siginfo, WEXITED | WSTOPPED | WNOHANG);
                                                            ^
  7 errors generated.
  ```

  This PR recommends passing `--disable-external-signer` in the OpenBSD build guide ([as suggested by laanwj](bitcoin#22294 (comment))). The same commit also bumps the OpenBSD version mentioned in the header to 6.9 -- I recently used this document to setup a Bitcoin Core build on 6.9 and the description and all mentioned versions were still valid (before external signer support was enabled by default).

  Would be nice if another OpenBSD user could confirm the build error.

ACKs for top commit:
  laanwj:
    ACK e65d1d4

Tree-SHA512: c3ae7eca29cf42b4b52024477e1c3fb7242bbf9d809bc95f8fa08b2f9bf4bcfd4f22457d58569a208ac1d8e5fe41b270addd13d85a5bba0521a0f9e325288448
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: boost::process detection doesn't pass include directory

5 participants