1
1
FreeBSD build guide
2
2
======================
3
- (updated for FreeBSD 11.1 )
3
+ (updated for FreeBSD 12.0 )
4
4
5
5
This guide describes how to build bitcoind and command-line utilities on FreeBSD.
6
6
@@ -10,55 +10,51 @@ This guide does not contain instructions for building the GUI.
10
10
11
11
You will need the following dependencies, which can be installed as root via pkg:
12
12
13
- ```
13
+ ``` shell
14
14
pkg install autoconf automake boost-libs git gmake libevent libtool openssl pkgconf
15
+
16
+ git clone https://github.com/bitcoin/bitcoin.git
15
17
```
16
18
17
19
In order to run the test suite (recommended), you will need to have Python 3 installed:
18
20
19
- ```
21
+ ``` shell
20
22
pkg install python3
21
23
```
22
24
23
- For the wallet (optional):
24
- ```
25
- ./contrib/install_db4.sh `pwd`
26
- export BDB_PREFIX="$PWD/db4"
27
- ```
28
-
29
25
See [ dependencies.md] ( dependencies.md ) for a complete overview.
30
26
31
- Download the source code:
32
- ```
33
- git clone https://github.com/bitcoin/bitcoin
27
+ ### Building BerkeleyDB
28
+
29
+ BerkeleyDB is only necessary for the wallet functionality. To skip this, pass
30
+ ` --disable-wallet ` to ` ./configure ` and skip to the next section.
31
+
32
+ ``` shell
33
+ ./contrib/install_db4.sh ` pwd`
34
+ export BDB_PREFIX=" $PWD /db4"
34
35
```
35
36
36
37
## Building Bitcoin Core
37
38
38
39
** Important** : Use ` gmake ` (the non-GNU ` make ` will exit with an error):
39
40
40
- ```
41
+ With wallet:
42
+ ``` shell
41
43
./autogen.sh
42
-
43
- ./configure # to build with wallet OR
44
- ./configure --disable-wallet # to build without wallet
44
+ ./configure --with-gui=no \
45
+ BDB_LIBS= " -L ${BDB_PREFIX} /lib -ldb_cxx-4.8 " \
46
+ BDB_CFLAGS= " -I ${BDB_PREFIX} /include "
45
47
```
46
48
47
- followed by either :
48
-
49
- ```
50
- gmake
49
+ Without wallet :
50
+ ``` shell
51
+ ./autogen.sh
52
+ ./configure --with-gui=no --disable-wallet
51
53
```
52
54
53
- to build without testing, or
55
+ followed by:
54
56
57
+ ``` shell
58
+ gmake # use -jX here for parallelism
59
+ gmake check # Run tests if Python 3 is available
55
60
```
56
- gmake check
57
- ```
58
-
59
- to also run the test suite (recommended, if Python 3 is installed).
60
-
61
- * Note on debugging* : The version of ` gdb ` installed by default is [ ancient and considered harmful] ( https://wiki.freebsd.org/GdbRetirement ) .
62
- It is not suitable for debugging a multi-threaded C++ program, not even for getting backtraces. Please install the package ` gdb ` and
63
- use the versioned gdb command (e.g. ` gdb7111 ` ).
64
-
0 commit comments