Skip to content

Conversation

theStack
Copy link
Contributor

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). 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.

@DrahtBot DrahtBot added the Docs label Jun 24, 2021
Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

Concept ACK. Looks like waitid was missing from the BSDs for a while, but was added to FreeBSD in the 10.0 release and NetBSD in the 8.0 release. However it's still missing on OpenBSD as of 6.9.

@fanquake fanquake added this to the 22.0 milestone Jul 8, 2021
@laanwj
Copy link
Member

laanwj commented Jul 12, 2021

There isn't really another workaround for this, so until there is I think documenting it like this makes sense. Another option would be to have configure.ac detect the lack of this function and preemptively disable the feature, but that might be confusing to users that expect the feature to be enabled by default… this is more explicit

(I think making configure fail with a OpenBSD-specific message, or at least, related to BSDs that lack waitid, would be even more user friendly)

@laanwj
Copy link
Member

laanwj commented Jul 12, 2021

ACK e65d1d4

@laanwj laanwj merged commit e0fe658 into bitcoin:master Jul 12, 2021
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
@@ -67,22 +67,29 @@ export AUTOMAKE_VERSION=1.16
```
Make sure `BDB_PREFIX` is set to the appropriate path from the above steps.

Note that building with external signer support currently fails on OpenBSD,
hence you have to explicitely disable it by passing the parameter
Copy link
Member

Choose a reason for hiding this comment

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

typo?

doc/build-openbsd.md:71: explicitely ==> explicitly

@theStack theStack deleted the 202106-doc-openbsd_mention_missing_external_signer_support branch July 31, 2021 20:05
@theStack theStack mentioned this pull request Aug 20, 2021
fanquake added a commit that referenced this pull request May 23, 2022
…BSD build guide

9ecb0a3 doc: remove passing `--disable-external-signer` in OpenBSD build guide (Sebastian Falbesoner)

Pull request description:

  Since we have a Boost.Process usage check in the build system (#24254, commit abc057c), passing the option `--disable-external-signer` explicitly is not needed anymore on OpenBSD; the configure script will automatically detect that including `<boost/process.hpp>` leads to a compile error and disable external signer support accordingly:

  ```
  $ ./configure MAKE=gmake
  ...
  checking whether Boost.Process can be used... no
  ...
  Options used to compile and link:
    external signer = no
  ...

  $ ./configure --enable-external-signer MAKE=gmake
  ...
  checking whether Boost.Process can be used... no
  configure: error: External signing is not supported for this Boost version
  ```
  The PR basically reverts #22335 but keeps the part mentioning that external signer support is not available on OpenBSD. Also bumps the guide to version 7.1 (released [about a month ago](https://www.openbsd.org/71.html)), where I could verify that the instructions are still accurate.

ACKs for top commit:
  fanquake:
    ACK 9ecb0a3

Tree-SHA512: a5f7e89a5a78f062a06e0047802c42ad49d89e0f0afb963886caa684966ea2e9c8a660320eedd98a5aa5eee0a9c2bb8bf7f5772338c4b49738a69c00e9367a15
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 28, 2022
…in OpenBSD build guide

9ecb0a3 doc: remove passing `--disable-external-signer` in OpenBSD build guide (Sebastian Falbesoner)

Pull request description:

  Since we have a Boost.Process usage check in the build system (bitcoin#24254, commit abc057c), passing the option `--disable-external-signer` explicitly is not needed anymore on OpenBSD; the configure script will automatically detect that including `<boost/process.hpp>` leads to a compile error and disable external signer support accordingly:

  ```
  $ ./configure MAKE=gmake
  ...
  checking whether Boost.Process can be used... no
  ...
  Options used to compile and link:
    external signer = no
  ...

  $ ./configure --enable-external-signer MAKE=gmake
  ...
  checking whether Boost.Process can be used... no
  configure: error: External signing is not supported for this Boost version
  ```
  The PR basically reverts bitcoin#22335 but keeps the part mentioning that external signer support is not available on OpenBSD. Also bumps the guide to version 7.1 (released [about a month ago](https://www.openbsd.org/71.html)), where I could verify that the instructions are still accurate.

ACKs for top commit:
  fanquake:
    ACK 9ecb0a3

Tree-SHA512: a5f7e89a5a78f062a06e0047802c42ad49d89e0f0afb963886caa684966ea2e9c8a660320eedd98a5aa5eee0a9c2bb8bf7f5772338c4b49738a69c00e9367a15
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants