aboutsummaryrefslogtreecommitdiff
path: root/doc/build-freebsd.md
blob: 70f5dfc882e7ffe52eac63ff9dd6c291f5c41757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FreeBSD build guide
======================
(updated for FreeBSD 11.1)

This guide describes how to build bitcoind and command-line utilities on FreeBSD.

This guide does not contain instructions for building the GUI.

## Preparation

You will need the following dependencies, which can be installed as root via pkg:

```
pkg install autoconf automake boost-libs git gmake libevent libtool openssl pkgconf
```

In order to run the test suite (recommended), you will need to have Python 3 installed:

```
pkg install python3
```

For the wallet (optional):
```
./contrib/install_db4.sh `pwd`
export BDB_PREFIX="$PWD/db4"
```

See [dependencies.md](dependencies.md) for a complete overview.

Download the source code:
```
git clone https://github.com/bitcoin/bitcoin
```

## Building Bitcoin Core

**Important**: Use `gmake` (the non-GNU `make` will exit with an error):

```
./autogen.sh

./configure                  # to build with wallet OR
./configure --disable-wallet # to build without wallet
```

followed by either:

```
gmake
```

to build without testing, or

```
gmake check
```

to also run the test suite (recommended, if Python 3 is installed).

*Note on debugging*: The version of `gdb` installed by default is [ancient and considered harmful](https://wiki.freebsd.org/GdbRetirement).
It is not suitable for debugging a multi-threaded C++ program, not even for getting backtraces. Please install the package `gdb` and
use the versioned gdb command (e.g. `gdb7111`).