Jump to content

Compile PI3 denarius daemon binary [Raspbian]


Recommended Posts

How to compile denariusd daemon on Raspberry Pi3 in Raspbian and run TOR.

Headless Install (enable wifi and enable ssh)

Swap Space (Required for Compiling)

sudo sed -i 's/CONF_SWAPSIZE=100/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
free -m

On dependencies read a few posts below if you want to compile and use berkeley database 4.8 to keep backwards compatibility.

sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get --assume-yes install git unzip build-essential libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libgmp-dev libevent-dev autogen automake libtool

Compile and replace openssl to openssl 1.0.1j. (may or may not be required) I need to double check if there was 1 more step to this or not to make sure openssl is right.

apt-get install make
wget https://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar -xzvf openssl-1.0.1j.tar.gz
cd openssl-1.0.1j
make depend
#make test
make install
sudo ln -sf /usr/local/ssl/bin/openssl `which openssl
cd ~
openssl version -v

Git clone v3.4 branch to get v3.3.8.

git clone https://github.com/carsenk/denarius
cd denarius
git checkout v3.4
git pull
cd src
OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib make -f makefile.arm
strip denariusd
sudo cp denariusd /usr/local/bin/denariusd

#Use Chaindata

cd ~
mkdir ~/.denarius
wget https://github.com/carsenk/denarius/releases/download/v3.3.6/chaindata1612994.zip
unzip chaindata1612994.zip

#Install TOR service

sudo apt-get install tor
sudo nano /etc/tor/torrc

Find this line and change the 2
#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 33369

sudo service tor restart

#To get onion address

sudo cat /var/lib/tor/hidden_service/hostname

example from above

#sample TOR and clearnet denarius.conf



  • Like 1
Link to comment
Share on other sites

Mental Note

Iif you want to use berkeley db 4.8 to always be backwards compatible. Instead of sudo apt-get install libdb++-dev, do this

mkdir ~/Downloads
cd ~/Downloads
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx
sudo make install


  • Like 1
Link to comment
Share on other sites

soiboi 👻 keeps saying cross compile, trying to figure that out from ubuntu 18.04 to arm

#make and install openssl arm

cd openssl-1.0.1j
make clean
./Configure linux-elf no-asm shared --prefix=/usr --openssldir=ssl --cross-compile-prefix=arm-linux-gnueabihf-
make install INSTALL_PREFIX=~/openssl/armlib

#that will install libs into ~/openssl/armlib/usr/lib
#headers into ~/openssl/armlib/usr/include/openssl
#and arm-binary executable into ~/openssl/armlib/usr/bin

OPENSSL_INCLUDE_PATH=~/openssl/armlib/usr/include OPENSSL_LIB_PATH=~/openssl/armlib/usr/lib make CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ -f makefile.arm


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...