To Build
./autogen.sh
./configure
make
make install # optional
This will build peercoin-qt
as well if the dependencies are met.
Dependencies
These dependencies are required:
Library | Purpose | Description |
---|---|---|
libssl | Crypto | Random Number Generation, Elliptic Curve Cryptography |
libboost | Utility | Library for threading, data structures, etc |
libevent | Networking | OS independent asynchronous networking |
Optional dependencies:
Library | Purpose | Description |
---|---|---|
miniupnpc | UPnP Support | Firewall-jumping support |
libdb | Berkeley DB | Wallet storage (only needed when wallet enabled) |
qt | GUI | GUI toolkit (only needed when GUI enabled) |
protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled) |
libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled) |
univalue | Utility | JSON parsing and encoding (bundled version will be used unless --with-system-univalue passed to configure) |
libzmq3 | ZMQ notification | Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.x) |
Memory Requirements
C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of
memory available when compiling Peercoin Core. On systems with less, gcc can be
tuned to conserve memory with additional CXXFLAGS:
./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"
Dependency Build Instructions: Ubuntu & Debian
Build requirements:
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3
Options when installing required Boost library files:
sudo apt-get install libboost-all-dev
BerkeleyDB is required for the wallet functionality.
Historically Bitcoin was first deployed with now deprecated BerkeleyDB-4.8, which has resulted in the need to upkeep the compatibility with those ancient deployments to this day. BerkeleyDB-4.8 is not compatible with more modern BerkeleyDB-5.1 and BerkeleyDB-5.3. Peercoin has inherited this in the first versions and this is why Peercoin is still officially shipped out with BerkeleyDB-4.8.
However if you running a new wallet on a new installation there is absolutely no need to run old and deprecated BerkeleyDB-4.8. Just use the one available in the repository of your distribution.
pass --with-incompatible-bdb
to configure.
For Ubuntu only: db4.8 packages are available here.
You can add the repository and install using the following commands:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
See the section “Disable-wallet mode” to build Peercoin Core without wallet.
Optional (see --with-miniupnpc and --enable-upnp-default):
sudo apt-get install libminiupnpc-dev
ZMQ dependencies (provides ZMQ API 4.x):
sudo apt-get install libzmq3-dev
Dependencies for the GUI: Ubuntu & Debian
If you want to build Peercoin-Qt, make sure that the required packages for Qt development
are installed. Either Qt 5 or Qt 4 are necessary to build the GUI.
If both Qt 4 and Qt 5 are installed, Qt 5 will be used. Pass --with-gui=qt4
to configure to choose Qt4. To build without GUI pass --without-gui
.
To build with Qt 5 (recommended) you need the following:
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
libqrencode (optional) can be installed with:
sudo apt-get install libqrencode-dev
Once these are installed, they will be found by configure and a peercoin-qt executable will be
built by default.
Dependency Build Instructions: Fedora
Build requirements:
sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel python3
Optional:
sudo dnf install miniupnpc-devel
To build with Qt 5 (recommended) you need the following:
sudo dnf install qt5-qttools-devel qt5-qtbase-devel protobuf-devel
libqrencode (optional) can be installed with:
sudo dnf install qrencode-devel
miniupnpc
miniupnpc may be used for UPnP port mapping. It can be downloaded from here. UPnP support is compiled in and
turned off by default. See the configure options for upnp behavior desired:
--without-miniupnpc No UPnP support miniupnp not required
--disable-upnp-default (the default) UPnP support turned off by default at runtime
--enable-upnp-default UPnP support turned on by default at runtime
Disable-wallet mode
When the intention is to run only a P2P node without a wallet, peercoin may be compiled in
disable-wallet mode with:
./configure --disable-wallet
In this case there is no dependency on Berkeley DB.
Mining is also possible in disable-wallet mode, but only using the getblocktemplate
RPC
call not getwork
.
Disable checkpoints
It is possible to compile the node without the support for centrally issued checkpoints:
./configure --disable-checkpoints
Additional Configure Flags
A list of additional configure flags can be displayed with:
./configure --help