test: Define BOOST_TEST_DISABLE_ALT_STACK only where Boost.Test uses it #36600

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:261022-boost-unused changing 3 files +11 −2
  1. hebasto commented at 7:22 AM on October 22, 2026: member

    Boost.Test consults the BOOST_TEST_DISABLE_ALT_STACK macro only in its sigaction-based signal handling, which it selects when BOOST_HAS_SIGACTION is defined. This causes a build failure when cross-compiling for Windows with Clang after bitcoin/bitcoin#36509:

    /home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/src/test/main.cpp:9:9: error: macro is not used [-Werror,-Wunused-macros]
        9 | #define BOOST_TEST_DISABLE_ALT_STACK
          |         ^
    

    (not sure why GCC fails to catch this case in the CI.)

    This PR fixes the issue.

  2. test: Define BOOST_TEST_DISABLE_ALT_STACK only where Boost.Test uses it
    Boost.Test consults this macro only in its sigaction-based signal
    handling, which it selects when `BOOST_HAS_SIGACTION` is defined. On
    MinGW targets Clang reports it under `-Wunused-macros`.
    3d446f5738
  3. hebasto added the label Tests on Oct 22, 2026
  4. DrahtBot commented at 7:22 AM on October 22, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK maflcko

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. hebasto commented at 7:29 AM on October 22, 2026: member
  6. hebasto commented at 7:36 AM on October 22, 2026: member

    Friendly ping @l0rinc @maflcko

  7. maflcko commented at 7:43 AM on October 22, 2026: member

    lgtm ACK 3d446f5738b0b64ccea13f8cf907333ad807a2ac

    Though, boost is scheduled for removal, so alternatives could be:

    • Set -Wno-error=unused-macros in the Windows cross-builds temporarily; or
    • Temporarily drop the Wunused-macros from the cmakelist
  8. fanquake commented at 7:48 AM on October 22, 2026: member

    Set -Wno-error=unused-macros in the Windows cross-builds temporarily;

    This seems like the proper solution here. Not sure why we'd revert changes in this repo, to fix a failure in a nightly repo (where it's trivial to work around this), and it seems like the underlying issue isn't diagnosed ("(not sure why GCC fails to catch this case in the CI.)").

  9. fanquake commented at 8:00 AM on October 22, 2026: member

    Not sure why we'd revert changes in this repo

    To be clear. I think if something is important enough that we'd revert changes here to "fix" it, then it (the CI job) should be in this repo, so it doesn't get broken in the first place.

  10. maflcko commented at 8:10 AM on October 22, 2026: member

    Yeah, this seems pretty irrelevant, so my preference would be to just -Wno-error=unused-macros in the Windows cross-builds temporarily. But anything is fine here, no strong opinion.

  11. hebasto closed this on Oct 22, 2026

  12. hebasto commented at 9:16 AM on October 22, 2026: member
  13. hebasto commented at 9:23 AM on October 22, 2026: member

    Not sure why we'd revert changes in this repo

    To be clear. I think if something is important enough that we'd revert changes here to "fix" it, then it (the CI job) should be in this repo, so it doesn't get broken in the first place.

    Not related to this particular issue, but we still have some kinds of tests, such as actually running tests on *BSD platforms, that are not part of this repo's CI. Still, issues with such tests have to be addressed in this repo.

  14. fanquake commented at 9:28 AM on October 22, 2026: member

    Yes. It's the same issue as #33438.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-25 12:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me