Tuesday 5 February 2019

Compiling for Wallet and MasterNode

I have had few struggle to compile some wallets and here some handy information

Make sure you install the package which must be installed before compiling

sudo apt-get install libdb-dev libdb++-dev libboost-all-dev libqrencode-dev qt4-qmake libqtgui4 libqt4-dev automake

If you need to compile the GUI, make sure you have the QT packages otherwise the configure file will skip it

sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools 

Another important dependency is the old version of DB, therefore you will have to install the 4.8 version. This is not a mandatory step because you can compile with the incompatible db flag, but it will not guarantee it will work.

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

The incompatible flag is
./configure --with-incompatible-bdb


For Wallet:


  1. Clone the repo of the wallet
  2. Enter the root for the repo
  3. ./autogen.sh
  4. ./configure
  5. make


Once is finished you will have few executable files and under QT folder you will have the GUI version.

For Masternode:
  1. Clone the repo of the wallet
  2. Enter the root for the repo
  3. ./autogen.sh
  4. ./configure --without-gui 
  5. make


Issues:

checking whether htole64 is declared... yes
checking whether be32toh is declared... yes
checking whether be64toh is declared... yes
checking whether htobe32 is declared... yes
checking whether htobe64 is declared... yes
checking for MSG_NOSIGNAL... yes
checking for library containing clock_gettime... none required
checking for visibility attribute... yes
checking whether C++ compiler accepts -fvisibility=hidden... yes
checking for Berkeley DB C++ headers... default
configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)

Solution:

/configure  --with-incompatible-bdb


Issue:

configure: error: Detected LibreSSL: This is NOT supported, and may break consensus compatibility!

Solution:

Install only one version of the SSL package, make sure you dont have multiple version
apt-get install libssl1.0-dev