doc: update for NetBSD 9.1, add GUI Build Instructions #20610

pull jarolrod wants to merge 1 commits into bitcoin:master from jarolrod:netbsd-docs changing 1 files +119 −39
  1. jarolrod commented at 8:05 AM on December 10, 2020: member

    The NetBSD build documentation has not seen any meaningful contribution since 2018. This PR intends to update the documentation to be more informative and up to date. The main changes include:

    • Updated configuration instructions that now allow someone to successfully build
    • New instructions on building the GUI
    • New instructions on how to support descriptor wallets
    • A table which shows dependency information

    Before/Master: render

    After/PR: render

  2. DrahtBot added the label Docs on Dec 10, 2020
  3. laanwj commented at 10:01 AM on December 10, 2020: member

    Concept ACK, I cannot test this but this is a great first contribution.

  4. RandyMcMillan commented at 9:21 PM on December 13, 2020: contributor

    Currently testing...

  5. in doc/build-netbsd.md:40 in 6ac875c6c6 outdated
      43 | +
      44 | +
      45 | +## Preparation
      46 | +
      47 | +### 1. Install Required Dependencies
      48 | +Install the required dependencies the usual way you [install software on NetBSD](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) - either with `pkg_add` or `pkgin`. The example commands below use `pkgin` which is usually run as `root` or via `sudo`.
    


    RandyMcMillan commented at 9:26 PM on December 13, 2020:

    pkg_add is the default package handler...

    • I believe it is best to use the default package handler.
    • when enumerating the build and installation steps - should sudo be added to the commands explicitly?

    An option is to add pkgin to the initial command.

    netbsd# pkg_add pkgin autoconf automake libtool pkg-config git gmake boost libevent

    This assumes the user has sudo privileges, is clearer on the procedure - and eliminates the need to change all the pkgin commands.


    jarolrod commented at 11:12 PM on December 13, 2020:

    Thanks for testing! NetBSD's official documentation recommends to use pkgin for most binary application tasks. I didn't include it as a dependency because it isn't, the user is free to use pkg_add instead of pkgin. I also link to documentation on how to install packages on NetBSD so the user can make a choice. Do you think I should explicitly add preparation instructions on installing pkgin?


    jarolrod commented at 9:03 PM on January 28, 2021:

    Addressed in 1e88f35883ac34914b1a1177244ebd7ff4977ef4. Make it clear that the examples use pkgin, link to documentation that shows the tool is the NetBSD recommended tool for installing binary (pre-built) packages

  6. RandyMcMillan changes_requested
  7. in doc/build-netbsd.md:51 in 6ac875c6c6 outdated
      63 |  
      64 | +See [dependencies.md](dependencies.md) for a complete overview.
      65 | +
      66 | +### 2. Clone Bitcoin Repo
      67 | +Now that `git` and all the required dependencies are installed, let's clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.
      68 | +``` bash
    


    RandyMcMillan commented at 10:57 PM on December 13, 2020:

    I am using a completely clean os...

    netbsd# git clone https://github.com/bitcoin/bitcoin
    Cloning into 'bitcoin'...
    error: failed to write new configuration file /root/bitcoin/.git/config.lock
    warning: unable to unlink '/root/bitcoin/.git/config.lock': Operation not permitted
    fatal: could not set 'core.repositoryformatversion' to '0'
    netbsd# 
    

    setting a better testing environment for NetBSD...


    jarolrod commented at 11:06 PM on December 13, 2020:

    That should be an error in the system side. First, make sure you have proper read/write access to that directory from your user. I could be wrong, but it looks like you are trying to write somewhere on root from a user. Some other troubleshooting tips: try allocating more space for the netBSD partition or manually deleting the config.lock which could have been put there by another program or process.

  8. in doc/build-netbsd.md:122 in 6ac875c6c6 outdated
     136 | +##### Wallet (BDB + SQlite) Support, No GUI:
     137 | +This explicitly enables legacy wallet support and disables the GUI. An error will be thrown if `db4` is not installed. If `sqlite3` is installed, then descriptor wallet support will also be built.
     138 |  ```bash
     139 |  ./autogen.sh
     140 | -./configure --with-gui=no CPPFLAGS="-I/usr/pkg/include" \
     141 | +./configure --with-gui=no \
    


    RandyMcMillan commented at 4:31 AM on December 14, 2020:

    These code blocks don't copy and paste into the CL in NetBSD... I think it is better to just use a single line format...

    
    ./configure --with-gui=no CPPFLAGS="-I/usr/pkg/include" LDFLAGS="-L/usr/pkg/lib" --with-boost-libdir=/usr/pkg/lib MAKE=gmake
    
    

    It doesn't look as good - but it is much easier for the user to copy and paste...


    RandyMcMillan commented at 5:02 AM on December 14, 2020:

    While running ./configure ... config.log is marked as a directory... I am not sure if this is a result of copy and pasting the multiline command into the terminal... Or if it is a bug... going to rebuild the image from scratch and run again...

    Screen Shot 2020-12-13 at 11 58 46 PM


    jarolrod commented at 9:04 PM on January 28, 2021:

    cannot reproduce

  9. in doc/build-netbsd.md:70 in 6ac875c6c6 outdated
      84 |  
      85 | -### Building BerkeleyDB
      86 | +###### Descriptor Wallet Support
      87 | +
      88 | +`sqlite3` is required to enable support for descriptor wallets. Skip if you don't intend to use descriptor wallets.
      89 | +``` bash
    


    RandyMcMillan commented at 4:44 AM on December 14, 2020:

    When adding code blocks - add a newline before the ticks - it is a markdown thing... This ensures better cross platform rendering...

    Screen Shot 2020-12-13 at 11 38 28 PM

    Descriptor Wallet Support

    sqlite3 is required to enable support for descriptor wallets. Skip if you don't intend to use descriptor wallets.

    pkgin install sqlite3
    


    jarolrod commented at 9:04 PM on January 28, 2021:

    addressed in 1e88f35883ac34914b1a1177244ebd7ff4977ef4

  10. in doc/build-netbsd.md:55 in 6ac875c6c6 outdated
      64 | +See [dependencies.md](dependencies.md) for a complete overview.
      65 | +
      66 | +### 2. Clone Bitcoin Repo
      67 | +Now that `git` and all the required dependencies are installed, let's clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.
      68 | +``` bash
      69 |  git clone https://github.com/bitcoin/bitcoin.git
    


    RandyMcMillan commented at 2:01 PM on December 14, 2020:

    After more thinking on this - maybe there should be a note that states that the master HEAD isn't always stable. Maybe this should be a git clone command then checkout a release tag?


    jarolrod commented at 9:05 PM on January 28, 2021:

    That's not what any of the docs do. You can open up an issue proposing that the docs be refactored if you want.

  11. DrahtBot commented at 7:12 PM on December 14, 2020: member

    <!--4a62be1de6b64f3ed646cdc7932c8cf5-->

    🕵️ @harding @fanquake have been requested to review this pull request as specified in the REVIEWERS file.

  12. RandyMcMillan commented at 11:01 PM on December 14, 2020: contributor

    Just as above the config.log is being flagged as a directory

    Screen Shot 2020-12-14 at 5 59 06 PM

  13. RandyMcMillan commented at 7:12 PM on December 16, 2020: contributor

    I think it is better if this doc:

    • Assumes that it is a basic system - that has no prior configs or packages such as pkgin
    • From that assumption - it addresses the git install issue related to
    • pkg_add -v mozilla-rootcerts (ssl certs)
    • mozilla-rootcerts install
    • Not dependent on outside documentation
    • Assumes only a basic level of understanding of the user

    With these assumptions - I believe Issues will be minimized - less support workload by community

    Related walk thru for git install issue: https://troglobit.com/howto/netbsd-pkgsrc/

  14. jarolrod force-pushed on Jan 28, 2021
  15. jarolrod commented at 9:12 PM on January 28, 2021: member

    updated 6ac875c -> 1e88f35

    • Addressed @RandyMcMillan's suggestion of prepending code blocks with an empty line.
    • Made it clear that the example commands use pkgin as it is the recommended tool for installing binary/pre-built packages

    In regards to this comment:

    • NetBSD docs recommend to use pkgin, this git issue only occurs when using pkg_add. The walk-through for the issue that is linked mentions that modern versions of NetBSD include pkgin and that the walkthrough is for bootstrapping pkgin
  16. RandyMcMillan commented at 6:39 PM on February 2, 2021: contributor

    Looks good - thanks for the clarification and extra attention to detail. :) ACK https://github.com/bitcoin/bitcoin/commit/1e88f35883ac34914b1a1177244ebd7ff4977ef4

  17. fanquake referenced this in commit d6e3ac89d4 on Mar 18, 2021
  18. DrahtBot commented at 7:41 PM on May 13, 2021: member

    <!--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:

    • #24524 (doc: remove Boost LDFLAGS from netBSD build docs 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.

  19. DrahtBot added the label Needs rebase on May 14, 2021
  20. jarolrod force-pushed on May 27, 2021
  21. jarolrod commented at 4:05 AM on May 27, 2021: member

    updated from 1e88f35 -> 368c771 (pr20610.02 -> pr20610.03)

    Changes:

    • rebased due to conflict with #21942
  22. DrahtBot removed the label Needs rebase on May 27, 2021
  23. in doc/build-netbsd.md:3 in 368c7717d7 outdated
       0 | @@ -1,81 +1,161 @@
       1 | -NetBSD build guide
       2 | -======================
       3 | -(updated for NetBSD 8.0)
       4 | +# NetBSD Build Guide
       5 |  
       6 | -This guide describes how to build bitcoind and command-line utilities on NetBSD.
       7 | +**Updated for NetBSD [9.1](https://netbsd.org/releases/formal-9/NetBSD-9.1.html)**
    


    jonatack commented at 3:36 PM on June 22, 2021:

    nit, I think the bold is unneeded here and for "required" and "optional" below. In general, I'd go light on italic and bold.

  24. in doc/build-netbsd.md:20 in 368c7717d7 outdated
      23 | + [libtool](https://pkgsrc.se/devel/libtool)       | Build      | Shared library support
      24 | + [pkg-config](https://pkgsrc.se/devel/pkg-config) | Build      | Configure compiler and linker flags
      25 | + [git](https://pkgsrc.se/devel/git)               | Clone      | Version control system
      26 | + [gmake](https://pkgsrc.se/devel/gmake)           | Compile    | Generate executables
      27 | + [boost](https://pkgsrc.se/meta-pkgs/boost)       | Utility    | Library for threading, data structures, etc
      28 | + [libevent](https://pkgsrc.se/devel/libevent)     | Networking | OS independent asynchronous networking
    


    jonatack commented at 3:36 PM on June 22, 2021:

    missing hyphen

     [libevent](https://pkgsrc.se/devel/libevent)     | Networking | OS-independent asynchronous networking
    
  25. in doc/build-netbsd.md:41 in 368c7717d7 outdated
      44 | +
      45 | +## Preparation
      46 | +
      47 | +### 1. Install Required Dependencies
      48 | +
      49 | +Install the required dependencies the usual way you [install software on NetBSD](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) - either with `pkg_add` or `pkgin`. The example commands below use `pkgin` which is the [recommended](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) way to install binary packages.
    


    jonatack commented at 3:37 PM on June 22, 2021:
    Install the required dependencies the usual way you [install software on NetBSD](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) -- either with `pkg_add` or `pkgin`. The example commands below use `pkgin` which is the [recommended](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) way to install binary packages.
    
  26. in doc/build-netbsd.md:43 in 368c7717d7 outdated
      46 | +
      47 | +### 1. Install Required Dependencies
      48 | +
      49 | +Install the required dependencies the usual way you [install software on NetBSD](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) - either with `pkg_add` or `pkgin`. The example commands below use `pkgin` which is the [recommended](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) way to install binary packages.
      50 | +
      51 | +Note: `pkgin` is usually run as `root` or via `sudo`.
    


    jonatack commented at 3:38 PM on June 22, 2021:
    Note: `pkgin` is usually run as `root` or with `sudo`.
    
  27. in doc/build-netbsd.md:52 in 368c7717d7 outdated
      64 | -pkg-config
      65 | -python37
      66 |  
      67 | +### 2. Clone Bitcoin Repo
      68 | +
      69 | +Now that `git` and all the required dependencies are installed, let's clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.
    


    jonatack commented at 3:38 PM on June 22, 2021:
    Now that `git` and the required dependencies are installed, let's clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.
    
  28. in doc/build-netbsd.md:62 in 368c7717d7 outdated
      75 | -See [dependencies.md](dependencies.md) for a complete overview.
      76 | +### 3. Install Optional Dependencies
      77 | +
      78 | +#### Wallet Dependencies
      79 | +
      80 | +It is not necessary to build wallet functionality to run bitcoind or the GUI. To enable legacy wallets, you must install `db4`. To enable [descriptor wallets](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md), `sqlite3` is required. Skip `db4` if you intend to *exclusively* use descriptor wallets
    


    jonatack commented at 3:39 PM on June 22, 2021:
    It is not necessary to build wallet functionality to run bitcoind or the GUI. To enable legacy wallets, you must install Berkeley DB, aka BDB or `db4`. To enable [descriptor wallets](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md), SQLite (`sqlite3`) is required. Skip `db4` if you intend to exclusively use descriptor wallets.
    
  29. in doc/build-netbsd.md:66 in 368c7717d7 outdated
      79 | +
      80 | +It is not necessary to build wallet functionality to run bitcoind or the GUI. To enable legacy wallets, you must install `db4`. To enable [descriptor wallets](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md), `sqlite3` is required. Skip `db4` if you intend to *exclusively* use descriptor wallets
      81 | +
      82 | +###### Legacy Wallet Support
      83 | +
      84 | +`db4` is required to enable support for legacy wallets. Skip if you don't intend to use legacy wallets
    


    jonatack commented at 3:41 PM on June 22, 2021:
    BDB (`db4`) is required for legacy wallets. Skip if you don't intend to use legacy wallets.
    
  30. in doc/build-netbsd.md:74 in 368c7717d7 outdated
      94 |  
      95 | -It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library
      96 | -from ports, for the same reason as boost above (g++/libstd++ incompatibility).
      97 | -If you have to build it yourself, you can use [the installation script included
      98 | -in contrib/](/contrib/install_db4.sh) like so:
      99 | +`sqlite3` is required to enable support for descriptor wallets. Skip if you don't intend to use descriptor wallets.
    


    jonatack commented at 3:42 PM on June 22, 2021:
    SQLite (`sqlite3`) is required to enable support for descriptor wallets.
    
  31. in doc/build-netbsd.md:91 in 368c7717d7 outdated
     114 | -export BDB_PREFIX="$PWD/db4"
     115 | +pkgin install qt5
     116 |  ```
     117 | +###### qrencode
     118 | +
     119 | +The GUI can encode addresses in a QR Code. To build in QR support for the GUI, install `qrencode`. Skip if not using the GUI or don't want QR code functionality.
    


    jonatack commented at 3:46 PM on June 22, 2021:
    The GUI can encode addresses in a QR Code. To build in QR support for the GUI, install `qrencode`. Skip if not using the GUI or don't need QR code functionality.
    
  32. in doc/build-netbsd.md:32 in 368c7717d7 outdated
      35 | +  [db4](https://pkgsrc.se/databases/db4)             | Berkeley DB      | Wallet storage (only needed when wallet enabled)
      36 | +  [qt5](https://pkgsrc.se/x11/qt5)                   | GUI              | GUI toolkit (only needed when GUI enabled)
      37 | +  [qrencode](https://pkgsrc.se/converters/qrencode)  | QR codes in GUI  | Generating QR codes (only needed when GUI enabled)
      38 | +  [zeromq](https://pkgsrc.se/net/zeromq)             | ZMQ notification | Allows generating ZMQ notifications (requires ZMQ version >= 4.0.0)
      39 | +  [sqlite3](https://pkgsrc.se/databases/sqlite3)     | SQLite DB        | Wallet storage (only needed when wallet enabled)
      40 | +  [python37](https://pkgsrc.se/lang/python37)        | Testing          | Python Interpreter (only needed when running the test suite)
    


    jonatack commented at 3:50 PM on June 22, 2021:

    According to doc/dependencies.md, the minimum required Python version is currently 3.6; if we can get away with specifying Python 3.6 and up, that might allow this doc to stay current longer.


    jarolrod commented at 4:26 AM on July 20, 2021:

    lets leave this like this for now, when the minimum supported is 3.8, we can update it. What do you think?

    Should be a while before the minimum is 3.8, right?


    jonatack commented at 8:45 AM on July 20, 2021:

    I don't have a strong opinion.

  33. in doc/build-netbsd.md:104 in 368c7717d7 outdated
     127 | +
     128 | +There is an included test suite that is useful for testing code changes when developing.
     129 | +To run the test suite (recommended), you will need to have Python 3 installed:
     130 | +
     131 | +```bash
     132 | +pkgin install python37
    


    jonatack commented at 3:50 PM on June 22, 2021:

    See comment above about the Python version.


    jarolrod commented at 4:27 AM on July 20, 2021:
  34. in doc/build-netbsd.md:115 in 368c7717d7 outdated
     139 |  
     140 | -With wallet:
     141 | +
     142 | +### 1. Configuration
     143 | +
     144 | +There are many ways to configure Bitcoin Core, here are a few common examples:
    


    jonatack commented at 3:51 PM on June 22, 2021:

    semi-colon or two sentences

    There are many ways to configure Bitcoin Core. Here are a few common examples:
    
  35. in doc/build-netbsd.md:160 in 368c7717d7 outdated
     194 |  Build and run the tests:
     195 | +
     196 |  ```bash
     197 |  gmake # use "-j N" here for N parallel jobs
     198 | -gmake check
     199 | +gmake check  # Run tests if Python 3 is available
    


    jonatack commented at 3:52 PM on June 22, 2021:
    gmake check # Run tests if Python 3 is available
    
  36. jonatack commented at 3:53 PM on June 22, 2021: member

    Approach ACK/almost ACK. Suggestions follow, feel free to pick/choose/ignore.

  37. fanquake deleted a comment on Jun 23, 2021
  38. fanquake deleted a comment on Jun 23, 2021
  39. doc: update for NetBSD 9.1, add GUI Build Instructions
    NetBSD doc has not seen any meaningful contribution since 2018. This PR intends
    to update the docs so that one can successfully build on the latest NetBSD release. It also adds
    dependency information and instructions to build the GUI.
    2d7a754ad3
  40. jarolrod force-pushed on Jul 20, 2021
  41. jarolrod commented at 4:25 AM on July 20, 2021: member

    Updated from 368c771 to 2d7a754 (pr20610.03 -> pr20610.04

    Changes: Address @jonatack comments, thanks for the review!

  42. in doc/build-netbsd.md:3 in 2d7a754ad3
       0 | @@ -1,81 +1,161 @@
       1 | -NetBSD build guide
       2 | -======================
       3 | -(updated for NetBSD 8.0)
       4 | +# NetBSD Build Guide
       5 |  
       6 | -This guide describes how to build bitcoind and command-line utilities on NetBSD.
       7 | +Updated for NetBSD [9.1](https://netbsd.org/releases/formal-9/NetBSD-9.1.html)
    


    jonatack commented at 8:41 AM on July 20, 2021:
    Updated for NetBSD [9.1](https://netbsd.org/releases/formal-9/NetBSD-9.1.html).
    
  43. in doc/build-netbsd.md:41 in 2d7a754ad3
      44 | +
      45 | +## Preparation
      46 | +
      47 | +### 1. Install Required Dependencies
      48 | +
      49 | +Install the required dependencies the usual way you [install software on NetBSD](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) -- either with `pkg_add` or `pkgin`. The example commands below use `pkgin` which is the [recommended](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc) way to install binary packages.
    


    jonatack commented at 8:43 AM on July 20, 2021:

    Two identical links is a bit noisy/confusing; would drop one the first one.

  44. in doc/build-netbsd.md:160 in 2d7a754ad3
     194 |  Build and run the tests:
     195 | +
     196 |  ```bash
     197 |  gmake # use "-j N" here for N parallel jobs
     198 | -gmake check
     199 | +gmake check # Run tests if Python 3 is available
    


    jonatack commented at 8:43 AM on July 20, 2021:

    s/Run/run/ or s/use/Use/

  45. in doc/build-netbsd.md:62 in 2d7a754ad3
      75 | -See [dependencies.md](dependencies.md) for a complete overview.
      76 | +### 3. Install Optional Dependencies
      77 | +
      78 | +#### Wallet Dependencies
      79 | +
      80 | +It is not necessary to build wallet functionality to run bitcoind or the GUI. To enable legacy wallets, you must install Berkeley DB, aka BDB or `db4`. To enable [descriptor wallets](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md), SQLite (`sqlite3`) is required. Skip `db4` if you intend to *exclusively* use descriptor wallets.
    


    jonatack commented at 8:44 AM on July 20, 2021:

    nit, would drop the unnecessary italics on "exclusively"

  46. jonatack commented at 8:46 AM on July 20, 2021: member

    utACK 368c7717d763ff247088b7a96a5720bee9cd38c9 with a few suggestions

  47. DrahtBot added the label Needs rebase on Mar 11, 2022
  48. DrahtBot commented at 1:15 PM on March 11, 2022: member

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.

    <sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

  49. fanquake commented at 11:02 AM on March 16, 2022: member

    Thanks, however I'm going to close this for now. I think #23565 is the direction we would like to go.

  50. fanquake closed this on Mar 16, 2022

  51. MarcoFalke commented at 11:06 AM on March 16, 2022: member

    I think this is orthogonal to #23565?

  52. MarcoFalke referenced this in commit 994573726f on Jul 8, 2022
  53. DrahtBot locked this on Mar 16, 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-21 21:14 UTC

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