cryptobi / toolbox

Crypto.BI Toolbox is a tool suite for cryptocurrency enthusiasts.
https://crypto.bi
MIT License
29 stars 12 forks source link

Adding support for 0.21 or more clear documentation for 0.19 #3

Open cevatbostancioglu opened 3 years ago

cevatbostancioglu commented 3 years ago

Hello, toolbox repo cannot be built with 0.21, because of some structural changes in bitcoin-core. instead of master branch, i have tried to use 2f9f9b37b595c409bbd7282aa41b28478c79b574 commit for bitcoin. but i can't compile bitcoin-core with qt5/qt4 and i dont understand why toolbox links bitcoinqt binary/library. makefiles are old? So, what is your suggestion to me ? i want to use this tool by the way, i can start to porting toolbox repo to 0.21 ? also ninja build is not working.

this is everything i have done so far

#!/bin/bash

cd bitcoin
#git checkout 2f9f9b37b595c409bbd7282aa41b28478c79b574
#git pull

./autogen.sh

apt-get install gcc-8 g++-8 gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7

sudo apt remove python3.5*
sudo apt install python3-apt
sudo apt install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
sudo apt-get install libevent-dev
sudo apt-get install qt5-default
sudo apt-get install qttools5-dev qttools5-dev-tools 
sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler git ccache

cd contrib/
bash install_db4.sh $(pwd)
cd ..

  export BDB_PREFIX='/home/cevat/Desktop/workdir/bitcoin/contrib/db4'
  ./configure --with-gui=qt4 BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" 
./configure --with-gui=qt5
make -j8
sudo make install

wget https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-8.0.25-linux-glibc2.12-x86-64bit.tar.gz
wget https://boostorg.jfrog.io/artifactory/main/release/1.66.0/source/boost_1_66_0.tar.gz

tar -xf boost_1_66_0.tar.gz 
cd boost_1_66_0/
./bootstrap.sh 
./b2 install
cd ..

tar -xf mysql-connector-c++-8.0.25-linux-glibc2.12-x86-64bit.tar.gz 
sudo apt-get install libmysqlcppconn-dev

sudo apt remove --purge --auto-remove cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
sudo apt update
sudo apt install kitware-archive-keyring
sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
sudo apt update
sudo apt install cmake

git clone https://github.com/gabime/spdlog.git
cd spdlog && mkdir build && cd build
cmake .. && make -j

sudo apt-get install ninja-build

git clone https://github.com/fmtlib/fmt.git
cd fmt
cmake .
make -j4
sudo make install

#!/bin/bash
set -x
set -e

export BITCOIN_SRC_DIR="/home/cevat/Desktop/workdir/bitcoin"
export BOOST_SRC_DIR="/home/cevat/Desktop/workdir/boost_1_66_0"
export MYSQLCONN_DIR="/home/cevat/Desktop/workdir/mysql-connector-c++-8.0.25-linux-glibc2.12-x86-64bit"
export SPDLOG_DIR="/home/cevat/Desktop/workdir/spdlog"
export FMT_DIR="/home/cevat/Desktop/workdir/fmt"

cd toolbox
mkdir -p build || true
cd build
cmake -DCMAKE_BUILD_TYPE=Debug \
-DFMT_DIR=$FMT_DIR \
-DSPDLOG_DIR=$SPDLOG_DIR \
-DMYSQLCONN_DIR=$MYSQLCONN_DIR \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBOOST_SRC_DIR=$BOOST_SRC_DIR \
-DBITCOIN_SRC_DIR=$BITCOIN_SRC_DIR \
-DCB_BUILD_EXAMPLES=1 \
-DBUILD_TESTING=1 ..

ninja -v