build: add support for NetBSD in depends #23955

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:depends_support_netbsd changing 8 files +44 −5
  1. fanquake commented at 1:02 PM on January 3, 2022: member

    Similar to #23948. Doesn't build the Qt package; I haven't looked at doing that yet, but have an assumption that it's going to fail out of the box similar to the FreeBSD build.

    Guix Build:

  2. fanquake added the label Build system on Jan 3, 2022
  3. DrahtBot commented at 2:38 PM on January 3, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #24301 (build: header-only Boost by fanquake)

    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.

  4. fanquake force-pushed on Jan 10, 2022
  5. fanquake referenced this in commit 7102f7d6f3 on Jan 20, 2022
  6. fanquake force-pushed on Jan 20, 2022
  7. fanquake marked this as ready for review on Jan 20, 2022
  8. sidhujag referenced this in commit 5025bfa5cc on Jan 20, 2022
  9. DrahtBot added the label Needs rebase on Feb 2, 2022
  10. maflcko added the label DrahtBot Guix build requested on Feb 2, 2022
  11. kristapsk commented at 9:19 PM on February 2, 2022: contributor

    If some NetBSD bitcoiner is looking at this, would be cool to help wih review / test of this - https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1066. None of JM developers are using NetBSD, so we can't test this ourselves.

  12. fanquake force-pushed on Feb 3, 2022
  13. DrahtBot removed the label Needs rebase on Feb 3, 2022
  14. fanquake commented at 3:17 AM on February 3, 2022: member

    Rebased and added Guix build to PR description.

  15. fanquake force-pushed on Feb 11, 2022
  16. hebasto commented at 10:27 PM on February 13, 2022: member

    Tested d25f3d5c0d49474321fa6ad7fac1610998a5d3a1 in fresh installation of NetBSD 9.2.

    Packages that were required to build depends:

    # pkgin install autoconf automake bash gcc8 gmake libtool pkg-config
    

    Building depends:

    $ gmake -C depends NO_QT=1 CC=/usr/pkg/gcc8/bin/gcc CXX=/usr/pkg/gcc8/bin/g++
    

    Building Bitcoin Core:

    $ ./autogen.sh
    $ CONFIG_SITE=$PWD/depends/x86_64-unknown-netbsd9.2/share/config.site ./configure
    $ gmake
    ...
    

    Failure with Boost.Process: VirtualBox_NetBSD 9_14_02_2022_00_24_01

  17. hebasto commented at 10:35 PM on February 13, 2022: member

    Failure with Boost.Process

    Tested #24254 with this PR, and it fixes this error.

  18. in depends/hosts/netbsd.mk:31 in d25f3d5c0d outdated
      26 | +i686_netbsd_CXX=$(default_host_CXX) -m32
      27 | +x86_64_netbsd_CC=$(default_host_CC) -m64
      28 | +x86_64_netbsd_CXX=$(default_host_CXX) -m64
      29 | +endif
      30 | +
      31 | +netbsd_cmake_system=NetBSD
    


    hebasto commented at 9:16 AM on February 14, 2022:

    FWIW, CMake docs say nothing about cross compiling for NetBSD, and about setting of the CMAKE_SYSTEM_NAME macro for such a case.

  19. hebasto approved
  20. hebasto commented at 9:16 AM on February 14, 2022: member

    ACK d25f3d5c0d49474321fa6ad7fac1610998a5d3a1

  21. DrahtBot added the label Needs rebase on Feb 14, 2022
  22. fanquake force-pushed on Feb 14, 2022
  23. hebasto approved
  24. hebasto commented at 12:06 PM on February 14, 2022: member

    re-ACK 28efee627d4b53f1a774abdc26e5050dd32465fd

    Rebasing verified with

    $ git range-diff master d25f3d5c0d49474321fa6ad7fac1610998a5d3a1 28efee627d4b53f1a774abdc26e5050dd32465fd
    
  25. DrahtBot removed the label Needs rebase on Feb 14, 2022
  26. hebasto commented at 3:17 PM on February 14, 2022: member

    Guix builds:

    $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
    e122be668043a390fd8e3f07780efa0bd1498db666ff5dc37d8d771c0f0313f0  guix-build-28efee627d4b/output/aarch64-linux-gnu/SHA256SUMS.part
    5beb786c0fe1c8ac7b025119e54b13a43c8d70c07bb20ae338d4082030d5689d  guix-build-28efee627d4b/output/aarch64-linux-gnu/bitcoin-28efee627d4b-aarch64-linux-gnu-debug.tar.gz
    7e312af98eb7502c836e3c1fed57a51eba57eb98360d9135a92e92aad6d0626f  guix-build-28efee627d4b/output/aarch64-linux-gnu/bitcoin-28efee627d4b-aarch64-linux-gnu.tar.gz
    b9835355e6908a5f1edfc422f16b280caeef0a79d40a2b6ab7789ea432cc3528  guix-build-28efee627d4b/output/arm-linux-gnueabihf/SHA256SUMS.part
    6c02a731db0399561d3b6399ec26563af3614776a3a860c904f54b0c59cb5291  guix-build-28efee627d4b/output/arm-linux-gnueabihf/bitcoin-28efee627d4b-arm-linux-gnueabihf-debug.tar.gz
    655f0b23b132afb12261d9b6bba22849eb8c937a0a35555742de317988265e35  guix-build-28efee627d4b/output/arm-linux-gnueabihf/bitcoin-28efee627d4b-arm-linux-gnueabihf.tar.gz
    4a2ffe358a179df8a6e695826cc79663ab5a8244ea519d5ee15833779be01424  guix-build-28efee627d4b/output/arm64-apple-darwin/SHA256SUMS.part
    282a59ec4768ae0f3ac5ff6fd3eea896468374cf173839f237b9540e3e1635de  guix-build-28efee627d4b/output/arm64-apple-darwin/bitcoin-28efee627d4b-arm64-apple-darwin.tar.gz
    f5290b7f3ec9b748b0a909a89bfd2680f65f7aa7b7b203035aba4ecdf1b39121  guix-build-28efee627d4b/output/arm64-apple-darwin/bitcoin-28efee627d4b-osx-unsigned.dmg
    79df15cb9c8d0a20a5e85e40080da5c44bd64ee70f2ec8f446c101e0643bc52f  guix-build-28efee627d4b/output/arm64-apple-darwin/bitcoin-28efee627d4b-osx-unsigned.tar.gz
    fd79ce49ade14f5ae536e42fc3f258cbf310193fa694563a96b07942d47af72c  guix-build-28efee627d4b/output/dist-archive/bitcoin-28efee627d4b.tar.gz
    00d04842ec7c934aec5e35f3b2aac793e95b68def39e6dc389b1e171a1787916  guix-build-28efee627d4b/output/powerpc64-linux-gnu/SHA256SUMS.part
    7537a84c76c3b5e35de794ae17c77d377e514a9882c116c0b4ba565cd16ecf80  guix-build-28efee627d4b/output/powerpc64-linux-gnu/bitcoin-28efee627d4b-powerpc64-linux-gnu-debug.tar.gz
    2ecafcf687717319c27f4a7091a033f2519b5b2edf995772275079259db7ce10  guix-build-28efee627d4b/output/powerpc64-linux-gnu/bitcoin-28efee627d4b-powerpc64-linux-gnu.tar.gz
    1efc482c059455b56401ec004166781961a4fdedb005d683bdd5a9eb818f1803  guix-build-28efee627d4b/output/powerpc64le-linux-gnu/SHA256SUMS.part
    b51888bf740bcaf3a9ceb753984c73e16772fafcc11f4926d365b3dbfde3b6b5  guix-build-28efee627d4b/output/powerpc64le-linux-gnu/bitcoin-28efee627d4b-powerpc64le-linux-gnu-debug.tar.gz
    35a59b17c9432540e2f857b9ce5c0b136183614f42d2289e87b69fe9dc39dd0f  guix-build-28efee627d4b/output/powerpc64le-linux-gnu/bitcoin-28efee627d4b-powerpc64le-linux-gnu.tar.gz
    5a115106d2def360f859310d4d41be044f2a9b6b1a8ed07fb485756692ddaa02  guix-build-28efee627d4b/output/riscv64-linux-gnu/SHA256SUMS.part
    c5a90c83560f806dbdb4cff4e1e981d43e78d0099a6c1ab5999fe67f41462198  guix-build-28efee627d4b/output/riscv64-linux-gnu/bitcoin-28efee627d4b-riscv64-linux-gnu-debug.tar.gz
    c01e23b2c5965de9839d36d8e10af567c05c6664b2b2e8f3db8214d6b02ab803  guix-build-28efee627d4b/output/riscv64-linux-gnu/bitcoin-28efee627d4b-riscv64-linux-gnu.tar.gz
    f77555dde67e61b6b561ac93b07931d80bf2b85a7beb8116634487884b088725  guix-build-28efee627d4b/output/x86_64-apple-darwin/SHA256SUMS.part
    e64557352683a0f45274cfa7bbd0882faf5b751cfe6a41771514431ea87e80b4  guix-build-28efee627d4b/output/x86_64-apple-darwin/bitcoin-28efee627d4b-osx-unsigned.dmg
    8dcd82c98f4ba54dc0eaa872d9a341d04d5ac483267b0f3616b0ffd8c0051349  guix-build-28efee627d4b/output/x86_64-apple-darwin/bitcoin-28efee627d4b-osx-unsigned.tar.gz
    ff65826155f1e574e4deb4b863ea5e6d535419250cd7d7daa183ec45f97ad013  guix-build-28efee627d4b/output/x86_64-apple-darwin/bitcoin-28efee627d4b-osx64.tar.gz
    61a18c396d01b9708e71a34882027a5c94ec2802a0afbab5c41769e84b131335  guix-build-28efee627d4b/output/x86_64-linux-gnu/SHA256SUMS.part
    4c8b0ead06674ac7241892c41c984cfbcf715345085312e376c5dcc71f1bbbf8  guix-build-28efee627d4b/output/x86_64-linux-gnu/bitcoin-28efee627d4b-x86_64-linux-gnu-debug.tar.gz
    a7aebd05a1cbc9acdafb673572160ec1283a2cfe91cecfa2e653328ff6c2304d  guix-build-28efee627d4b/output/x86_64-linux-gnu/bitcoin-28efee627d4b-x86_64-linux-gnu.tar.gz
    
  27. in depends/hosts/netbsd.mk:2 in 28efee627d outdated
       0 | @@ -0,0 +1,31 @@
       1 | +netbsd_CFLAGS=-pipe
       2 | +netbsd_CFLAGS_CXXFLAGS=$(netbsd_CFLAGS)
    


    theuni commented at 4:21 PM on February 14, 2022:

    Should be netbsd_CXXFLAGS, no?

    Looks like maybe the same search/replace problem with the freebsd host too?


    fanquake commented at 4:34 PM on February 14, 2022:

    Whoops. Addressed both, thanks.

  28. theuni commented at 4:29 PM on February 14, 2022: member

    I suppose this is just for convenience, and not intended to be supported in any way? If so, Concept ACK

    The additions look good to me other than the wonky CXXFLAGS.

    My only concern is that since this isn't being tested, what happens if/when builds stop working and nobody notices or bothers to fix. Maybe explicitly describe it as unsupported somewhere? That way at least people would be hesitant to rely on it. Same goes for freebsd, I suppose.

  29. fanquake force-pushed on Feb 14, 2022
  30. fanquake commented at 4:37 PM on February 14, 2022: member

    I suppose this is just for convenience, and not intended to be supported in any way?

    Yes. The intention is minimal support, but enough that depends is usable on *BSD platforms. I will be testing builds irregularly, however given that we aren't supporting Qt, and the continued reduction in dependencies, I also don't expect things too break too often.

  31. fanquake force-pushed on Feb 14, 2022
  32. build: add NetBSD support to depends 7b06ffce9c
  33. build: correct depends FreeBSD C{XX}FLAGS bcd36e14f0
  34. in depends/Makefile:93 in 1f33d926a3 outdated
      89 | @@ -89,6 +90,7 @@ full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
      90 |  host_os:=$(findstring linux,$(full_host_os))
      91 |  host_os+=$(findstring darwin,$(full_host_os))
      92 |  host_os+=$(findstring freebsd,$(full_host_os))
      93 | +host_os+=$(findstring netbsd,$(full_build_os))
    


    theuni commented at 4:48 PM on February 14, 2022:

    full_host_os :)


    fanquake commented at 4:52 PM on February 14, 2022:

    Addressed.


    theuni commented at 4:55 PM on February 14, 2022:

    Does it still build after this change? I guess you've been testing in a VM where the build and host are the same?


    fanquake commented at 5:05 PM on February 14, 2022:

    Does it still build after this change?

    Yes.

    I guess you've been testing in a VM where the build and host are the same?

    I haven't been using a VM. I've been testing using NetBSD 9.99 running on aarch64 hardware.

  35. fanquake force-pushed on Feb 14, 2022
  36. theuni approved
  37. theuni commented at 6:58 PM on February 14, 2022: member

    ACK bcd36e14f0a2b89445f1436094de40696d6ad76c

  38. fanquake merged this on Feb 14, 2022
  39. fanquake closed this on Feb 14, 2022

  40. maflcko removed the label DrahtBot Guix build requested on Feb 15, 2022
  41. sidhujag referenced this in commit fe37e9bdc7 on Feb 15, 2022
  42. fanquake deleted the branch on Nov 29, 2022
  43. delta1 referenced this in commit ff8623355d on Jun 30, 2023
  44. bitcoin locked this on Nov 29, 2023

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-04-25 00:14 UTC

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