forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: bitcoin#23139, #24993, #25070, #25472, #25511, #25549, #25565, #25581, #25592, #25615 #6883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
backport: bitcoin#23139, #24993, #25070, #25472, #25511, #25549, #25565, #25581, #25592, #25615 #6883
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0406472
Merge bitcoin/bitcoin#24993: test, contrib, refactor: use `with` when…
laanwj 57be110
Merge bitcoin/bitcoin#25070: contrib: fix dirname on `verify-commits`
fanquake 97e8765
Merge bitcoin/bitcoin#25511: test: non-positive integer value to `-pe…
eb3cae6
Merge bitcoin/bitcoin#25549: doc: update for NetBSD 9.2, add GUI Buil…
cf1b7c9
Merge bitcoin/bitcoin#25581: test: refactor: pass absolute fee in `cr…
8360d20
Merge bitcoin/bitcoin#25565: doc: improve developer-notes about threads
b52fabb
fixup: follow-up for bitcoin#12755 - no more expected_stderr is neede…
knst cbcd3f9
Merge bitcoin/bitcoin#25592: test persistence of non-mempool tx prior…
4c6bc3e
Merge bitcoin/bitcoin#25472: build: Increase MS Visual Studio minimum…
fanquake a2e6b6d
Merge bitcoin/bitcoin#25615: rpc: add missing description in gettxout…
9ade0c1
Merge bitcoin/bitcoin#23139: rpc: fix "trusted" field in TransactionD…
laanwj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,95 +1,118 @@ | ||
| NetBSD Build Guide | ||
| ====================== | ||
| **Updated for NetBSD [8.0](https://www.netbsd.org/releases/formal-8/NetBSD-8.0.html)** | ||
| # NetBSD Build Guide | ||
|
|
||
| This guide describes how to build dashd and command-line utilities on NetBSD. | ||
| Updated for NetBSD [9.2](https://netbsd.org/releases/formal-9/NetBSD-9.2.html). | ||
|
|
||
| This guide does not contain instructions for building the GUI. | ||
| This guide describes how to build dashd, command-line utilities, and GUI on NetBSD. | ||
|
|
||
| **This guide has not been tested for building Dash Core and is expected to fail due to missing `bls_dash` and `backtrace`. Please report your results; contributions welcome.** | ||
|
|
||
| Preparation | ||
| ------------- | ||
| ## Preparation | ||
|
|
||
| You will need the following modules, which can be installed via pkgsrc or pkgin: | ||
| ### 1. Install Required Dependencies | ||
|
|
||
| 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). | ||
| The example commands below use `pkgin`. | ||
|
|
||
| ```bash | ||
| pkgin install autoconf automake libtool pkg-config git gmake boost libevent gmp | ||
|
|
||
| ``` | ||
| autoconf | ||
| automake | ||
| boost | ||
| git | ||
| gmake | ||
| gmp | ||
| libevent | ||
| libtool | ||
| pkg-config | ||
| python37 | ||
|
|
||
| git clone https://github.com/dashpay/dash.git | ||
| NetBSD currently ships with an older version of `gcc` than is needed to build. You should upgrade your `gcc` and then pass this new version to the configure script. | ||
|
|
||
| For example, grab `gcc9`: | ||
| ``` | ||
| pkgin install gcc9 | ||
| ``` | ||
|
|
||
| Then, when configuring, pass the following: | ||
| ```bash | ||
| ./configure | ||
| ... | ||
| CC="/usr/pkg/gcc9/bin/gcc" \ | ||
| CXX="/usr/pkg/gcc9/bin/g++" \ | ||
| ... | ||
| ``` | ||
|
|
||
| See [dependencies.md](dependencies.md) for a complete overview. | ||
|
|
||
| ### Building Dash Core | ||
| ### 2. Clone Dash Core Repo | ||
|
|
||
| **Important**: Use `gmake` (the non-GNU `make` will exit with an error). | ||
| Clone the Dash Core repository to a directory. All build scripts and commands will run from this directory. | ||
|
|
||
| #### With descriptor wallet: | ||
| ```bash | ||
| git clone https://github.com/dashpay/dash.git | ||
| ``` | ||
|
|
||
| ### 3. Install Optional Dependencies | ||
|
|
||
| #### Wallet Dependencies | ||
|
|
||
| It is not necessary to build wallet functionality to run dashd or the GUI. | ||
|
|
||
| ###### Descriptor Wallet Support | ||
|
|
||
| `sqlite3` is required to enable support for [descriptor wallets](https://github.com/dashpay/dash/blob/master/doc/descriptors.md). | ||
|
|
||
| The descriptor wallet uses `sqlite3`. You can install it using: | ||
| ```bash | ||
| pkgin install sqlite3 | ||
| ``` | ||
|
|
||
| ###### Legacy Wallet Support | ||
|
|
||
| `db4` is required to enable support for legacy wallets. | ||
|
|
||
| ```bash | ||
| ./autogen.sh | ||
| ./configure --with-gui=no --without-bdb \ | ||
| CPPFLAGS="-I/usr/pkg/include" \ | ||
| LDFLAGS="-L/usr/pkg/lib" \ | ||
| BOOST_CPPFLAGS="-I/usr/pkg/include" \ | ||
| MAKE=gmake | ||
| pkgin install db4 | ||
| ``` | ||
|
|
||
| #### With legacy wallet: | ||
|
|
||
| BerkeleyDB is use for legacy wallet functionality. | ||
| #### GUI Dependencies | ||
|
|
||
| It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library | ||
| from ports. | ||
| You can use [the installation script included in contrib/](/contrib/install_db4.sh) like so: | ||
| Dash Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install `qt5`. | ||
|
|
||
| ```bash | ||
| ./contrib/install_db4.sh `pwd` | ||
| pkgin install qt5 | ||
| ``` | ||
|
|
||
| from the root of the repository. Then set `BDB_PREFIX` for the next section: | ||
| The GUI can encode addresses in a QR Code. To build in QR support for the GUI, install `qrencode`. | ||
|
|
||
| ```bash | ||
| export BDB_PREFIX="$PWD/db4" | ||
| pkgin install qrencode | ||
| ``` | ||
|
|
||
| #### Test Suite Dependencies | ||
|
|
||
| There is an included test suite that is useful for testing code changes when developing. | ||
| To run the test suite (recommended), you will need to have Python 3 installed: | ||
|
|
||
| ```bash | ||
| ./autogen.sh | ||
| ./configure --with-gui=no CPPFLAGS="-I/usr/pkg/include" \ | ||
| LDFLAGS="-L/usr/pkg/lib" \ | ||
| BOOST_CPPFLAGS="-I/usr/pkg/include" \ | ||
| BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ | ||
| BDB_CFLAGS="-I${BDB_PREFIX}/include" \ | ||
| MAKE=gmake | ||
| pkgin install python37 | ||
| ``` | ||
|
|
||
| #### Without wallet: | ||
| ### Building Dash Core | ||
|
|
||
| **Note**: Use `gmake` (the non-GNU `make` will exit with an error). | ||
|
|
||
|
|
||
| ### 1. Configuration | ||
|
|
||
| There are many ways to configure Dash Core. Here is an example that | ||
| explicitly disables the wallet and GUI: | ||
|
|
||
| ```bash | ||
| ./autogen.sh | ||
| ./configure --with-gui=no --disable-wallet \ | ||
| ./configure --without-wallet --with-gui=no \ | ||
| CPPFLAGS="-I/usr/pkg/include" \ | ||
| LDFLAGS="-L/usr/pkg/lib" \ | ||
| BOOST_CPPFLAGS="-I/usr/pkg/include" \ | ||
| MAKE=gmake | ||
| ``` | ||
|
|
||
| For a full list of configuration options, see the output of `./configure --help` | ||
|
|
||
| ### 2. Compile | ||
|
|
||
| Build and run the tests: | ||
|
|
||
| ```bash | ||
| gmake # use "-j N" here for N parallel jobs | ||
| gmake check | ||
| gmake check # Run tests if Python 3 is available | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the multiline
./configureexample.As written, the first line lacks a trailing
\, so copy/pasting runs./configureimmediately and the remaining lines execute as separate commands (CC=…,CXX=…) and fail. Please fold the environment variables into the same multiline command, e.g.:📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not working example, just mockup. Not expected to work after copy-paste. Also that's backported from bitcoin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knst, understood! Thank you for clarifying that this is a mockup example from the Bitcoin backport and not intended to be copy-pasted as-is. I'll note this and won't press the issue further.
🧠 Learnings used