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. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183
    You don't need that for building, just for releasing software.

    This instructions are here

    https://github.com/dashpay/dash/blob/master/doc/release-process.md

    Code:
    wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.20140701.tar.gz' -O miniupnpc-1.9.20140701.tar.gz
    wget 'https://www.openssl.org/source/openssl-1.0.1k.tar.gz'
    wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
    wget 'http://zlib.net/zlib-1.2.8.tar.gz'
    wget 'ftp://ftp.simplesystems.org/pub/png/src/history/libpng16/libpng-1.6.8.tar.gz'
    wget 'https://fukuchi.org/works/qrencode/qrencode-3.4.3.tar.bz2'
    wget 'https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2'
    wget 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O \
         boost-mingw-gas-cross-compile-2013-03-03.patch
    wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz'
    wget 'https://download.qt-project.org/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz'
    wget 'https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2'
    wget 'https://github.com/mingwandroid/toolchain4/archive/10cc648683617cca8bcbeae507888099b41b530c.tar.gz'
    wget 'http://www.opensource.apple.com/tarballs/cctools/cctools-809.tar.gz'
    wget 'http://www.opensource.apple.com/tarballs/dyld/dyld-195.5.tar.gz'
    wget 'http://www.opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz'
    wget 'http://pkgs.fedoraproject.org/repo/pkgs/cdrkit/cdrkit-1.1.11.tar.gz/efe08e2f3ca478486037b053acd512e9/cdrkit-1.1.11.tar.gz'
    wget 'https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz'
    wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O \
         clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
        wget 'https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff' -O \
         cdrkit-deterministic.patch
    cd ..
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-linux.yml
    mv build/out/boost-*.zip inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-linux.yml
    mv build/out/bitcoin-deps-*.zip inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/qt-linux.yml
    mv build/out/qt-*.tar.gz inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-win.yml
    mv build/out/boost-*.zip inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-win.yml
    mv build/out/bitcoin-deps-*.zip inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/qt-win.yml
    mv build/out/qt-*.zip inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/protobuf-win.yml
    mv build/out/protobuf-*.zip inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-native.yml
    mv build/out/osx-*.tar.gz inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-depends.yml
    mv build/out/osx-*.tar.gz inputs/
    ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-qt.yml
    mv build/out/osx-*.tar.gz inputs/
     
  2. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183
    Use option '--no-check-certificate"

    Code:
    wget --no-check-certificate 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O boost-mingw-gas-cross-compile-2013-03-03.patch
     
  3. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    download this sources in to input folder ?

    Code:
    [email protected]:~/gitian-builder$ ./bin/gbuild ../dash/contrib/gitian-descriptors/boost-win.yml
    --- Building for precise amd64 ---
    Stopping target if it is up
    Making a new image copy
    libexec/config-bootstrap-fixup: line 15: target-bin/bootstrap-fixup: Permission denied
    ./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>'
    [email protected]:~/gitian-builder$ sudo ./bin/gbuild ../dash/contrib/gitian-descriptors/boost-win.yml
    
    ************* WARNING: kvm not loaded, this will probably not work out
    
    --- Building for precise amd64 ---
    Stopping target if it is up
    Making a new image copy
    qemu-img: target-precise-amd64.qcow2: Could not open 'base-precise-amd64.qcow2': Could not open 'base-precise-amd64.qcow2': No such file or directory: No such file or directory
    ./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>'
    [email protected]:~/gitian-builder$
    
    
     
  4. crowning

    crowning Well-known Member

    Joined:
    May 29, 2014
    Messages:
    1,430
    Likes Received:
    2,009
    Trophy Points:
    183
    Just a general remark: you use "sudo" all the time....can of worms because the created files will belong to user "root" and therefore other things will fail later on.

    Use the EXACT commands as written in those Gitian installation guides....everything else might not fail but WILL fail.
    Sooner or later.

    When you're lucky sooner...
     
    #34 crowning, Jul 15, 2015
    Last edited by a moderator: Jul 15, 2015
  5. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    i reinstall all end inputs start noraml build ,
    but i hv

    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

    or its normal ?
     
  6. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183
    It's normal, exactly what i get on our CI server --> https://dashpay.atlassian.net/builds/download/DASHL-DEV-JOB1/build_logs/DASHL-DEV-JOB1-132.log

    Code:
    error    15-Jul-2015 16:48:26    sudo: unable to resolve host gitian
    error    15-Jul-2015 16:48:26    stdin: is not a tty
    build    15-Jul-2015 16:49:43    Reading package lists...
    build    15-Jul-2015 16:49:43    Building dependency tree...
    build    15-Jul-2015 16:49:43    The following packages will be REMOVED:
    build    15-Jul-2015 16:49:43      rsyslog ubuntu-minimal
    build    15-Jul-2015 16:49:43    0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
    build    15-Jul-2015 16:49:43    After this operation, 1289 kB disk space will be freed.
    build    15-Jul-2015 16:49:43    (Reading database ... 16065 files and directories currently installed.)
    build    15-Jul-2015 16:49:43    Removing ubuntu-minimal ...
    build    15-Jul-2015 16:49:43    Removing rsyslog ...
    error    15-Jul-2015 16:49:43    initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    build    15-Jul-2015 16:49:43    Processing triggers for ureadahead ...
    build    15-Jul-2015 16:49:44    Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
    build    15-Jul-2015 16:49:44    Adding 'local diversion of /usr/bin/ischroot to /usr/bin/ischroot.distrib'
    build    15-Jul-2015 16:49:44    Adding 'local diversion of /usr/sbin/policy-rc.d to /usr/sbin/policy-rc.d.distrib'
    build    15-Jul-2015 16:49:44    Starting target
    build    15-Jul-2015 16:49:45    Checking if target is up
    build    15-Jul-2015 16:49:45    Preparing build environment
    build    15-Jul-2015 16:51:23    Updating apt-get repository (log in var/install.log)
    build    15-Jul-2015 16:52:03    Installing additional packages (log in var/install.log)
    error    15-Jul-2015 16:52:35    stdin: is not a tty
    build    15-Jul-2015 16:52:35    Upgrading system, may take a while
    build    15-Jul-2015 16:54:21    Creating package manifest
    error    15-Jul-2015 16:54:22    stdin: is not a tty
    build    15-Jul-2015 16:54:27    Creating build script (var/build-script)
    build    15-Jul-2015 16:54:35    Running build script (log in var/build.log)
    build    15-Jul-2015 17:02:41    Grabbing results
    build    15-Jul-2015 17:02:48    Grabbing cache
    build    15-Jul-2015 17:04:21    Generating report
    build    15-Jul-2015 17:04:21    d4e63577d1489a8bda08618c2b8d48bc73904b664f44e0b6c509f038bf8886ab  dash-0.12.0-linux32.tar.gz
    build    15-Jul-2015 17:04:21    0c1a5ea6b51dae3e594bae01013584274d722a74477e94cbc46892ebf547fdc7  dash-0.12.0-linux64.tar.gz
    build    15-Jul-2015 17:04:21    0dcbba5113a5ab789a546ad816c18496e3cefe9d815be9b6407c1098aa718353  src/dash-0.12.0.tar.gz
    build    15-Jul-2015 17:04:28    984ec9267fdfe83967fd219b1073b02286e76aeb65771ef238695b4fb002bdde  dash-linux-0.12-res.yml
    build    15-Jul-2015 17:04:28    Done.
     
  7. mraksel

    mraksel New Member

    Joined:
    Jul 14, 2015
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    all work
     
    • Like Like x 1
  8. peakay

    peakay New Member

    Joined:
    Jul 29, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Code:
    [email protected]:~/gitian-builder$ ./bin/gbuild ../dash/contrib/gitian-descriptors/boost-win.yml
    --- Building for precise amd64 ---
    Stopping target if it is up
    Making a new image copy
    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
    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>'
    
    I've managed to proceed through each build step until this point. I've also tried restarting, to no avail.

    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='2011-01-30 00:00:00'
    + REFERENCE_DATE=2011-01-30
    + REFERENCE_TIME=00:00:00
    + cd build
    + export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
    + LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
    + export 'FAKETIME=2011-01-30 00:00:00'
    + FAKETIME='2011-01-30 00:00:00'
    + export TZ=UTC
    + TZ=UTC
    + INDIR=/home/ubuntu/build
    + TEMPDIR=/home/ubuntu/tmp
    + echo 'fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52  boost_1_55_0.tar.bz2'
    + shasum -c
    boost_1_55_0.tar.bz2: OK
    + echo 'd2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268  boost-mingw-gas-cross-compile-2013-03-03.patch'
    + shasum -c
    boost-mingw-gas-cross-compile-2013-03-03.patch: FAILED
    shasum: WARNING: 1 computed checksum did NOT match
    
    
     
  9. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183


    You'll need to download the dependencies first, the file "boost-mingw-gas-cross-compile-2013-03-03.patch" is one of these.
    Follow "Fetch and build inputs: (first time, or when dependency versions change)" from https://github.com/dashpay/dash/blob/master/doc/release-process.md
    where it states

    Code:
    cd inputs
    wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.20140701.tar.gz' -O miniupnpc-1.9.20140701.tar.gz
    wget 'https://www.openssl.org/source/openssl-1.0.1k.tar.gz'
    wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
    wget 'http://zlib.net/zlib-1.2.8.tar.gz'
    wget 'ftp://ftp.simplesystems.org/pub/png/src/history/libpng16/libpng-1.6.8.tar.gz'
    wget 'https://fukuchi.org/works/qrencode/qrencode-3.4.3.tar.bz2'
    wget 'https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2'
    wget 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O \
         boost-mingw-gas-cross-compile-2013-03-03.patch
    wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz'
    wget 'https://download.qt-project.org/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz'
    wget 'https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2'
    wget 'https://github.com/mingwandroid/toolchain4/archive/10cc648683617cca8bcbeae507888099b41b530c.tar.gz'
    wget 'http://www.opensource.apple.com/tarballs/cctools/cctools-809.tar.gz'
    wget 'http://www.opensource.apple.com/tarballs/dyld/dyld-195.5.tar.gz'
    wget 'http://www.opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz'
    wget 'http://pkgs.fedoraproject.org/repo/pkgs/cdrkit/cdrkit-1.1.11.tar.gz/efe08e2f3ca478486037b053acd512e9/cdrkit-1.1.11.tar.gz'
    wget 'https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz'
    wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O \
         clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
        wget 'https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff' -O \
         cdrkit-deterministic.patch
     
    • Like Like x 1
  10. peakay

    peakay New Member

    Joined:
    Jul 29, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    These are the deps that I have downloaded, which I believe is everything from that list, including the file that you mentioned.

    Code:
    [email protected]:~/gitian-builder/inputs$ ls
    10cc648683617cca8bcbeae507888099b41b530c.tar.gz  cdrkit-deterministic.patch                    protobuf-2.5.0.tar.bz2
    bitcoin-deps-linux32-gitian-r9.zip               clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz  qrencode-3.4.3.tar.bz2
    bitcoin-deps-linux64-gitian-r9.zip               db-4.8.30.NC.tar.gz                           qt-everywhere-opensource-src-4.6.4.tar.gz
    boost_1_55_0.tar.bz2                             dyld-195.5.tar.gz                             qt-everywhere-opensource-src-5.2.0.tar.gz
    boost-linux32-1.55.0-gitian-r1.zip               ld64-127.2.tar.gz                             qt-linux32-4.6.4-gitian-r1.tar.gz
    boost-linux64-1.55.0-gitian-r1.zip               libdmg-hfsplus-v0.1.tar.gz                    qt-linux64-4.6.4-gitian-r1.tar.gz
    boost-mingw-gas-cross-compile-2013-03-03.patch   libpng-1.6.8.tar.gz                           zlib-1.2.8.tar.gz
    cctools-809.tar.gz                               miniupnpc-1.9.20140701.tar.gz
    cdrkit-1.1.11.tar.gz                             openssl-1.0.1k.tar.gz
    
     
  11. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183
    Good, now

    Code:
    ./bin/gbuild ../dash/contrib/gitian-descriptors/boost-win.yml
    should work as intended.
     
  12. charlierocket

    charlierocket New Member

    Joined:
    Feb 7, 2018
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1

Share This Page