Skip to content

Commit 9ca2ee1

Browse files
committed
cmake, doc: Update build-openbsd.md
1 parent 0da5317 commit 9ca2ee1

File tree

2 files changed

+19
-27
lines changed

2 files changed

+19
-27
lines changed

depends/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ For linux S390X cross compilation:
9191

9292
### Install the required dependencies: OpenBSD
9393

94-
pkg_add bash gtar
94+
pkg_add bash gmake gtar
9595

9696
### Dependency Options
9797

doc/build-openbsd.md

+18-26
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ This guide describes how to build bitcoind, command-line utilities, and GUI on O
1010
Run the following as root to install the base dependencies for building.
1111

1212
```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
1614
```
1715

1816
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
3129

3230
###### Descriptor Wallet Support
3331

34-
`sqlite3` is required to support [descriptor wallets](descriptors.md).
32+
SQLite is required to support [descriptor wallets](descriptors.md).
3533

3634
``` bash
3735
pkg_add sqlite3
@@ -48,13 +46,13 @@ Refer to [depends/README.md](/depends/README.md) for detailed instructions.
4846
```bash
4947
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
5048
...
51-
to: /path/to/bitcoin/depends/x86_64-unknown-openbsd
49+
to: /path/to/bitcoin/depends/*-unknown-openbsd*
5250
```
5351

5452
Then set `BDB_PREFIX`:
5553

5654
```bash
57-
export BDB_PREFIX="/path/to/bitcoin/depends/x86_64-unknown-openbsd"
55+
export BDB_PREFIX="[path displayed above]"
5856
```
5957

6058
#### GUI Dependencies
@@ -66,47 +64,41 @@ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compi
6664
pkg_add qtbase qttools
6765
```
6866

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

73-
Preparation:
7471
```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.
8173
```
8274

75+
## Building Bitcoin Core
76+
8377
### 1. Configuration
8478

8579
There are many ways to configure Bitcoin Core, here are a few common examples:
8680

8781
##### 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.
8983

9084
```bash
91-
./configure MAKE=gmake
85+
cmake -B build -DWITH_SQLITE=ON -DBUILD_GUI=ON
9286
```
9387

88+
Run `cmake -B build -LH` to see the full list of available options.
89+
9490
##### 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:
9692

9793
```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"
10295
```
10396

10497
### 2. Compile
105-
**Important**: Use `gmake` (the non-GNU `make` will exit with an error).
10698

10799
```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.
110102
```
111103

112104
## Resource limits

0 commit comments

Comments
 (0)