Hi All, In this guide you’ll learn how to compile Feathercoin on Ubuntu 16.04 LTS.

Note: you will have to change some of the commands paths to match your environment…
for example I’m working inside the directory /home/aciddude/Feathercoin so my commands will have that path specified.

1. Intro + initial setup

This assumes a brand new Ubuntu 16.04 and…
also downloaded updates during the setup and installed the 3rd party software (two tick boxes during Ubuntu install.)

Lab Envrionment:
Hyper-V (windows 10)
2 vCPUs
4096 MB RAM
Ubuntu 16.04
Update Ubuntu and install Hyper-V virtual kernal

sudo apt-get update
sudo apt-get install –install-recommends linux-virtual-lts-xenial
sudo apt-get upgrade
Create a directory you’ll use to work in.

mkdir Feathercoin
cd Feathercoin
Git wasn’t installed default so…

sudo apt-get install git
Grab the FTC source

git clone https://github.com/FeatherCoin/Feathercoin.git

2. Dependencies
We need to install the following dependencies

sudo apt-get install build-essential
sudo apt-get install libboost-all-dev
sudo apt-get install automake
sudo apt-get install libtool
sudo apt-get install autoconf
sudo apt-get install libdb5.3++-dev
sudo apt-get install libdb++-dev
sudo apt-get install libprotobuf-dev
sudo apt-get install protobuf-compiler
sudo apt-get install libqrencode-dev
sudo apt-get install qtbase5-dev
sudo apt-get install libqt5opengl5-dev
sudo apt-get install qttools5-dev-tools
sudo apt-get install libminiupnpc-dev
sudo apt-get install pkg-config
We need to compile BerklyDB v4.8

cd ..
“pwd” shoud show /home/$username/Feathercoin

wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar -xvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
mkdir -p build
../dist/configure -disable-shared -enable-cxx -with-pic -prefix=$BDB_PREFIX
make install
cd ../..
We need to compile OpenSSL

cd /home/aciddude/Feathercoin/
mkdir openSSL
cd openSSL
wget https://www.openssl.org/source/openssl-1.0.1l.tar.gz
tar zxvf openssl-1.0.1l.tar.gz
cd openssl-1.0.1l
export CFLAGS=”-fPIC”
./config –prefix=/home/aciddude/Feathercoin/openSSL/build shared enable-ec enable-ecdh enable-ecdsa -lanl -ldl
sudo make
sudo make install
There’s one more dependency called “libzxing” but that will get covered later on.

3. Compile + Troubleshooting

Note: where I’ve used the BDB_PREFIX which in the ftc configure command which is the same prefix we used when we compiled berklyDB earlier

cd /home/aciddude/Feathercoin/Feathercoin
sudo ./autogen.sh
sudo ./configure –prefix=/home/aciddude/Feathercoin/build CPPFLAGS=”-I$BDB_PREFIX/include/ -O2″ LDFLAGS=”-L$BDB_PREFIX/lib/” PKG_CONFIG_PATH=/home/aciddude/Feathercoin/openSSL/build/lib/pkgconfig LIBS=-Wl,-rpath=/home/aciddude/Feathercoin/openSSL/build/lib –disable-tests SSL_LIBS=”/home/aciddude/Feathercoin/openSSL/build/lib/libssl.a /home/aciddude/Feathercoin/openSSL/build/lib/libcrypto.a -ldl” –with-gui
sudo make clean
sudo make

Now it will start compiling and eventually stop with this error:

rpcrawtransaction.cpp:299:77: required from here
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE’

So we go to /home/aciddude/Feathercoin/Feathercoin/src
and find rpcrawtransaction.cpp

go to line 299 which should read

const CScriptID& hash = boost::get(address);

and change it to:

const CScriptID& hash = boost::get(address);

Then we can continue to make

sudo make

it will carry on and then fail with this error:

CXX libbitcoinqt_a-snapwidget.o
snapwidget.cpp:10:51: fatal error: zxing/common/GlobalHistogramBinarizer.h: No such file or directory
compilation terminated.

So we need to download Lib Zxing or Zxing CPP
@Wellenreiter has provided a build here:

I installed it with the package manager and then copied from /usr/include/zxing to /home/aciddude/Feathercoin/Feathercoin/src/zxing

Now we can continue to make

sudo make
sudo make install

at this point it should have compiled correctly but to verify…since you made a few changes to files and added folders…

sudo make clean
sudo make
sudo make install

The compiler should start from the beginning and this time, it should go through with none of the above errors and after 15 mins of compiling I have

total 243M
-rwxr-xr-x 1 root root 137M Jun 12 15:52 feathercoin-qt
-rwxr-xr-x 1 root root 20M Jun 12 15:52 feathercoin-cli
-rwxr-xr-x 1 root root 86M Jun 12 15:52 feathercoind

you can then run feathercoin-qt (the GUI) by
cd /home/aciddude/Feathercoin/build/bin

I hope this helps someone.

Updated dependency version libdb5.1++-dev is now libdb5.3++-dev
Updated title to match title convention of other guides I’ve written
Added command sudo apt-get install pkg-config

source: http://forum.feathercoin.com/topic/8556/guide-build-feathercoind-feathercoin-qt-v0-9-3-1-on-ubuntu-16-04-lts/2


Related posts: