How to Compile the SmartCash Wallet Daemon from Source (for Linux/Rpi)

in #smartcash7 years ago (edited)

I've put together a quick tutorial on compiling the SmartCash wallet from source code by community request!

Install dependencies required for the SmartCash Wallet

  • $ sudo apt-get install checkinstall subversion git git-core build-essential
  • $ sudo apt-get install libssl-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libcurl4-openssl-dev libminiupnpc-dev

Installing BerkeleyDB4.8 from source (Most Wallets use 4.8 whereas most repositories contain 5.3+)

cd ~/
wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar xvf db-4.8.30.tar.gz
cd ~/db-4.8.30/build_unix
../dist/configure --enable-cxx
make

this might take a while - even on RPi3

sudo make install
export BDB_INCLUDE_PATH="/usr/local/BerkeleyDB.4.8/include"
export BDB_LIB_PATH="/usr/local/BerkeleyDB.4.8/lib"
sudo ln -s /usr/local/BerkeleyDB.4.8/lib/libdb-4.8.so /usr/lib/libdb-4.8.so
sudo ln -s /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so /usr/lib/libdb_cxx-4.8.so

Link libminiupnpc

  • $ sudo ln -s /usr/lib/libminiupnpc.so.5 /usr/lib/libminiupnpc.so.10

Compile smartcashd from source

If this is your first time compiling a binary be aware that the build process can take a while to complete.

  • $ cd ~
  • $ git clone https://github.com/SmartCash/smartcash.git # clone SmartCash repository locally
  • $ cd smartcash # Go to repository directory
  • $ git tag # Retrieve a list of tags and find the most recent stable tag.
  • $ git checkout 0.8.7.10 # Grab correct version
  • $ cd src # Go to source directory
  • $ sudo dd if=/dev/zero of=/swapfile bs=64M count=16 # extra swap partition for speed
  • $ sudo mkswap /swapfile
  • $ sudo swapon /swapfile
  • $ make -f makefile.unix # Build smartcashd. This can take up hours and will produce a binary : smartcashd
  • $ strip smartcashd # Reduce file size by stripping symbols
  • $ sudo mv smartcashd /usr/bin/smartcashd && sudo chmod a+x /usr/bin/smartcashd # move smartcashd and make it executable
  • $ sudo rm -r ~/smartcash/ # Remove directory with sources (optional)
  • $ sudo swapoff /swapfile# clean up the previously initiated swap
  • $ sudo rm /swapfile

You're done and should now have the smartcashd daemon installed. To run this binary simply start the daemon with:

smartcashd -daemon

You can check on your wallet daemon with:

smartcashd getinfo

I'll definitely be writing more about SmartCash in the future but in the meantime if you would like to learn more about SmartCash please visit https://www.SmartCash.cc

Follow me on Steemit!

Sort:  

Calling @originalworks :)
img credz: pixabay.com
Nice, you got a 76.0% @glitterbooster upgoat, thanks to @proteus
Want a boost? Minnowbooster's got your back!

This post has received a 2.50 % upvote from @booster thanks to: @proteus.

The @OriginalWorks bot has determined this post by @proteus to be original material and upvoted(2%) it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!

This wonderful post has received a bellyrub 0.65 % upvote from @bellyrub.