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).
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.
Congratulations @perduta! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :
Award for the total payout received
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
Congratulations @perduta! You have received a personal award!
SteemFest 3 Attendee
Click on the badge to view your Board of Honor.
Do not miss the last post from @steemitboard:
nice to meet u
Posted using Partiko Messaging
Congratulations @perduta! You received a personal award!
Click here to view your Board of Honor
Do not miss the last post from @steemitboard:
Congratulations @perduta! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!