Skip to content

@go140point6 go140point6 released this Sep 6, 2019

A static build for Linux x86_64 and arm (Pi). These static builds are self-contained binaries that should require no system dependencies be installed beforehand (Berkeley DB, Boost, OpenSSL, etc.). The dependencies built into the binaries are based on the exact depends specified and future system upgrades to the OS packages should not affect the running of these wallets.

A build of some kind for OSX, I believe it's static. Regular wallet files and a .dmg for installation. See below for build instructions

x86_64-linux-gnu was tested on clean Ubuntu 18.04 and Lubuntu 19.04.
x86_64-linux-gnu-ubuntu16.04 was tested on clean Ubuntu 16.04.
arm was tested on clean Raspberry Pi 4b running Raspbian Buster.
osx was compiled on High Sierra 10.13.6 but not tested clean. Contains a .dmg also.

Both x86_64 versions include working daemon, -cli and -qt wallets.
Arm now includes -qt and well as daemon and -cli.

The only difference between x86_64 versions was the build environment (steps the same). The ubuntu16 version may actually work on 18.04 and/or 19.04, but I didn't test that.

If you prefer to build yourself, these are the steps I followed:

NOTE: Build instructions have been changed substantially to simplify and get the -qt to build on Arm. Updating these soon

Linux x86_64 and arm instructions

Build dependencies

sudo apt-get update
sudo apt-get install git curl
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-all-dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libzmq3-dev
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
sudo apt-get install libqrencode-dev
sudo apt-get install g++-arm-linux-gnueabihf
mkdir -p ~/src && cd ~/src
git clone https://github.com/MPAds/PvPCoin && cd ~/src/PvPCoin/sourcecode/
tar zxvf playervsplayercoin-source.tar.gz && cd depends/

Note: Add -jx to the end of the make where x is half or so of your cores... i.e. -j4

make HOST=x86_64-pc-linux-gnu -j4
make HOST=arm-linux-gnueabihf -j4

Build BerkeleyDB 4.8 from source (required for Arm build, recommended for x86_64)

cd ~/src
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar zxvf db-4.8.30.NC.tar.gz -C ~/src && cd db-4.8.30.NC
BDB_PREFIX=~/src/db-4.8.30.NC/db4
mkdir -p $BDB_PREFIX/x86_64 && mkdir -p $BDB_PREFIX/arm
cd ~/src/db-4.8.30.NC/build_unix

../dist/configure HOST=x86_64-pc-linux-gnu --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX/x86_64
make clean
make HOST=x86_64-pc-linux-gnu -j4
make install

../dist/configure HOST=arm-linux-gnueabihf --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX/arm
make clean
make HOST=arm-linux-gnueabihf -j4
make install

Build PvPCoin

cd ~/src/PvPCoin/sourcecode/
./autogen.sh
./configure HOST=x86_64-pc-linux-gnu --prefix=`pwd`/depends/x86_64-pc-linux-gnu --enable-static --disable-tests --disable-bench --disable-gui-tests LDFLAGS="-L${BDB_PREFIX}/x86_64/lib/" CPPFLAGS="-I${BDB_PREFIX}/x86_64/include/"
make clean
make HOST=x86_64-pc-linux-gnu -j 4
make install

./configure --prefix=`pwd`/depends/arm-linux-gnueabihf --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++ LDFLAGS="-L${BDB_PREFIX}/arm/lib/" CPPFLAGS="-I${BDB_PREFIX}/arm/include/"
make clean
make HOST=arm-linux-gnueabihf NO_QT=1 -j4
make install

Prep the location for the clean binaries to be compressed

mkdir -p ~/src/releases/x86_64/pvpcoin/pvpcoin-0.12.3.3/bin

mkdir -p  ~/src/releases/arm/pvpcoin/pvpcoin-0.12.3.3/bin

Strip binaries of debug symbols to make them smaller

cd ~/src/PvPCoin/sourcecode/depends/x86_64-pc-linux-gnu/bin
strip playervsplayercoin*
cp -p playervsplayercoin* ~/src/releases/x86_64/pvpcoin/pvpcoin-0.12.3.3/bin/

