Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

How to gitian build dash under Debian Jessie using lxc

Discussion in 'Miscellaneous Dash Guides' started by elbereth, Jun 7, 2015.

  1. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    In this tutorial we will learn how to have a working gitian-builder for dash under Debian Jessie.

    Remark: Having grsec patch will surely mess with LXC and give you headaches with gitian-builder. Avoid...

    Prerequisites
    You need a working Debian Jessie installation. This is out of scope of this tutorial.
    Create user gitian and add it to the sudo group (or at least give it sudo power).

    Setting up Debian Jessie for gitian building
    In this section we will be setting up the Debian installation for Gitian building.

    First we need to log in as root to set up dependencies and make sure that our user can use the sudo command. Type/paste the following in the terminal:

    Code:
    apt-get install git ruby sudo apt-cacher-ng qemu-utils debootstrap lxc python-cheetah parted kpartx bridge-utils
    adduser gitian sudo
    When you get a colorful screen with a question about the 'LXC directory', just go with the default (/var/lib/lxc).

    Then set up LXC and the rest with the following, which is a complex jumble of settings and workarounds:

    Code:
    # add cgroup for LXC
    echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab
    # make /etc/rc.local script that sets up bridge between guest and host
    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 'exit 0' >> /etc/rc.local
    # make sure that USE_LXC is always set when logging in as gitian,
    # and configure LXC IP addresses
    echo 'export USE_LXC=1' >> /home/gitian/.profile
    echo 'export GITIAN_HOST_IP=10.0.3.2' >> /home/gitian/.profile
    echo 'export LXC_GUEST_IP=10.0.3.5' >> /home/gitian/.profile
    reboot
    The reboot at the end is just so that cgroup and br0 are mounted/created. Just do it by hand if you wish to avoid a reboot.
    Of course all those steps only need to be performed once.

    Installing gitian
    Re-login as the user gitian that was created during installation. The rest of the steps in this guide will be performed as that user.

    There is no python-vm-builder package in Debian, so we need to install it from source ourselves,

    Code:
    wget http://archive.ubuntu.com/ubuntu/pool/universe/v/vm-builder/vm-builder_0.12.4+bzr489.orig.tar.gz
    echo "ec12e0070a007989561bfee5862c89a32c301992dd2771c4d5078ef1b3014f03 vm-builder_0.12.4+bzr489.orig.tar.gz" | sha256sum -c
    # (verification -- must return OK)
    tar -zxvf vm-builder_0.12.4+bzr489.orig.tar.gz
    cd vm-builder-0.12.4+bzr489
    sudo python setup.py install
    cd ..
    Note: When sudo asks for a password, enter the password for the user gitian not for root.

    Clone the git repositories for bitcoin and gitian.

    Code:
    git clone https://github.com/devrandom/gitian-builder.git
    git clone https://github.com/dashpay/dash
    Setting up the gitian image
    Gitian needs a virtual image of the operating system to build in. Currently this is Ubuntu Precise x86_64. This image will be copied and used every time that a build is started to make sure that the build is deterministic. Creating the image will take a while, but only has to be done once.

    IMPORTANT: The default bin/make-base-vm will fail with Debian Jessie.
    Fixing it is easy, just add sudo before the mkfs.ext4 at line 114:
    Code:
    $ git diff
    diff --git a/bin/make-base-vm b/bin/make-base-vm
    index 7fc7818..e51b1a2 100755
    --- a/bin/make-base-vm
    +++ b/bin/make-base-vm
    @@ -114,7 +114,7 @@ if [ $LXC = "1" ]; then
       # Need universe for lxc in lucid
       env -i LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 sudo debootstrap --arch=$ARCH --include=$addpkg --exclude=$removepkg --components=main,universe $SUITE $OUT-bootstrap $MIRROR
       dd if=/dev/zero of=$OUT-lxc bs=1M count=1 seek=10240
    -  mkfs.ext4 -F $OUT-lxc
    +  sudo mkfs.ext4 -F $OUT-lxc
       t=`mktemp -d gitian.XXXXXXXX`
       sudo mount $OUT-lxc $t
       sudo cp -a $OUT-bootstrap/* $t
    Execute the following as user debian:

    Code:
    cd gitian-builder
    bin/make-base-vm --lxc --arch amd64 --suite precise
    There will be a lot of warnings printed during build of the image. These can be ignored.

    Note: When sudo asks for a password, enter the password for the user gitian not for root.

    Getting and building the inputs
    First we need to retrieve the dependencies in order to be able to build the dash binaries in gitian-builder.

    As gitian user:
    Code:
    cd ~gitian/dash
    git pull
    cd ~gitian/gitian-builder
    make -C ../dash/depends download SOURCES_PATH=`pwd`/cache/common
    You can run this before every build to be sure you are not missing dependencies. It will only download new files.

    IMPORTANT: In order to compile the Mac OSX binaries you will need to place the
    MacOSX10.7.sdk.tar.gz file in the gitian-builder/inputs folder.
    Find out the steps to create this file from the bitcoin documentation.

    Building dash binaries
    Now you only need to start compiling dash.

    REMARK: The first time you run the following commands it will update the base image and compile the full dependencies and it will take A LOT of time. You can monitor the install and build by using:
    Code:
    tail -f var/install.log
    Or:
    Code:
    tail -f var/build.log
    If no errors during the build process the output files will be in build/out directory.
    Don't forget to move them before building something else or they will be deleted.

    Linux:
    Go to gitian-builder directory and to build latest version from master:
    Code:
    ./bin/gbuild --commit dash ../dash/contrib/gitian-descriptors/gitian-linux.yml
    To build a specific commit or branch (here v0.12.0.x branch):
    Code:
    ./bin/gbuild --commit dash=v0.12.0.x ../dash/contrib/gitian-descriptors/gitian-linux.yml
    Windows:
    Go to gitian-builder directory and to build latest version from master:
    Code:
    ./bin/gbuild --commit dash ../dash/contrib/gitian-descriptors/gitian-win.yml
    To build a specific commit or branch (here v0.12.0.x branch):
    Code:
    ./bin/gbuild --commit dash=v0.12.0.x ../dash/contrib/gitian-descriptors/gitian-win.yml
    Mac OSX:
    Go to gitian-builder directory and to build latest version from master:
    Code:
    ./bin/gbuild --commit dash ../dash/contrib/gitian-descriptors/gitian-osx.yml
    To build a specific commit or branch (here v0.12.0.x branch):
    Code:
    ./bin/gbuild --commit dash=v0.12.0.x ../dash/contrib/gitian-descriptors/gitian-osx.yml
     
    #1 elbereth, Jun 7, 2015
    Last edited by a moderator: Jun 7, 2015
    • Like Like x 5
  2. moli

    moli Grizzled Member

    Joined:
    Aug 5, 2014
    Messages:
    3,261
    Likes Received:
    1,837
    Trophy Points:
    1,183
    Too geeky for me but I like it anyways.... lol ....:D
     
  3. Sub-Ether

    Sub-Ether Well-known Member

    Joined:
    Mar 31, 2014
    Messages:
    1,516
    Likes Received:
    1,254
    Trophy Points:
    183
    I want to try building a windows version from source, can someone point me towards a compilar that I download to start me off, thanks.
     
  4. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
    Use Virtual Box to run a copy of Debian/Ubuntu on your Windows Box and use the instructions above. Getting Dash compiled with Visual Studio is a mess and a tedious tasks
     
    • Like Like x 2
  5. Sub-Ether

    Sub-Ether Well-known Member

    Joined:
    Mar 31, 2014
    Messages:
    1,516
    Likes Received:
    1,254
    Trophy Points:
    183
    Ok, will look into that. I always wanted to try compiling sgminer as well, I suspected it would run a tiny bit quicker but have never been proved on my hunch as yet.
     
  6. crowning

    crowning Well-known Member

    Joined:
    May 29, 2014
    Messages:
    1,428
    Likes Received:
    2,005
    Trophy Points:
    183
    Some remarks for future readers who want to build for Windows (on Windows):
    • Building AMD-based mining software on Windows: use MinGW
    • Building Nvidia-based mining software on Windows: use Visual Studio
    • Building Dash wallet on Windows: don't do that, use Gitian. There's a reason why Bitcoin completely removed build instructions for Windows from its repository. Same applies for every Qt-based wallet BTW. And with Gitian you'll get Linux and OSX binaries for free as well.
     
    #6 crowning, Jun 7, 2015
    Last edited by a moderator: Jun 7, 2015
    • Like Like x 3
  7. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    So true... I tried last year when there was no Windows binary on coin launch to compile it directly on Windows without gitian.
    A true nightmare and I did not succeed.
     
  8. Sub-Ether

    Sub-Ether Well-known Member

    Joined:
    Mar 31, 2014
    Messages:
    1,516
    Likes Received:
    1,254
    Trophy Points:
    183
    Great, and has step by step noob instructions, only thing is I don't have any hard drive left because bitcoin has hoovered up the last 35 gigabytes and Mr Andresen wants even bigger block sizes :rolleyes:
     
  9. moli

    moli Grizzled Member

    Joined:
    Aug 5, 2014
    Messages:
    3,261
    Likes Received:
    1,837
    Trophy Points:
    1,183
    Which btc wallet are you using? I gave up downloading the core wallet and i've been using multibit, works fine for me.
     
  10. Sub-Ether

    Sub-Ether Well-known Member

    Joined:
    Mar 31, 2014
    Messages:
    1,516
    Likes Received:
    1,254
    Trophy Points:
    183
    So how much space does the multibit use, should I delete this version and put that on, is it worth doing ?
     
  11. moli

    moli Grizzled Member

    Joined:
    Aug 5, 2014
    Messages:
    3,261
    Likes Received:
    1,837
    Trophy Points:
    1,183
    Multibit for windows is 8.5MB: https://multibit.org/
    Some people prefer Electrum, but I haven't tried Electrum. You might want to compare the two. :)
     
  12. Sub-Ether

    Sub-Ether Well-known Member

    Joined:
    Mar 31, 2014
    Messages:
    1,516
    Likes Received:
    1,254
    Trophy Points:
    183
    cheers, will change over, don't take much notice of the other bitcoin wallets, I figured the blockchain info saying 35 gig as the same as me was enough and leave it at that.
     
  13. moli

    moli Grizzled Member

    Joined:
    Aug 5, 2014
    Messages:
    3,261
    Likes Received:
    1,837
    Trophy Points:
    1,183
    Oh.. before you delete that.. If you have a spare usb stick, maybe save the blockchain there just in case you need it later for some testing or something?
     
    • Like Like x 1
  14. Sub-Ether

    Sub-Ether Well-known Member

    Joined:
    Mar 31, 2014
    Messages:
    1,516
    Likes Received:
    1,254
    Trophy Points:
    183
    During my catchup and gitian installation I saw this about multibit (an SPV wallet), its an old comment by Mike Hearn and Peter Todd, but may still stand about the quicker wallet user's lack of security,
    https://bitcointalk.org/index.php?topic=252937.0
    'remember that if you want to keep the contents of your wallet private, you have to be careful with SPV mode. Because your node doesn't relay transactions, any transaction you do relay is obviously from you. In the future the payment protocol will help, but for now assume that by using an SPV wallet your peers can figure out what coins you own.'

    'You should be connecting over Tor, or at least over a proxy, if you want to maintain your privacy. Unfortunately as far as I know right now most SPV clients don't make it easy to connect over Tor, but it is possible.
    Full nodes don't have anywhere near as serious a privacy problem even without Tor because they do relay transactions, so unless someone is watching every node out there they can't know if you were the one who broadcast the transaction first.


    Good reason to run a full bitcoin wallet ?
     
    • Like Like x 1
  15. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    I'd say yes just for the sake of the network but if disk space is an issue then the light wallets are good. Even if its not a full node relaying transactions helps. ISPs seen to have a certain fixation with blocking 8333 lately and there was a bit drop in full nodes, still about 10k though. If its only showing 8 connections port 8333 (or 9999 for Dash) is likely blocked and its not running as a full node.

    EDIT: Just realised the off topic, sry.
     
    #15 stan.distortion, Jun 9, 2015
    Last edited by a moderator: Jun 9, 2015
    • Like Like x 1
  16. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    How fix this ?


    [email protected]:~/gitian-builder$ ./bin/gbuild --commit dash ../dash/contrib/gitian-descriptors/gitian-linux.yml
    sha256sum: bitcoin-deps-linux32-gitian-r9.zip: Нет такого файла или каталога
    sha256sum: bitcoin-deps-linux64-gitian-r9.zip: Нет такого файла или каталога
    sha256sum: boost-linux32-1.55.0-gitian-r1.zip: Нет такого файла или каталога
    sha256sum: boost-linux64-1.55.0-gitian-r1.zip: Нет такого файла или каталога
    sha256sum: qt-linux32-4.6.4-gitian-r1.tar.gz: Нет такого файла или каталога
    sha256sum: qt-linux64-4.6.4-gitian-r1.tar.gz: Нет такого файла или каталога
    ./bin/gbuild:238:in `block in <main>': must specify a commit for directory dash (RuntimeError)
    from ./bin/gbuild:235:in `each'
    from ./bin/gbuild:235:in `<main>'
    [email protected]:~/gitian-builder$ ./bin/gbuild --commit dash=v0.12.0.x ../dash/contrib/gitian-descriptors/gitian-linux.yml
    sha256sum: bitcoin-deps-linux32-gitian-r9.zip: Нет такого файла или каталога
    sha256sum: bitcoin-deps-linux64-gitian-r9.zip: Нет такого файла или каталога
    sha256sum: boost-linux32-1.55.0-gitian-r1.zip: Нет такого файла или каталога
    sha256sum: boost-linux64-1.55.0-gitian-r1.zip: Нет такого файла или каталога
    sha256sum: qt-linux32-4.6.4-gitian-r1.tar.gz: Нет такого файла или каталога
    sha256sum: qt-linux64-4.6.4-gitian-r1.tar.gz: Нет такого файла или каталога
    --- Building for precise i386 ---
    Stopping target if it is up
    Making a new image copy
    cp: не удалось выполнить stat для «base-precise-i386»: Нет такого файла или каталога
    ./bin/gbuild:21:in `system!': failed to run make-clean-vm --suite precise --arch i386 (RuntimeError)
    from ./bin/gbuild:57:in `build_one_configuration'
    from ./bin/gbuild:264:in `block (2 levels) in <main>'
    from ./bin/gbuild:259:in `each'
    from ./bin/gbuild:259:in `block in <main>'
    from ./bin/gbuild:257:in `each'
    from ./bin/gbuild:257:in `<main>'
    [email protected]:~/gitian-builder$ ./bin/gbuild --commit dash ../dash/contrib/gitian-descriptors/gitian-win.yml
    sha256sum: qt-win32-5.2.0-gitian-r3.zip: Нет такого файла или каталога
    sha256sum: qt-win64-5.2.0-gitian-r3.zip: Нет такого файла или каталога
    sha256sum: boost-win32-1.55.0-gitian-r6.zip: Нет такого файла или каталога
    sha256sum: boost-win64-1.55.0-gitian-r6.zip: Нет такого файла или каталога
    sha256sum: bitcoin-deps-win32-gitian-r16.zip: Нет такого файла или каталога
    sha256sum: bitcoin-deps-win64-gitian-r16.zip: Нет такого файла или каталога
    sha256sum: protobuf-win32-2.5.0-gitian-r4.zip: Нет такого файла или каталога
    sha256sum: protobuf-win64-2.5.0-gitian-r4.zip: Нет такого файла или каталога
    ./bin/gbuild:238:in `block in <main>': must specify a commit for directory dash (RuntimeError)
    from ./bin/gbuild:235:in `each'
    from ./bin/gbuild:235:in `<main>'
    [email protected]:~/gitian-builder$ ./bin/gbuild --commit dash=v0.12.0.x ../dash/contrib/gitian-descriptors/gitian-win.yml
    sha256sum: qt-win32-5.2.0-gitian-r3.zip: Нет такого файла или каталога
    sha256sum: qt-win64-5.2.0-gitian-r3.zip: Нет такого файла или каталога
    sha256sum: boost-win32-1.55.0-gitian-r6.zip: Нет такого файла или каталога
    sha256sum: boost-win64-1.55.0-gitian-r6.zip: Нет такого файла или каталога
    sha256sum: bitcoin-deps-win32-gitian-r16.zip: Нет такого файла или каталога
    sha256sum: bitcoin-deps-win64-gitian-r16.zip: Нет такого файла или каталога
    sha256sum: protobuf-win32-2.5.0-gitian-r4.zip: Нет такого файла или каталога
    sha256sum: protobuf-win64-2.5.0-gitian-r4.zip: Нет такого файла или каталога
    --- Building for precise amd64 ---
    Stopping target if it is up
    Making a new image copy
    lxc-execute: failed to mount rootfs
    lxc-execute: failed to setup rootfs for 'gitian'
    lxc-execute: Error setting up rootfs mount after spawn
    lxc-execute: failed to setup the container
    lxc-execute: invalid sequence number 1. expected 2
    lxc-execute: failed to spawn 'gitian'
    ./bin/gbuild:21:in `system!': failed to run make-clean-vm --suite precise --arch amd64 (RuntimeError)
    from ./bin/gbuild:57:in `build_one_configuration'
    from ./bin/gbuild:264:in `block (2 levels) in <main>'
    from ./bin/gbuild:259:in `each'
    from ./bin/gbuild:259:in `block in <main>'
    from ./bin/gbuild:257:in `each'
    from ./bin/gbuild:257:in `<main>'
     
  17. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    i do all step be step , but hv this error on debian
     
  18. crowning

    crowning Well-known Member

    Joined:
    May 29, 2014
    Messages:
    1,428
    Likes Received:
    2,005
    Trophy Points:
    183
    Having the error messages in English would certainly help....

    Anyway, let's do it step by step:

    - did you succesfully run "bin/make-base-vm --lxc --arch amd64 --suite precise" ?
     
  19. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
    I think he missed to download/build the dependencies - the above instructions are for the 0.12 branch. v0.11 has a different dependency system.

    Code:
    sha256sum: bitcoin-deps-linux32-gitian-r9.zip: No such file or directory
     
    #19 flare, Jul 14, 2015
    Last edited by a moderator: Jul 14, 2015
  20. crowning

    crowning Well-known Member

    Joined:
    May 29, 2014
    Messages:
    1,428
    Likes Received:
    2,005
    Trophy Points:
    183
    Nicely spotted!

    So, mraksel , you have to follow the instructions here or wait for v0.12.0.x.
     
    • Like Like x 1
  21. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    i use system debian-8.1.0-amd64 run on VMware, host windows.
    i make gitian user on instaliation. Make port forward VMware host 22222 to 22 on guest end connect to debian with putty on ssh.
    Now i make clean install , on install i choice only ssh end standart system utilites.
    Run su on terminal end login as root.
    Make standart apt-get update/upgrade.
    Put on terminal.
    Code:
    apt-get install git ruby sudo apt-cacher-ng qemu-utils debootstrap lxc python-cheetah parted kpartx bridge-utils
    
    end its run success all install normal.
    after i make gtitian sudores user with
    Code:
    adduser gitian sudo
    end its success

    then i make this
    Code:
    [email protected]:~# echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab
    [email protected]:~# echo '#!/bin/sh -e' > /etc/rc.local
    [email protected]:~# echo 'brctl addbr br0' >> /etc/rc.local
    [email protected]:~# echo 'ifconfig br0 10.0.3.2/24 up' >> /etc/rc.local
    [email protected]:~# echo 'exit 0' >> /etc/rc.local
    [email protected]:~# echo 'export USE_LXC=1' >> /home/gitian/.profile
    [email protected]:~# echo 'export GITIAN_HOST_IP=10.0.3.2' >> /home/gitian/.profile
    [email protected]:~# echo 'export LXC_GUEST_IP=10.0.3.5' >> /home/gitian/.profile
    [email protected]:~#
    
    end reboot
    lxc-checkconfig
    Code:
    [email protected]:~/gitian-builder$ lxc-checkconfig
    Kernel configuration not found at /proc/config.gz; searching...
    Kernel configuration found at /boot/config-3.16.0-4-amd64
    --- Namespaces ---
    Namespaces: enabled
    Utsname namespace: enabled
    Ipc namespace: enabled
    Pid namespace: enabled
    User namespace: enabled
    Network namespace: enabled
    Multiple /dev/pts instances: enabled
    --- Control groups ---
    Cgroup: enabled
    Cgroup clone_children flag: enabled
    Cgroup device: enabled
    Cgroup sched: enabled
    Cgroup cpu account: enabled
    Cgroup memory controller: enabled
    Cgroup cpuset: enabled
    --- Misc ---
    Veth pair device: enabled
    Macvlan: enabled
    Vlan: enabled
    File capabilities: enabled
    Note : Before booting a new kernel, you can check its configuration
    usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
    
    
     
  22. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    after i make cd .. end start next step
    Code:
    [email protected]:~$ git clone xxx//githubcom/devrandom/gitian-builder.git
    Cloning into 'gitian-builder'...
    remote: Counting objects: 753, done.
    remote: Total 753 (delta 0), reused 0 (delta 0), pack-reused 753
    Receiving objects: 100% (753/753), 160.06 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (385/385), done.
    Checking connectivity... done.
    
    Code:
    [email protected]:~$ git clone xxxx//githubcom/devrandom/gitian-builder.git
    Cloning into 'gitian-builder'...
    remote: Counting objects: 753, done.
    remote: Total 753 (delta 0), reused 0 (delta 0), pack-reused 753
    Receiving objects: 100% (753/753), 160.06 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (385/385), done.
    Checking connectivity... done.
    [email protected]:~$ git clone xxx//githubcom/dashpay/dash
    Cloning into 'dash'...
    remote: Counting objects: 70674, done.
    remote: Compressing objects: 100% (8/8), done.
    remote: Total 70674 (delta 0), reused 0 (delta 0), pack-reused 70666
    Receiving objects: 100% (70674/70674), 82.35 MiB | 493.00 KiB/s, done.
    Resolving deltas: 100% (50463/50463), done.
    Checking connectivity... done.
    [email protected]:~$
    
    then i edit this /home/gitian/gitian-builder/bin/make-base-vm
     
  23. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    put sudo on mkfs.ext4 -F $OUT-lxc
    Code:
    if [ $LXC = "1" ]; then
      if [ -e $OUT ]; then
      echo $OUT already exists, please remove it first
      exit 1
      fi
      sudo rm -rf $OUT-bootstrap
      # Need universe for lxc in lucid
      env -i LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 sudo debootstrap --arch=$ARCH --include=$addpkg --exclude=$removepkg --components=main,universe $SUITE $OUT-bootstrap $MIRROR
      dd if=/dev/zero of=$OUT-lxc bs=1M count=1 seek=10240
      sudo mkfs.ext4 -F $OUT-lxc
      t=`mktemp -d gitian.XXXXXXXX`
      sudo mount $OUT-lxc $t
      sudo cp -a $OUT-bootstrap/* $t
      sudo umount $t
      rmdir $t
    
    after i make this
    Code:
    cd gitian-builder
    bin/make-base-vm --lxc --arch amd64 --suite precise
    
    output
    Code:
    [code]
    [email protected]:~$ cd gitian-builder
    [email protected]:~/gitian-builder$ bin/make-base-vm --lxc --arch amd64 --suite precise
    Generating public/private dsa key pair.
    Your identification has been saved in var/id_dsa.
    Your public key has been saved in var/id_dsa.pub.
    The key fingerprint is:
    99:bd:0f:8e:2e:6f:d6:94:15:11:1a:76:82:78:31:0e [email protected]
    The key's randomart image is:
    +---[DSA 1024]----+
    |  E.oo+ +o  |
    |  .ooo =.  |
    |  .. .  .  |
    |  +  .  |
    |  S .o  |
    |  o.  |
    |  oo  |
    |  . oo.o  |
    |  *+ . .  |
    +-----------------+
    W: Cannot check Release signature; keyring file not available /usr/share/keyrings/ubuntu-archive-keyring.gpg
    I: Retrieving Release
    I: Retrieving Packages
    I: Validating Packages
    I: Retrieving Packages
    I: Validating Packages
    I: Resolving dependencies of required packages...
    I: Resolving dependencies of base packages...
    I: Found additional base dependencies: binutils bridge-utils ca-certificates cpp cpp-4.6 cron dnsmasq-base dpkg-dev g++ g++-4.6 gcc gcc-4.6 git git-man iptables language-pack-en-base libapparmor1 libapr1 libaprutil1 libasn1-8-heimdal libc6-dev libcap2 libc-dev-bin libclass-isa-perl libcurl3-gnutls libdb4.8 libdpkg-perl liberror-perl libgcrypt11 libgdbm3 libgmp10 libgnutls26 libgomp1 libgpg-error0 libgssapi3-heimdal libgssapi-krb5-2 libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libidn11 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libmpc2 libmpfr4 libneon27-gnutls libnetfilter-conntrack3 libnfnetlink0 libp11-kit0 libpci3 libquadmath0 libroken18-heimdal librtmp0 libsasl2-2 libstdc++6-4.6-dev libsvn1 libswitch-perl libtasn1-3 libtimedate-perl libwind0-heimdal libxml2 linux-libc-dev make openssl patch perl perl-modules rsync
    I: Checking component main on 
    I: Checking component universe on 
    
    end of this
    Code:
    I: Base system installed successfully.
    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB) copied, 0.00279528 s, 375 MB/s
    mke2fs 1.42.12 (29-Aug-2014)
    Discarding device blocks: done
    Creating filesystem with 2621440 4k blocks and 656640 inodes
    Filesystem UUID: 265424a5-6979-4ae5-ac8e-4d0b5788f192
    Superblock backups stored on blocks:
      32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
    Allocating group tables: done
    Writing inode tables: done
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information: done
    
     
  24. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    then i do this
    Code:
    cd ~gitian/dash
    git pull
    cd ~gitian/gitian-builder
    make -C ../dash/depends download SOURCES_PATH=`pwd`/cache/common
    
    output's
    Code:
    [email protected]:~/gitian-builder$ cd ~gitian/dash
    [email protected]:~/dash$ git pull
    Already up-to-date.
    [email protected]:~/dash$
    
    Code:
    [email protected]:~/gitian-builder$ cd ~gitian/dash
    [email protected]:~/dash$ git pull
    Already up-to-date.
    [email protected]:~/dash$ cd ~gitian/gitian-builder
    [email protected]:~/gitian-builder$ cd
    [email protected]:~$ apt-get install make automake
    E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
    [email protected]:~$ su
    Password:
    [email protected]:/home/gitian# cd
    [email protected]:~# apt-get install make automake
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following extra packages will be installed:
      autoconf autotools-dev
    Suggested packages:
      autoconf-archive gnu-standards autoconf-doc libtool gettext make-doc
    The following NEW packages will be installed:
      autoconf automake autotools-dev make
    0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B/1,485 kB of archives.
    After this operation, 5,142 kB of additional disk space will be used.
    Do you want to continue? [Y/n]
    Selecting previously unselected package autoconf.
    (Reading database ... 33588 files and directories currently installed.)
    Preparing to unpack .../autoconf_2.69-8_all.deb ...
    Unpacking autoconf (2.69-8) ...
    Selecting previously unselected package autotools-dev.
    Preparing to unpack .../autotools-dev_20140911.1_all.deb ...
    Unpacking autotools-dev (20140911.1) ...
    Selecting previously unselected package automake.
    Preparing to unpack .../automake_1.14.1-4_all.deb ...
    Unpacking automake (1:1.14.1-4) ...
    Selecting previously unselected package make.
    Preparing to unpack .../make_4.0-8.1_amd64.deb ...
    Unpacking make (4.0-8.1) ...
    Processing triggers for man-db (2.7.0.2-5) ...
    Processing triggers for install-info (5.2.0.dfsg.1-6) ...
    Setting up autoconf (2.69-8) ...
    Setting up autotools-dev (20140911.1) ...
    Setting up automake (1:1.14.1-4) ...
    update-alternatives: using /usr/bin/automake-1.14 to provide /usr/bin/automake (automake) in auto mode
    Setting up make (4.0-8.1) ...
    [email protected]:~# cd ~gitian/gitian-builder
    [email protected]:/home/gitian/gitian-builder# make -C ../dash/depends download SOURCES_PATH=`pwd`/cache/common
    make: Entering directory '/home/gitian/dash/depends'
    make[1]: Entering directory '/home/gitian/dash/depends'
    Fetching boost...
    [/spoiler]
    
    end of this
    Code:
    make[1]: Leaving directory '/home/gitian/dash/depends'
    make[1]: Entering directory '/home/gitian/dash/depends'
    make[1]: Leaving directory '/home/gitian/dash/depends'
    make: Leaving directory '/home/gitian/dash/depends'
    [email protected]:/home/gitian/gitian-builder#
    
    after i try run this
    Code:
    ./bin/gbuild --commit dash ../dash/contrib/gitian-descriptors/gitian-win.yml
    
    output error :sad:
    Code:
    [email protected]:/home/gitian/gitian-builder# ./bin/gbuild --commit dash ../dash/contrib/gitian-descriptors/gitian-win.yml
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    ./bin/gbuild:238:in `block in <main>': must specify a commit for directory dash (RuntimeError)
      from ./bin/gbuild:235:in `each'
      from ./bin/gbuild:235:in `<main>'
    [email protected]:/home/gitian/gitian-builder#
    


    Code:
    
    
     
  25. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Code:
    [email protected]:/home/gitian/gitian-builder# ./bin/gbuild --commit dash=v0.12.0.x ../dash/contrib/gitian-descriptors/gitian-win.yml
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    sh: 1: cd: can't cd to inputs
    Initialized empty Git repository in /home/gitian/gitian-builder/inputs/dash/.git/
    remote: Counting objects: 70685, done.
    remote: Compressing objects: 100% (19/19), done.
    remote: Total 70685 (delta 7), reused 0 (delta 0), pack-reused 70666
    Receiving objects: 100% (70685/70685), 82.36 MiB | 497.00 KiB/s, done.
    Resolving deltas: 100% (50470/50470), done.
    From https://githubcom/dashpay/dash
    * [new tag]  0.8.3.7-cc -> 0.8.3.7-cc
    * [new tag]  v0.1.5  -> v0.1.5
    * [new tag]  v0.1.6test1 -> v0.1.6test1
    then be long text ...
    
    * [new tag]  v0.9.5.5  -> v0.9.5.5
    * [new branch]  consensus-voting-sysstem -> consensus-voting-sysstem
    * [new branch]  master  -> master
    * [new branch]  master-v0.10 -> master-v0.10
    * [new branch]  revert-414-v0.12.0.x_fix_minmnpaymentsproto -> revert-414-v0.12.0.x_fix_minmnpaymentsproto
    * [new branch]  v0.11.1.x  -> v0.11.1.x
    * [new branch]  v0.11.2.x  -> v0.11.2.x
    * [new branch]  v0.12.0.x  -> v0.12.0.x
    --- Building for precise amd64 ---
    Stopping target if it is up
    Making a new image copy
    lxc-execute: failed to open log file "/var/lib/lxc/gitian/gitian.log" : No such file or directory
    sudo: unable to resolve host gitian
    stdin: is not a tty
    Reading package lists... Done
    Building dependency tree... Done
    The following packages will be REMOVED:
      rsyslog ubuntu-minimal
    0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
    After this operation, 1289 kB disk space will be freed.
    (Reading database ... 16065 files and directories currently installed.)
    Removing ubuntu-minimal ...
    Removing rsyslog ...
    initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    Processing triggers for ureadahead ...
    Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
    Adding 'local diversion of /usr/bin/ischroot to /usr/bin/ischroot.distrib'
    Adding 'local diversion of /usr/sbin/policy-rc.d to /usr/sbin/policy-rc.d.distrib'
    Starting target
    Checking if target is up
    Preparing build environment
    tar: qt-win32-5.2.0-gitian-r3.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    tar: qt-win64-5.2.0-gitian-r3.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    tar: boost-win32-1.55.0-gitian-r6.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    tar: boost-win64-1.55.0-gitian-r6.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    tar: bitcoin-deps-win32-gitian-r16.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    tar: bitcoin-deps-win64-gitian-r16.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    tar: protobuf-win32-2.5.0-gitian-r4.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    tar: protobuf-win64-2.5.0-gitian-r4.zip: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    Updating apt-get repository (log in var/install.log)
    Installing additional packages (log in var/install.log)
    Upgrading system, may take a while
    Creating package manifest
    stdin: is not a tty
    Creating build script (var/build-script)
    Running build script (log in var/build.log)
    ./bin/gbuild:21:in `system!': failed to run on-target setarch x86_64 bash -x < var/build-script > var/build.log 2>&1 (RuntimeError)
      from ./bin/gbuild:137:in `build_one_configuration'
      from ./bin/gbuild:264:in `block (2 levels) in <main>'
      from ./bin/gbuild:259:in `each'
      from ./bin/gbuild:259:in `block in <main>'
      from ./bin/gbuild:257:in `each'
      from ./bin/gbuild:257:in `<main>'
    [email protected]:/home/gitian/gitian-builder#
    
     
  26. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    install.log
    Code:
    stdin: is not a tty
    
    build.log
    Code:
    + set -e
    + export LANG=en_US.UTF-8
    + LANG=en_US.UTF-8
    + export LC_ALL=en_US.UTF-8
    + LC_ALL=en_US.UTF-8
    + umask 002
    + export OUTDIR=/home/ubuntu/out
    + OUTDIR=/home/ubuntu/out
    + GBUILD_BITS=64
    + MAKEOPTS=(-j2)
    + REFERENCE_DATETIME='2014-01-10 00:00:00'
    + REFERENCE_DATE=2014-01-10
    + REFERENCE_TIME=00:00:00
    + cd build/dash
    + git reset -q --hard
    + git clean -q -f -d
    + cd build
    + export TZ=UTC
    + TZ=UTC
    + INDIR=/home/ubuntu/build
    + OPTFLAGS=-O2
    + TEMPDIR=/home/ubuntu/tempdir
    + NEEDDIST=1
    + export QT_RCC_TEST=1
    + QT_RCC_TEST=1
    + for BITS in 32 64
    + STAGING=/home/ubuntu/staging32
    + BUILDDIR=/home/ubuntu/build32
    + BINDIR=/home/ubuntu/out/32
    + '[' 32 == 32 ']'
    + HOST=i686-w64-mingw32
    + export PATH=/home/ubuntu/staging32/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    + PATH=/home/ubuntu/staging32/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    + mkdir -p /home/ubuntu/staging32 /home/ubuntu/build32 /home/ubuntu/out/32
    + cd /home/ubuntu/staging32
    + unzip /home/ubuntu/build/qt-win32-5.2.0-gitian-r3.zip
    unzip:  cannot find or open /home/ubuntu/build/qt-win32-5.2.0-gitian-r3.zip, /home/ubuntu/build/qt-win32-5.2.0-gitian-r3.zip.zip or /home/ubuntu/build/qt-win32-5.2.0-gitian-r3.zip.ZIP.
    
     
  27. crowning

    crowning Well-known Member

    Joined:
    May 29, 2014
    Messages:
    1,428
    Likes Received:
    2,005
    Trophy Points:
    183
    In the documentation I've linked to (https://github.com/dashpay/dash/blob/master/doc/gitian-building.md) you forgot a step in the chapter "Getting and building the inputs....there's a link doc/release-process.md where you have to follow the 'Fetch and build inputs' instructions.

    Edit: The "make -C ../dash/depends" command you've used only works with v0.12.0.x, whereas doc/release-process.md is for the current Dash-version. You have to decide which version you want to build and follow EXACTLY this instructions:

    You can NOT mix both.
     
    #27 crowning, Jul 15, 2015
    Last edited by a moderator: Jul 15, 2015
    • Like Like x 2
  28. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    where get this ?
    export SIGNER=(your gitian key, ie bluematt, sipa, etc)
     
  29. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    i dont understand how to build inputs ,where in this instruction's how to build them ? i see only gow down load them but not se how to build end linked, where find the gitian key
     
  30. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    how fix this ?
    [email protected]:~/gitian-builder/inputs$ sudo wget svnboostorg/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O \
    > boost-mingw-gas-cross-compile-2013-03-03.patch
    --2015-07-15 06:53:58-- svnboostorg/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch
    Resolving svnboostorg (svnboostorg)... 129.79.39.203
    Connecting to svnboostorg (svnboostorg)|129.79.39.203|:443... connected.
    ERROR: The certificate of ‘svnboostorg’ is not trusted.
    ERROR: The certificate of ‘svnboostorg’ has expired.
    The certificate has expired