I am trying to compile my dash clone for a dissertation, but I always got the same error when I am building before testing the wallet program on windows.
here are my used machines:
-Compiling on Debian 8 VPS (also tried on Debian 8 VM but still the same error)
-Disk space: 100 Gb
-Base memory: 4096 Mbs
-Coin name for the dissertation: Flowercoin
Steps I used to build my dash clone:
1. Update the software packages index and download package updates:
2. Install the necessary software packages for the compiler:
3. Assign to the user partial superuser privileges (ex., debian):
4. Setting up LXC:
echo '#!/bin/sh -e' > /etc/rc.local
echo 'brctl addbr br0' >> /etc/rc.local
echo 'ifconfig br0 10.0.3.2/24 up' >> /etc/rc.local
echo 'iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE' >> /etc/rc.local
echo 'echo 1 > /proc/sys/net/ipv4/ip_forward' >> /etc/rc.local
echo 'exit 0' >> /etc/rc.local
echo 'export USE_LXC=1' >> /home/debian/.profile
echo 'export GITIAN_HOST_IP=10.0.3.2' >> /home/debian/.profile
echo 'export LXC_GUEST_IP=10.0.3.5' >> /home/debian/.profile
reboot
5. Preparing the compiler
tar -zxvf vm-builder_0.12.4+bzr494.orig.tar.gz
cd vm-builder-0.12.4+bzr494
sudo python setup.py install
cd ..
6. Downloading and installing the compiler of the wallet program:
cd gitian-builder
bin/make-base-vm --lxc --arch amd64 --suite precise
cd ..
7. Downloading and installing the genesis blocks generator for the future cryptocurrency and the xcoin-hash module (for the algorithm X11):
git clone https://github.com/lhartikk/xcoin-hash
cd xcoin-hash
sudo python setup.py install
cd ..
git clone https://github.com/lhartikk/GenesisH0
8. Initially, I logged in to GitHub hosting account and go to the official Dash repository. There I chose «Fork» for cloning the repository. Next, it is necessary to rename the cloned repository («Settings» – «Repository name»), then download the repository to the computer (in GitHub Desktop: «Create, clone or add a local repository», select the cloned repository and click «Clone»). After successful downloading, it is necessary to unzip the files from the archive with the Dash 0.12.0.60 source code to the folder with the downloaded repository with the full replacement of all files.
While editing the source code, it is necessary to change the repository address and the name of cryptocurrency Dash to its own (in this example, is used the name «Flowercoin»). For this action, in Notepad++: «Search» – «Find» – «Find in files», I selected the directory with the saved repository from GitHub and set the parameters: «Filters» – «*.*», «Match case», «In all sub-folders», «In hidden folders».
It is necessary to replace:
1. «github.com/dashpay/dash» on «github.com/dmrtsvetkov/flowercoin».
2. Repository name: «DASHPAY», «Dashpay», «dashpay» on «DMRTSVETKOV», «Dmrtsvetkov», «dmrtsvetkov»
3. Name of the cryptocurrency: «DASH», «Dash», «dash» on «FLOWERCOIN», «Flowercoin», «flowercoin».
4. After renaming, I replaced the Dash cryptocurrency logos and icons with my own in the following folders:
FOLDER_WITH_REPOSITORY\flowercoin\src\qt\res\icons
FOLDER_WITH_REPOSITORY\flowercoin\src\qt\res\images
FOLDER_WITH_REPOSITORY\flowercoin\share\pixmaps
9. Next, it is necessary to generate digital signatures for genesis blocks generation. The algorithm used in the generation of signatures is ECDSA. To do this, I followed the following commands in the Debian VM:
openssl ecparam -genkey -name secp256r1 –out main.pem
openssl ecparam -genkey -name secp256r1 -out mainalert.pem
openssl ecparam -genkey -name secp256r1 -out testnetalert.pem
openssl ecparam -genkey -name secp256r1 -out mainspork.pem
openssl ecparam -genkey -name secp256r1 -out testnetspork.pem
# output of generated signatures in text
openssl ec -in main.pem -noout –text
openssl ec -in mainalert.pem -noout -text
openssl ec -in testnetalert.pem -noout -text
openssl ec -in mainspork.pem -noout -text
openssl ec -in testnetspork.pem -noout -text
The results achieved have been copied from the command line to a text file. In this file I removed all the colons and aligned the keys in one line.
After the generation of all signatures, I generated genesis blocks for the future cryptocurrency. To do this, on the Debian command line (for the main block):
python genesis.py -a X11 -z «I created flowercoin 01/05/2017 for my dissertation» –p «047e30c6c8304ac9f6f100e9eb00976e751b38e3af46989cc8e1927a944c65613c3c97c550aef46cc9f2da62ebed9b5bb010afc1314a175d8d4d5e2c02caa8792» -t 1495303200
where parameter -a – hash algorithm; -z – pszTimestamp – the input content of the transaction generating the genesis block (an arbitrary phrase, usually the title of the news); -p – the public key of the signature «main»; -t – time of genesis block generation in unix (is converted into special services [3]), the launch of the wallet program and the generation of the first block must be done no later than one hour after the specified time.
In addition to the main genesis block of the main network, it is also necessary to generate the testnet and regtest genesis blocks:
python genesis.py -a X11 -z «I created flowercoin 01/05/2017 for my dissertation» –p «047e30c6c8304ac9f6f100e9eb00976e751b38e3af46989cc8e1927a944c65613c3c97c550aef46cc9f2da62ebed9b5bb010afc1314a175d8d4d5e2c02caa87924» -t 1495303202 -b 0x207fffff
10. Chainparams.cpp is modified with the desired parameters for my coin, ports are changed, checkpoints, merkle hash, genesis blocks, epoxtime, etc.
11. To compile the wallet program in the Debian console, I ran the following commands:
cd gitian-builder
make -C ../flowercoin/depends download SOURCES_PATH=`pwd`/cache/common [i][b][color=red](THIS IS WHERE THE ERROR IS)[/color][/b][/i]
./bin/gbuild --commit flowercoin=master ../flowercoin/contrib/gitian-descriptors/gitian-win.yml [color=red][i][b](THIS IS WHERE THE ERROR IS)[/b][/i][/color]
I get the error below:
sha256sum: WARNING: 1 computed checksum did NOT match
funcs.mk:231: recipe for target '/root/gitian-builder/cache/common/download-stamps/.stamp_fetched-native_cctools-cctools-809.tar.gz' failed
make[1]: *** [/root/gitian-builder/cache/common/download-stamps/.stamp_fetched-native_cctools-cctools-809.tar.gz] Error 1
make[1]: Leaving directory '/root/flowercoin/depends'
Makefile:128: recipe for target 'download-osx' failed
make: *** [download-osx] Error 2
make: Leaving directory '/root/flowercoin/depends'
But before having this error, it downloads all the other packages on /root/flowercoin/depends/work/download/native_cctools-809/, but fails on '/root/gitian-builder/cache/common/download-stamps/.stamp_fetched-native_cctools-cctools-809.tar.gz
Anyone who can give me a hint or a tip on what to do would be my lifesaver.
Cheers!