Changeset View
Changeset View
Standalone View
Standalone View
doc/build-freebsd.md
FreeBSD build guide | FreeBSD build guide | ||||
====================== | ====================== | ||||
(updated for FreeBSD 12.0) | (updated for FreeBSD 12.0) | ||||
This guide describes how to build bitcoind and command-line utilities on FreeBSD. | This guide describes how to build bitcoind and command-line utilities on FreeBSD. | ||||
This guide does not contain instructions for building the GUI. | This guide does not contain instructions for building the GUI. | ||||
## Preparation | ## Preparation | ||||
You will need the following dependencies, which can be installed as root via pkg: | You will need the following dependencies, which can be installed as root via pkg: | ||||
```shell | ```shell | ||||
pkg install autoconf automake boost-libs gmake libevent libtool openssl pkgconf | pkg install cmake libevent ninja openssl | ||||
``` | ``` | ||||
### Optional libraries | |||||
To enable UPnP: | |||||
```shell | |||||
pkg install miniupnpc | |||||
``` | |||||
If not installed, UPnP support should be disabled by passing `-DENABLE_UPNP=OFF` to `cmake`. | |||||
To enable ZeroMQ: | |||||
```shell | |||||
pkg install libzmq4 | |||||
``` | |||||
If not installed, ZeroMQ support should be disabled by passing `-BUILD_BITCOIN_ZMQ=OFF` to `cmake`. | |||||
In order to run the test suite (recommended), you will need to have Python 3 installed: | In order to run the test suite (recommended), you will need to have Python 3 installed: | ||||
```shell | ```shell | ||||
pkg install python3 | pkg install python3 | ||||
``` | ``` | ||||
To run the ZeroMQ tests: | |||||
```shell | |||||
pkg install py36-pyzmq | |||||
``` | |||||
For the wallet (optional): | For the wallet (optional): | ||||
```shell | ```shell | ||||
pkg install db5 | pkg install db5 | ||||
``` | ``` | ||||
Download the source code: | Download the source code: | ||||
refer to [CONTRIBUTING](../CONTRIBUTING.md) for instructions on how to clone the Bitcoin ABC repository | refer to [CONTRIBUTING](../CONTRIBUTING.md) for instructions on how to clone the Bitcoin ABC repository | ||||
## Building Bitcoin ABC | ## Building Bitcoin ABC | ||||
**Important**: Use `gmake` (the non-GNU `make` will exit with an error): | |||||
With wallet: | With wallet: | ||||
```shell | ```shell | ||||
./autogen.sh | mkdir build | ||||
./configure --with-gui=no \ | cd build | ||||
CXXFLAGS="-I/usr/local/include" \ | cmake -GNinja -DBUILD_BITCOIN_QT=OFF .. | ||||
BDB_CFLAGS="-I/usr/local/include/db5" \ | ninja | ||||
BDB_LIBS="-L/usr/local/lib -ldb_cxx-5" | |||||
``` | ``` | ||||
Without wallet: | Without wallet: | ||||
```shell | ```shell | ||||
./autogen.sh | mkdir build | ||||
./configure --with-gui=no --disable-wallet | cd build | ||||
``` | cmake -GNinja -DBUILD_BITCOIN_QT=OFF -DBUILD_BITCOIN_WALLET=OFF .. | ||||
ninja | |||||
followed by: | |||||
```shell | |||||
gmake # use -jX here for parallelism | |||||
gmake check # Run tests if Python 3 is available | |||||
``` | ``` |