Error compiling btcpool source code

downloaded the btcpool source code, want to run on ubuntu16.04, but compiled ~!

clipboard.png
is there really a problem with the source code? Has anyone ever encountered this problem?
who has the experience of successfully compiling btcpool source code?

PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP+

PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP

here is my detailed compilation process:

before compiling btcpool, be sure to download and install the source code of bitcoin
create a new directory ~ / work/bitcoin and enter to download the source code of bitcoin.

git clone https://github.com/bitcoin/bitcoin.git

installation of this source code may cause an error. Do the following first

sudo apt-get install libdb5.1PP-dev
./autogen.sh
./configure --with-incompatible-bdb
make , make install
< hr >

create a new directory ~ / work/code/ and enter to download the btcpool source code

git clone https://github.com/btccom/btcpool.git

extract the source code, go to the install directory under the root directory, and run install_btcpool.sh

sudo bash install_btcpool.sh

will report an error. Do not run this script again after that

enter the root directory of btcpool-master, create it if there is no build directory, and run the cmake command
Note: using cmake directly will make an error, because there are two variables (CHAIN_TYPE, CHAIN_SRC_ROOT) in CMakeLists.txt that need to be defined, so you can write their definitions in CMakeLists.txt

.
set(CHAIN_TYPE "BTC")
set(CHAIN_SRC_ROOT "/home/zc/work/bitcoin/bitcoin-master")

can also be added to the parameter when executing cmake (the address of CHAIN_SRC_ROOT is the local address of the bitcoin source code)

cmake -DCHAIN_TYPE=BTC -DCHAIN_SRC_ROOT=/home/zc/work/bitcoin/bitcoin-master ..

then make, made a mistake:

/home/zc/work/code/btcpool-master/src/Stratum.h:290:26: error:  "CTxDestination"  does not name a type
                    const CTxDestination &poolPayoutAddr,
                          ^
In file included from /home/zc/work/code/btcpool-master/src/JobMaker.cc:24:0:
/home/zc/work/code/btcpool-master/src/JobMaker.h:65:3: error:  "CTxDestination"  does not name a type
   CTxDestination poolPayoutAddr_;
   ^
