Raspbian Stretch with desktop 2017-11-29

コンパイル時にメモリ不足で異常停止するのでスワップメモリの確保

ピークで1GB突破するので2GB以上必要。但しSDカードの寿命を縮める諸刃の剣。

sudo /etc/init.d/dphys-swapfile stop
sudo nano /etc/dphys-swapfile

 CONF_SWAPSIZE=2048

sudo /etc/init.d/dphys-swapfile start

libsslの旧バージョンのためのリポジトリの追加

sudo nano /etc/apt/sources.list

 deb http://ftp.jaist.ac.jp/raspbian stretch main contrib non-free
 deb http://ftp.jaist.ac.jp/raspbian wheezy main contrib non-free

リポジトリ更新

sudo apt-get update

gitクライアントインストール

sudo apt-get install git

ライブラリインストール

sudo apt-get install build-essential
sudo apt-get install libssl1.0-dev
sudo apt-get install libdb5.3-dev
sudo apt-get install libdb5.3++-dev
sudo apt-get install libqrencode-dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libboost1.58-all-dev
sudo apt-get install libqt4-dev

プロジェクトの取得

git clone https://github.com/kumacoinproject/kumacoin.git --depth=10
cd kumacoin

コードの修正

どうやらソースコードの記述上の問題でコンパイルエラーが出るので修正します。
cd src
nano net.cpp

60行目
array<int, THREAD_MAX> vnThreadsRunning?; を
修正する
boost::array<int, THREAD_MAX> vnThreadsRunning?;

Kumacoindのビルド

Kumacoind単体(GUIなし)のビルド

cd src
make -f makefile.unix xCPUARCH=armv6l -j3

Kumacoindの起動

./kumacoind

で一度起動します。
初回起動時にRPCアクセス用のIDとランダムなパスワードが表示されるので、

nano ~/.Kumacoin/kumacoin.conf

に書き込みます。同時に、初期ノード等も登録します。

./kumacoind -daemon

で起動するとデーモンモードで起動します。

QT4でビルド(未成功)

QT(GUI付き)のビルド
Makefileの生成

qmake

ビルド

make -j3

RPCアクセス

curl --user ID:PASS -H "X-Requested-With: XMLHttpRequest" -H "Content-Type: application/json" -X POST -d '{"jsonrpc": "2.0","id": 6412,"method":"getinfo","params":[]}' http://localhost:7585/api/1 | jq -r

試行錯誤中@Daisuke