Skip to content

Trezarcoin 1.2 rPI 3b Stretch

aciddude edited this page Apr 8, 2019 · 3 revisions

Trezarcoin

Raspberry Pi 3 model B

Build guide v1.2 - Start from #4 if you just want to update.

AcidD | ChekaZ

1 – Updating your rPi3 + initial dependency installation

Start by either connecting to your rPi3 via SSH or open your Terminal App if you’re working directly on your rPi3.

For this guide we are using Raspbian 9 (stretch) We can verify our version with the below command:

pi@rpi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

The above output shows we are running Raspbian 9 (stretch)

Next, we start with a basic upgrade of what we currently have installed on the rPi3

sudo apt-get update

sudo apt-get upgrade

Building OpenSSL from source

At time of writing, Raspbian (stretch) comes with openssl 1.1.0f We need 1.0.X, so we need to use the backports and compile ourselves since the Debian version for jessie was compiled for ARMv6 and we need ARMv7 for our rPi3.

2.1 – Remove current version of OpenSSL

sudo apt-get remove openssl

sudo apt-get remove libssl-dev

2.2 – Add jessie-backports sources

The below command adds the keys needed for the Debian jessie-backports.

sudo apt-get -y install dirmngr

sudo apt-get -y install debian-keyring debian-archive-keyring

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553

We also need to add the jessie-backports sources "deb-src" to our apt sources list so we can retrieve the source code.

echo "deb-src http://ftp.debian.org/debian jessie-backports main" | sudo tee /etc/apt/sources.list.d/jessie-backports.list

Now we can run the below command to update our lists.

sudo apt-get update

2.3 – Build OpenSSL

Now we can download the specific OpenSSL source code from our jessie-backports list.

cd ~

mkdir deps

cd deps

sudo apt-get source openssl/jessie-backports

cd openssl-1.0.2l

sudo ./config --prefix="/home/pi/openssl/" shared enable-ec enable-ecdh enable-ecdsa -lanl -ldl

sudo make

sudo make install

You should now have your OpenSSL build in the below directory:

/home/pi/openssl

3 – Building BerkeleyDB from source

The official Trezarcoin-qt/Trezarcoind binaries from Trezarcoin.com use BerkeleyDB 4.8 so we’ll use that as well and need to build it from source.

cd ~

cd deps

wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz

tar -xzvf db-4.8.30.tar.gz db-4.8.30

cd db-4.8.30/build_unix/

../dist/configure --enable-cxx --enable-shared

sudo make

sudo make install

When it’s finished installed you should see a final output like the below:

Libraries have been installed in:

  /usr/local/BerkeleyDB.4.8/lib

4 – Building Trezarcoin-qt

4.1 – Trezarcoin dependencies

We need to install some Trezarcoin dependencies first.

sudo apt-get -y install qt5-default qttools5-dev-tools build-essential autoconf libssl-dev libprotobuf-dev protobuf-compiler libevent-dev libtool libboost-all-dev libminiupnpc-dev libqrencode-dev git

4.2 – Trezarcoin-qt

cd ~
git clone https://github.com/TrezarCoin/TrezarCoin.git trezarcoin 
cd trezarcoin

./autogen.sh

./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -I/home/pi/openssl/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib -L/home/pi/openssl/lib" CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" --enable-cxx --enable-upnp-default --with-gui=qt5

make

sudo make install

4.3 – Make a Trezarcoin-qt Desktop Shortcut

Make a new blank shortcut file on your desktop.

nano /home/pi/Desktop/trezarcoin-qt.desktop

And then add the following:


[Desktop Entry]
Name=Trezarcoin-QT
Comment=Trezarcoin Core GUI
Exec=env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/BerkeleyDB.4.8/lib:/home/pi/openssl/lib" /usr/local/bin/trezarcoin-qt
Type=Application
Encoding=UTF-8
Terminal=false
Categories=None;

Save and close.

Finally, double click the new shortcut on your Desktop to run Trezarcoin-qt!