Gitian Build issue on Ubuntu host (LXC is missing the - - name option) #14068

issue giaki3003 opened this issue on August 26, 2018
  1. giaki3003 commented at 12:12 PM on August 26, 2018: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

    I'm trying out the new gitian build process with a bionic host (I've always built with trusty before) on LXC. Running the new script "gitian-build.py" in the contrib folder should output me with assert files to be signed, but instead drops this error:

    Stopping target if it is up
    Making a new image copy
    lxc-init: missing container name, use --name option
    bin/gbuild:21:in `system!': failed to run make-clean-vm --suite bionic --arch amd64 (RuntimeError)
            from bin/gbuild:57:in `build_one_configuration'
            from bin/gbuild:308:in `block (2 levels) in <main>'
            from bin/gbuild:303:in `each'
            from bin/gbuild:303:in `block in <main>'
            from bin/gbuild:301:in `each'
            from bin/gbuild:301:in `<main>'
    Traceback (most recent call last):
      File "./gitian-build.py", line 160, in <module>
        main()
      File "./gitian-build.py", line 157, in main
        build()
      File "./gitian-build.py", line 56, in build
        subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'PrivateBTC='+args.commit, '--url', 'bitcoin='+args.url, '../PrivateBTC/contrib/gitian-descriptors/gitian-linux.yml'])
      File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['bin/gbuild', '-j', '2', '-m', '2000', '--commit', 'PrivateBTC=v0.1', '--url', 'bitcoin=https://github.com/giaki3003/PrivateBTC', '../PrivateBTC/contrib/gitian-descriptors/gitian-linux.yml']' returned non-zero exit status 1
    

    Notice i did set up a repo called "PrivateBTC", forked off the latest BTC source. Everything else is unchanged, and this issue can be reproduced on latest BTC source too. I'm doing this on a Ubuntu 14.04 VPS, and have conducted countless gitian builds on it before.

  2. MarcoFalke commented at 12:45 PM on August 26, 2018: member

    Please include exact steps to reproduce on a clean machine.

  3. MarcoFalke closed this on Aug 26, 2018

  4. giaki3003 commented at 1:59 PM on August 26, 2018: none

    EXACT STEPS TO REPRODUCE THE ISSUE ON A CLEAN MACHINE:

    1. Install Ubuntu 14.04
    2. 'git clone https://github.com/bitcoin/bitcoin'
    3. 'git clone https://github.com/devrandom/gitian-builder'
    echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab
    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
    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
    

    Install the vmbuilder pack on top 5) 'cd gitian-builder' 6) 'bin/make-base-vm --lxc --arch amd64 --suite bionic' 7) 'make -C ../bitcoin/depends download SOURCES_PATH=pwd/cache/common' 8) './bin/gbuild --commit bitcoin ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml'

  5. MarcoFalke commented at 2:07 PM on August 26, 2018: member

    Please note that lxc-execute --version >= 2.1.1 is required

    #13171 (comment)

  6. giaki3003 commented at 2:11 PM on August 26, 2018: none

    Great, thanks for the quick info. Will try adding the flag and will report back. Adding the - - name option on the gitian Build script does nothing, let's try this

  7. MarcoFalke commented at 2:17 PM on August 26, 2018: member

    Oh, I mean you'd probably have to compile lxc on your own when running on trusty, since there is no such lxc version in trustys package manager.

  8. giaki3003 commented at 2:30 PM on August 26, 2018: none

    I've built easily on trusty machines when gitian asked for Jessie and Trusty vms. Now that gitian requires Bionic I've been having issues. That's why I opened this issue here.

  9. MarcoFalke commented at 2:36 PM on August 26, 2018: member

    using trusty as host might work (I think no one tested it yet), but if your guest is bionic you must have a lxc version of 2.1.1 or higher.

  10. giaki3003 commented at 2:59 PM on August 26, 2018: none

    Current source does not build correctly on a Trusty guest, even after scaling all gcc down to 4.8 and removing RISCV related stuff. I'm going to update my host to something newer and install a newer LXC. Currently I think the issue is this - - name flag which isn't supported by my current install. Also the python script breaks, so definetely an issue with an older host. I'll keep this thread updated.

  11. giaki3003 commented at 6:17 PM on August 26, 2018: none

    Upgraded to bionic on the host machine, using the latest LXC, it goes through but now this error pops up:

    mesg: ttyname failed: Inappropriate ioctl for device

    it then proceeds listing a series of packages which are not found.

  12. decryp2kanon commented at 2:06 PM on September 23, 2020: contributor
  13. giaki3003 commented at 3:11 PM on September 23, 2020: none

    succeed on ubuntu 18.04 @giaki3003 https://gist.github.com/decryp2kanon/67730da9e5f78bfb07f555d106b36686

    Thanks for the feedback. Building on anything other than U18 is broken, apparently

  14. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me