How to compile STEEM under Ubuntu 18.04 LTS

Ancient software dependencies versus modern Linux


Not everyone knows that STEEM blockchain software has some dependencies that make it hard to compile using latest versions of compilers and libraries. I wanted to test native steemd on Ubuntu 18.04 LTS while experimenting on one of our @noisy.witness nodes. I had to figure out which software I need to downgrade to successfully build the target. In this post I'll describe building instructions for latest stable STEEM (commit 33b2c375 at the time of writing this article).

Bionic Beaver loves STEEM too!

tl;dr

You'll need to install gcc-5 and g++-5, manually download and compile libboost 1.60 and get libssl1.0-dev before running cmake for STEEM, and basically you're done.


Building requirements and application

To begin, install everything we can from package manager:

apt install -y \
    autoconf \
    automake \
    cmake \
    gcc-5 \
    g++-5 \
    libbz2-dev \
    libsnappy-dev \
    libssl1.0-dev \
    libtool \
    make \
    pkg-config \
    python3 \
    python3-jinja2

We need to delete newer versions of gcc andg++, then create links to steemutilizable compilers - gcc-5 and g++-5.

apt remove -y gcc g++
ln -s /usr/bin/gcc-5 /usr/bin/gcc
ln -s /usr/bin/gcc-5 /usr/bin/cc
ln -s /usr/bin/g++-5 /usr/bin/g++
ln -s /usr/bin/g++-5 /usr/bin/cxx

Next, we're installing libboost in version 1.60 from sources.

cd ~/
wget 'http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.bz2'
tar -xvf boost_1_60_0.tar.bz2
cd boost_1_60_0
./bootstrap.sh
./b2 install
cd ~/
rm -rf boost_1_60_0

Finally, downloading STEEM from GitHub and running our last build.

git clone https://github.com/steemit/steem
cd steem
git checkout stable
git submodule update --init --recursive
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DLOW_MEMORY_NODE=ON -DCLEAR_VOTES=ON ../

Hopefully, after a while we'll see:

Scanning dependencies of target steemd
[ 98%] Building CXX object programs/steemd/CMakeFiles/steemd.dir/main.cpp.o
[100%] Linking CXX executable steemd
[100%] Built target steemd

fin


If you want to back my further exposition to puzzlement of STEEM, you enjoyed this post OR you do believe that witnesses should eat something from time to time - please consider upvoting this post and voting for our @noisy.witness. Your vote will help us pay for servers, will allow us spend more time on fixing bugs and programming new features in our projects.


voting.gif

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
6 Comments