2018-06-02 04:40:44 +02:00
|
|
|
FreeBSD build guide
|
|
|
|
======================
|
2019-02-15 12:54:59 +01:00
|
|
|
(updated for FreeBSD 12.0)
|
2018-06-02 04:40:44 +02:00
|
|
|
|
|
|
|
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:
|
|
|
|
|
2020-02-12 19:16:39 +01:00
|
|
|
```bash
|
2019-10-26 15:14:14 +02:00
|
|
|
pkg install autoconf automake boost-libs git gmake libevent libtool pkgconf
|
2019-02-15 12:54:59 +01:00
|
|
|
|
|
|
|
git clone https://github.com/bitcoin/bitcoin.git
|
2018-06-02 04:40:44 +02:00
|
|
|
```
|
|
|
|
|
2018-10-31 10:52:50 +01:00
|
|
|
In order to run the test suite (recommended), you will need to have Python 3 installed:
|
|
|
|
|
2020-02-12 19:16:39 +01:00
|
|
|
```bash
|
2018-10-31 10:52:50 +01:00
|
|
|
pkg install python3
|
|
|
|
```
|
|
|
|
|
2018-06-02 04:40:44 +02:00
|
|
|
See [dependencies.md](dependencies.md) for a complete overview.
|
|
|
|
|
2019-02-15 12:54:59 +01:00
|
|
|
### Building BerkeleyDB
|
|
|
|
|
|
|
|
BerkeleyDB is only necessary for the wallet functionality. To skip this, pass
|
|
|
|
`--disable-wallet` to `./configure` and skip to the next section.
|
|
|
|
|
2020-02-12 19:16:39 +01:00
|
|
|
```bash
|
2019-02-15 12:54:59 +01:00
|
|
|
./contrib/install_db4.sh `pwd`
|
|
|
|
export BDB_PREFIX="$PWD/db4"
|
2018-06-02 04:40:44 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Building Bitcoin Core
|
|
|
|
|
2020-02-12 19:16:39 +01:00
|
|
|
**Important**: Use `gmake` (the non-GNU `make` will exit with an error).
|
2018-06-02 04:40:44 +02:00
|
|
|
|
2019-02-15 12:54:59 +01:00
|
|
|
With wallet:
|
2020-02-12 19:16:39 +01:00
|
|
|
```bash
|
2018-06-02 04:40:44 +02:00
|
|
|
./autogen.sh
|
2019-02-15 12:54:59 +01:00
|
|
|
./configure --with-gui=no \
|
|
|
|
BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \
|
2020-02-12 19:16:39 +01:00
|
|
|
BDB_CFLAGS="-I${BDB_PREFIX}/include" \
|
|
|
|
MAKE=gmake
|
2018-10-31 10:52:50 +01:00
|
|
|
```
|
|
|
|
|
2019-02-15 12:54:59 +01:00
|
|
|
Without wallet:
|
2020-02-12 19:16:39 +01:00
|
|
|
```bash
|
2019-02-15 12:54:59 +01:00
|
|
|
./autogen.sh
|
2020-02-12 19:16:39 +01:00
|
|
|
./configure --with-gui=no --disable-wallet MAKE=gmake
|
2018-06-02 04:40:44 +02:00
|
|
|
```
|
|
|
|
|
2019-02-15 12:54:59 +01:00
|
|
|
followed by:
|
2018-10-31 10:52:50 +01:00
|
|
|
|
2020-02-12 19:16:39 +01:00
|
|
|
```bash
|
2019-02-15 12:54:59 +01:00
|
|
|
gmake # use -jX here for parallelism
|
|
|
|
gmake check # Run tests if Python 3 is available
|
2018-10-31 10:52:50 +01:00
|
|
|
```
|