* New! Latest stable version of OK wallet v7-SpaceMonkey *

How to compile OKCashd on Raspberry Pi

Started by pta2002, March 24, 2017, 04:05:11 PM

Previous topic - Next topic

pta2002

If you for some reason don't want to install ROKOS, it's not very hard to compile okcashd on your pi. Keep in mind though, it'll take a while.

Please note that this will only install the daemon, not the GUI. This has been tested on a raspberry pi 3 running raspbian jessie.

STEP 1 Update your OS!


$ sudo apt update
$ sudo apt upgrade -y


STEP 2 Install dependencies


$ sudo apt-get install autoconf libevent-dev libtool libssl-dev libboost-all-dev libminiupnpc-dev git -y


STEP 3 Build BDB4.8

OKCash (and most other bitcoin-based cryptocurrencies) require berkeley db 4.8 to build, however, this version is deprecated and not found on most distro's repositories. Fortunately, we can compile it ourselves!


$ 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
$ make -j4 # If this causes problems, decrease the number
$ sudo make install


STEP 4 Download okcash source


$ cd ~
$ git clone https://github.com/okcashpro/okcash.git
$ cd okcash/src


STEP 5 Compile!


$ make -f makefile.unix -j2 BDB_INCLUDE_PATH=/usr/local/BerkeleyDB4.8/include/


If this fails, remove -j2. If it still fails, ask me. This will take a while (~1h) so take a break.

STEP 6 Install

$ sudo make install

STEP 7 Done!

Feel free to use okcashd now! It has to sync first though, so why not download the okcash bootstrap? https://github.com/okcashpro/ok-scripts/blob/master/linux/ok-sync-arm64.sh

rek769

STEP 5 Compile!


$ make -f makefile.unix -j2 BDB_INCLUDE_PATH=/usr/local/BerkeleyDB4.8/include/


If this fails, remove -j2. If it still fails, ask me. This will take a while (~1h) so take a break.
-------------------------------------------------------------------------------------

I get a system hang with inclusion of -j2
MAKE fails without -j2...error message follows:

In file included from db.cpp:6:0:
db.h:14:20: fatal error: db_cxx.h: No such file or directory
compilation terminated.
makefile.unix:193: recipe for target 'obj/db.o' failed
make: *** [obj/db.o] Error 1


RPi 3 with Ubuntu Mate OS
Thoughts and suggestions much appreciated!


rocket357

For the following error:
In file included from db.cpp:6:0:
db.h:14:20: fatal error: db_cxx.h: No such file or directory
#include <db_cxx.h>

I noticed that my system installed to /usr/local/BerkeleyDB.4.8/include/, not /usr/local/BerkeleyDB4.8/include/  (note the '.' in front of 4.8 ).

Super easy to overlook, so I thought I'd comment in case it helps someone else.