@@ -10,9 +10,7 @@ This guide describes how to build bitcoind, command-line utilities, and GUI on O
10
10
Run the following as root to install the base dependencies for building.
11
11
12
12
``` bash
13
- pkg_add bash git gmake libevent libtool boost
14
- # Select the newest version of the following packages:
15
- pkg_add autoconf automake python
13
+ pkg_add git cmake boost libevent
16
14
```
17
15
18
16
See [ dependencies.md] ( dependencies.md ) for a complete overview.
@@ -31,7 +29,7 @@ It is not necessary to build wallet functionality to run either `bitcoind` or `b
31
29
32
30
###### Descriptor Wallet Support
33
31
34
- ` sqlite3 ` is required to support [ descriptor wallets] ( descriptors.md ) .
32
+ SQLite is required to support [ descriptor wallets] ( descriptors.md ) .
35
33
36
34
``` bash
37
35
pkg_add sqlite3
@@ -48,13 +46,13 @@ Refer to [depends/README.md](/depends/README.md) for detailed instructions.
48
46
``` bash
49
47
gmake -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1
50
48
...
51
- to: /path/to/bitcoin/depends/x86_64 -unknown-openbsd
49
+ to: /path/to/bitcoin/depends/* -unknown-openbsd*
52
50
```
53
51
54
52
Then set ` BDB_PREFIX ` :
55
53
56
54
``` bash
57
- export BDB_PREFIX=" / path/to/bitcoin/depends/x86_64-unknown-openbsd "
55
+ export BDB_PREFIX=" [ path displayed above] "
58
56
```
59
57
60
58
#### GUI Dependencies
@@ -66,47 +64,41 @@ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compi
66
64
pkg_add qtbase qttools
67
65
```
68
66
69
- ## Building Bitcoin Core
70
-
71
- ** Important ** : Use ` gmake ` ( the non-GNU ` make ` will exit with an error).
67
+ #### Test Suite Dependencies
68
+ There is an included test suite that is useful for testing code changes when developing.
69
+ To run the test suite (recommended), you will need to have Python 3 installed:
72
70
73
- Preparation:
74
71
``` bash
75
-
76
- # Adapt the following for the version you installed (major.minor only):
77
- export AUTOCONF_VERSION=2.71
78
- export AUTOMAKE_VERSION=1.16
79
-
80
- ./autogen.sh
72
+ pkg_add install python # Select the newest version of the package.
81
73
```
82
74
75
+ ## Building Bitcoin Core
76
+
83
77
### 1. Configuration
84
78
85
79
There are many ways to configure Bitcoin Core, here are a few common examples:
86
80
87
81
##### Descriptor Wallet and GUI:
88
- This enables the GUI and descriptor wallet support, assuming ` sqlite ` and ` qt5 ` are installed.
82
+ This enables descriptor wallet support and the GUI , assuming SQLite and Qt 5 are installed.
89
83
90
84
``` bash
91
- ./configure MAKE=gmake
85
+ cmake -B build -DWITH_SQLITE=ON -DBUILD_GUI=ON
92
86
```
93
87
88
+ Run ` cmake -B build -LH ` to see the full list of available options.
89
+
94
90
##### Descriptor & Legacy Wallet. No GUI:
95
- This enables support for both wallet types and disables the GUI :
91
+ This enables support for both wallet types:
96
92
97
93
``` bash
98
- ./configure --with-gui=no \
99
- BDB_LIBS=" -L${BDB_PREFIX} /lib -ldb_cxx-4.8" \
100
- BDB_CFLAGS=" -I${BDB_PREFIX} /include" \
101
- MAKE=gmake
94
+ cmake -B build -DBerkeleyDB_INCLUDE_DIR:PATH=" ${BDB_PREFIX} /include"
102
95
```
103
96
104
97
### 2. Compile
105
- ** Important** : Use ` gmake ` (the non-GNU ` make ` will exit with an error).
106
98
107
99
``` bash
108
- gmake # use "-j N" for N parallel jobs
109
- gmake check # Run tests if Python 3 is available
100
+ cmake --build build # Use "-j N" for N parallel jobs.
101
+ ctest --test-dir build # Use "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
110
102
```
111
103
112
104
## Resource limits
0 commit comments