(updated for FreeBSD 12.1)
This guide describes how to build bitcoind and command-line utilities on FreeBSD.
This guide does not contain instructions for building the GUI.
You will need the following dependencies, which can be installed as root via pkg:
pkg install cmake libevent ninja openssl boost-libs git gmp zlib-ngTo enable UPnP:
pkg install miniupnpcIf not installed, UPnP support should be disabled by passing
-DENABLE_UPNP=OFF to cmake.
To enable NAT-PMP:
pkg install libnatpmpIf not installed, NAT-PMP support should be disabled by passing
-DENABLE_NATPMP=OFF to cmake.
To enable ZeroMQ:
pkg install libzmq4If not installed, ZeroMQ support should be disabled by passing -DBUILD_BITCOIN_ZMQ=OFF
to cmake.
In order to run the test suite (recommended), you will need to have Python 3:
pkg install python3To run the ZeroMQ tests:
pkg install py37-pyzmqFor the wallet (optional):
pkg install db5If you also want to build the GUI client bitcoin-qt Qt 5 is necessary.
To build with Qt 5 you need the following packages installed:
pkg install qt5-qmake qt5-buildtools qt5-linguisttools qt5-widgets qt5-testlib libqrencode-4.0.0You can do without the libqrencode-4.0.0 package, just pass -DENABLE_QRCODE=OFF
on the cmake command line.
To enable manpages:
pkg install help2manIf not installed, manpage generation should be disabled by passing -DENABLE_MAN=OFF
to cmake.
Download the source code:
git clone https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node.git
cd bitcoin-cash-node/To build with wallet:
mkdir build
cd build
cmake -GNinja -DBUILD_BITCOIN_QT=OFF ..
ninja
ninja check # recommendedTo build without wallet:
mkdir build
cd build
cmake -GNinja -DBUILD_BITCOIN_QT=OFF -DBUILD_BITCOIN_WALLET=OFF ..
ninja
ninja check # recommendedTo build with wallet and GUI:
mkdir build
cd build
cmake -GNinja ..
ninja
ninja check # recommended
ninja test_bitcoin-qt # recommendedAfter a successful test you can install the newly built binaries to your bin directory. Note that this will probably overwrite any previous version installed, including binaries from different sources. It might be necessary to run as root, depending on your system configuration:
ninja install #optional