forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 15
/
BuildBiblePay.txt
163 lines (124 loc) · 6.31 KB
/
BuildBiblePay.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Build BiblePay - Ubuntu
/* Optional: How to increase swap space on a machine with 1gb of ram:
free #check if swap is 0 then do this:
sudo fallocate -l 1G /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo nano /etc/fstab
#add this line:
/swapfile swap swap defaults 0 0
#save the file
sudo swapon --show
free #check - should be 1G
*/
#Building for Ubuntu 20, 18, 17, 16 on Linux:
First install Ubuntu dependencies:
sudo apt install build-essential libtool autotools-dev automake pkg-config git curl
sudo apt install libboost-system-dev libboost-filesystem-dev libboost-thread-dev
sudo apt install
sudo apt install python3 bsdmainutils cmake
** These instructions have been updated for RandomX! Please see below: **
** Building Daemon and QT: **
git clone http://github.com/biblepay/biblepay
# RandomX Part
cd biblepay/src/crypto/RandomX
mkdir build && cd build
cmake -DARCH=native ..
make
cd ../../../../..
# end of RandomX Part
cd biblepay/depends
make -j 4 # Choose a good -j value, depending on the number of CPU cores available
cd ..
./autogen.sh
#Note: echo `pwd` should point to the directory you are in
./configure --prefix `pwd`/depends/x86_64-pc-linux-gnu
make
See more here:
https://github.com/biblepay/biblepay/blob/master/doc/build-unix.md
** How to upgrade BiblePay: **
cd ~/biblepay
git pull origin master
cd src
make
*** NOTE:
Watchman-on-the-wall is no longer required in BiblePay (as it is compiled as a part of our wallet now) ****
*** TROUBLESHOOTING ****
Q: What if I receive an error during ./autogen.sh? Libtoolize failed AC_CONFIG_MACRO_DIRS([build-aux/m4]) conflicts with ACLOCAL.AMFLAGS=-I build-aux/m4?
A: This is because some files were downloaded from git with CRLF. Fix with:
find . -name \*.m4|xargs dos2unix
find . -name \*.ac|xargs dos2unix
find . -name \*.am|xargs dos2unix
find . -name \*.sh|xargs dos2unix
** How to clone BiblePay Develop **
mkdir ~/biblepaytest
cd ~/biblepaytest
git clone -b develop http://github.com/biblepay/biblepay
git pull origin develop
**** DEVELOPER SECTION - FOR DEV USE ****
Devs; Building Windows using Cross-Compile 64-bit version:
One Time:
$ sudo update-alternatives --config i686-w64-mingw32-gcc
(select i686-w64-mingw32-gcc-posix)
$ sudo update-alternatives --config i686-w64-mingw32-g++
(select i686-w64-mingw32-g++-posix)
https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md
cd depends
make HOST=x86_64-w64-mingw32 -j4
cd ..
./autogen.sh
./configure --prefix /biblepay/depends/x86_64-w64-mingw32
cd src
sudo make
make deploy
(deploy files in /biblepay)
#How to cross compile MAC on Ubuntu 20.04 for Darwin14:
#sudo apt-get install python3-setuptools
#sudo apt install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git libdb4.8-dev libdb4.8++-dev curl
#sudo apt install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libzmq3-dev
#sudo apt install ca-certificates curl g++ git-core pkg-config autoconf librsvg2-bin libtiff-tools libtool automake faketime bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python python-dev python-setuptools fonts-tuffy p7zip-full sleuthkit
#sudo apt install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
#sudo apt-get install python3-setuptools libcap-dev zlib1g-dev libbz2-dev
sudo apt-get install python3-setuptools libcap-dev zlib1g-dev libbz2-dev cmake
#old way: Saving in case the new way breaks; skip this section and go to the new way first (10.14):
First, extract the MAC SDK.
Log in to your apple developer account: (https://docs.dash.org/en/0.12.3/developers/compiling.html)
A copy of the macOS SDK is required during the build process. To download this, use a Google Chrome in a desktop environment to go to https://appleid.apple.com and create or sign in to your Apple account. Then go to https://developer.apple.com and open the Chrome Developer Tools from the Menu -> More tools -> Developer tools. Click on the Network tab, then go back to your main browser window and copy in the following URL:
https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg
Cancel the download as soon as it begins and go back to your the Network tab in the developer tools. Right click on the network request at the bottom of the list labeled Xcode_7.3.1.dmg and select Copy -> Copy as cURL (bash). Paste this long string of text into your Linux terminal, append -o Xcode_7.3.1.dmg at the end and then press enter to begin the download. Once it is complete, extract the required files from the disc image as follows:
Extract the SDK:
contrib/macdeploy/extract-osx-sdk.sh
rm -rf 5.hfs MacOSX10.11.sdk
mkdir depends/SDKs
mv MacOSX10.11.sdk/ depends/SDKs/
#new way:
mkdir -p depends/sdk-sources
mkdir -p depends/SDKs
curl https://bitcoincore.org/depends-sources/sdks/MacOSX10.14.sdk.tar.gz -o depends/sdk-sources/MacOSX10.14.sdk.tar.gz
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX10.14.sdk.tar.gz
#newest way:
mkdir -p depends/sdk-sources
mkdir -p depends/SDKs
curl https://bitcoincore.org/depends-sources/sdks/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz -o depends/sdk-sources/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz
tar -C depends/SDKs -xf depends/sdk-sources/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz
Build the Apple dependencies:
#make -C depends HOST=x86_64-apple-darwin14
make -C depends HOST=x86_64-apple-darwin19
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-apple-darwin19
make
*** LEGACY -- (Optional) Install Berkeley DB 4.8 locally without bitcoin ppa - do not use these instructions unless you really need this ***
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-
4.8.30.NC.tar.gz' | sha256sum -c
tar -xvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
mkdir -p build
BDB_PREFIX=$(pwd)/build
../dist/configure --prefix=/usr/local --enable-cxx --with-pic --prefix=$BDB_PREFIX
sudo make install -B -i -k
export BDB_INCLUDE_PATH="/usr/local/BerkeleyDB.4.8/include"
export BDB_LIB_PATH="/usr/local/BerkeleyDB.4.8/lib"
ln -s /usr/local/BerkeleyDB.4.8/lib/libdb-4.8.so /usr/lib/libdb-4.8.so