cd ~/src/PvPCoin/sourcecode/depends/arm-linux-gnueabihf/bin
/usr/arm-linux-gnueabihf/bin/strip playervsplayercoin*
cp -p playervsplayercoin* ~/src/releases/arm/pvpcoin/pvpcoin-0.12.3.3/bin/

Package up the releases

cd ~/src/releases/x86_64/pvpcoin/
tar zcvf pvpcoin-0.12.3.3-x86_64-linux-gnu.tar.gz pvpcoin-0.12.3.3/

cd ~/src/releases/arm/pvpcoin/
tar zcvf pvpcoin-0.12.3.3-arm-linux-gnueabihf.tar.gz pvpcoin-0.12.3.3/

Now move just the appropriate .tar.gz file to a clean system and they should run self-contained with no other dependencies needed once extracted

tar zxvf pvpcoin-0.12.3.3-x86_64-linux-gnu.tar.gz -C ~/

tar zxvf pvpcoin-0.12.3.3-arm-linux-gnueabihf.tar.gz -C ~/

Note: The above command places folder called pvpcoin-0.12.3.3 in your home folder root. I personally like to then create a soft link with:

ln -sfn ~/pvpcoin-0.12.3.3/ ~/pvpcoin

This will allow me to install the next release next to the current one and then update the link (for example, assume pvpcoin-0.12.4.0 gets released)

ln -sfn ~/pvpcoin-0.12.4.0/ ~/pvpcoin

The benefit is any scripts or commands I have saved can refer to the soft link of pvpcoin rather than a specific version and won't need to be updated as new wallets come out.

MacOS Build Instructions

Note: I have no idea how to build for Apple devices. I couldn't figure out how to cross-compile from Ubuntu (if anyone knows of a great step-by-step tutorial on using osxcross, I'd love to see it) so I borrowed a Macbook Pro running 10.13.6 and started pounding away until it worked... literally. This is the way I did it, probably not the best or most efficient way, but it accomplished what I set out to do (build the damn wallet!). Some steps may be not needed, but I forget some of my specific order of operation, so your mileage may vary.

The goal here was to be able to build the depends in the pvpcoin wallet source specifically for the wallet and link them statically so the wallet works stand-alone. I literally started at Xcode 10.4 and downloaded every version until one let me complete the depends and main program build process. I didn't want to try and "fix" depends to work with later Xcode, so I knew one would eventually work, and for me with these particular depends, that was Xcode 8.3.3.

Xcode Download and Setup

xcode-select --install

This next step requires a free Apple Developer Account -> Download Xcode 8.3.3 (https://download.developer.apple.com/Developer_Tools/Xcode_8.3.3/Xcode8.3.3.xip) and expand it. Resulting directory called Xcode.app can be renamed to Xcode833.app if you plan on having other version of Xcode.

Assuming the resulting download was expanded to ~/src:

sudo xcode-select -switch ~/src/Xcode833.app/Contents/Developer
sudo xcodebuild -license

Page down and type agree. Failure to do this results in your QT build failing with a license error.

Install Homebrew

cd /usr/local
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt libevent qrencode
brew install librsvg

Clone PlayerVsPlayerCoin Core, build dependencies and wallet

mkdir -p ~/src && cd ~/src
git clone https://github.com/MPAds/PvPCoin && cd ~/src/PvPCoin/sourcecode/
tar zxvf playervsplayercoin-source.tar.gz && cd depends/

Note: Add -j x to the end of the make where x is half or so of your cores... i.e. -j 4

make -j 4
cd ~/src/PVPCoin/sourcecode/
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-apple-darwin17.7.0 --enable-static --disable-tests --disable-bench --disable-gui-tests
make -j 4
make install
make deploy

Make the binaries a little smaller with strip:

strip ~/src/PvPCoin/sourcecode/depends/x86_64-apple-darwin17.7.0/bin/*

Your -qt, -cli and daemon files will be in ~/src/PvPCoin/sourcecode/depends/x86_64-apple-darwin17.7.0/bin/
You will find PlayerVsPlayerCoin-Qt.dmg in ~/src/PvPCoin/sourcecode/

Assets 6
You can’t perform that action at this time.