/home/zc/work/code/btcpool-master/src/JobMaker.cc: In member function  "bool JobMaker::init()" :
/home/zc/work/code/btcpool-master/src/JobMaker.cc:88:51: error:  "IsValidDestinationString"  was not declared in this scope
   if (!IsValidDestinationString(poolPayoutAddrStr_)) {
                                                   ^
/home/zc/work/code/btcpool-master/src/JobMaker.cc:93:3: error:  "poolPayoutAddr_"  was not declared in this scope
   poolPayoutAddr_ = DecodeDestination(poolPayoutAddrStr_);
   ^
/home/zc/work/code/btcpool-master/src/JobMaker.cc:93:57: error:  "DecodeDestination"  was not declared in this scope
   poolPayoutAddr_ = DecodeDestination(poolPayoutAddrStr_);
                                                         ^
/home/zc/work/code/btcpool-master/src/JobMaker.cc: In member function  "void JobMaker::sendStratumJob(const char*)" :
/home/zc/work/code/btcpool-master/src/JobMaker.cc:562:49: error:  "poolPayoutAddr_"  was not declared in this scope
   if (!sjob.initFromGbt(gbt, poolCoinbaseInfo_, poolPayoutAddr_, blockVersion_,

is there something wrong with the source code? This problem remains to be solved.

Feb.28,2021

there is no problem with the source code, you just need to follow the documentation to compile successfully.

take Ubuntu 16.04LTS as an example. The main reference documents (all from the project source code) are as follows

  1. bitcoin-0.16.0rc1/doc/build-unix.md
  2. btcpool/docs/INSTALL-BTCPool.md

the following is an one-click installation btc-pool script, mainly refer to the above documents, have been tested

-sharp!/bin/bash
-sharp  btc-pool
-sharp
-sharp OS: Ubuntu 16.04 LTS
-sharp @author 
set -e

build_dir=/tmp

-sharp  jarven https://segmentfault.com/q/1010000014060045?_ea=3538159
-sharp    bitcoin libdb-dev
-sharp    libdbPP-dev  false  true
use_latest_libdb=false

cpus=`grep -Ee 'processor\s:' /proc/cpuinfo | wc -l`


-sharp  root 
-sharp=========================
if [ "$UID" -eq 0 ] ; then
    echo " root "
    exit 1
fi


-sharp 
-sharp=============
[ -d $build_dir ] || mkdir -p $build_dir


-sharp 
-sharp==================

-sharp aptitude
if ! which aptitude >/dev/null 2>&1 ; then
    sudo apt-get update
    sudo apt-get install -y aptitude
fi

-sharp  libboost-all-dev 
if ! aptitude show libboost-all-dev > /dev/null 2>&1 ; then
    echo ""
    echo "!!!  libboost-all-dev  !!!"
    echo "<1>  'n' "
    echo "<2>  'y' "
    aptitude install libboost-all-dev
fi

-sharp
sudo aptitude install -y \
    build-essential autotools-dev libtool autoconf automake pkg-config cmake \
    openssl libssl-dev libcurl4-openssl-dev libconfigPP-dev \
    libgmp-dev libmysqlclient-dev libzookeeper-mt-dev \
    libzmq3-dev libgoogle-glog-dev libevent-dev


-sharp  librdkafka-v0.9.1
-sharp===========================
if ! pkg-config --libs rdkafka ; then
    sudo aptitude install -y zlib1g zlib1g-dev python
    cd $build_dir
    if [ ! -f librdkafka-0.9.1.tar.gz ]; then
        wget -O librdkafka-0.9.1.tar.gz https://github.com/edenhill/librdkafka/archive/0.9.1.tar.gz
        tar zxvf librdkafka-0.9.1.tar.gz
    fi
    cd librdkafka-0.9.1
    make clean
    ./configure
    make
    sudo make install
fi


-sharp  biticoin
-sharp==============
sudo aptitude install -y \
    build-essential libtool autotools-dev automake pkg-config libssl-dev \
    libevent-dev bsdmainutils python3

if [ "$use_latest_libdb" = true ]; then
    sudo aptitude install -y libdb-dev libdbPP-dev
else if ! aptitude show libdb4.8PP-dev >/dev/null 2>&1 ; then
    -sharp  libdb4.8
    sudo apt-get install -y software-properties-common
    sudo add-apt-repository -y ppa:bitcoin/bitcoin
    sudo apt-get update
    sudo apt-get install -y libdb4.8-dev libdb4.8PP-dev
fi

cd $build_dir
if [ ! -f bitcoin-0.16.0rc1.tar.gz ]; then
    wget -O bitcoin-0.16.0rc1.tar.gz https://github.com/bitcoin/bitcoin/archive/v0.16.0rc1.tar.gz
    tar zxf bitcoin-0.16.0rc1.tar.gz
fi
cd $build_dir/bitcoin-0.16.0rc1
./autogen.sh

if [ "$use_latest_libdb" = true ]; then
    ./configure --with-incompatible-bdb --disable-wallet
else
    ./configure
fi
make -j $cpus


-sharp  btcpool
-sharp=============
cd $build_dir
if [ ! -d btcpool ]; then
    git clone https://github.com/btccom/btcpool.git
fi
cd $build_dir/btcpool
[ ! -d build ] && mkdir build
cd build

-sharp Release build
cmake -DCHAIN_TYPE=BTC -DCHAIN_SRC_ROOT=$build_dir/bitcoin-0.16.0rc1 ..
make -j $cpus

Please feel free to leave a message if you have any questions.

  • Btcpool runs locally

    after compiling the btcpool source code, there is a problem running each module (not managing it with supervisor for the time being, but starting the service separately) < H2 > bitcoind < H2 > bitcoind vi root .bitcoin bitcoin.conf run: . blkma...

    Mar.03,2021
  • An error occurred in the test sequencing simulator running btcpool

    < H2 > run simpler < H2 > . simulator -c simulator.cfg -l log_simulator the program itself does not report an error, and its log does not have any useful information, but the mining machine simulation cannot be connected to sserver . < H2 > run sserv...

    Mar.03,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31825-2b5e9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31825-2b5e9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?