Skip to content

Instantly share code, notes, and snippets.

@laanwj

laanwj/gitian.md

Last active Sep 23, 2020
Embed
What would you like to do?
gitian buildling on debian 9.5

Some changes are needed to build on debian because of the switch of the guest OS to bionic.

lxc that comes with debian is not high enough version to support bionic (the minimum is 2.1.1), so need to build from scratch.

debootstrap that comes with debian will give the following error:

    $ bin/make-base-vm --lxc --suite bionic --arch amd64                                                                                              
    E: No such script: /usr/share/debootstrap/scripts/bionic

dependencies for gitian buildling on debian 9.5:

    apt-get install autoconf automake pkg-config libcap-dev

    # get lxc 3.0.1
    git clone https://github.com/lxc/lxc.git
    cd lxc
    git checkout lxc-3.0.1
    ./autogen.sh
    ./configure
    sudo make install

    # get debootstrap
    wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.95.tar.gz
    tar -zxvf debootstrap_1.0.95.tar.gz
    cd debootstrap-1.0.95 
    sudo make install
  • if you forget to install libcap-dev before building lxc, lxc-execute is going to fail because an essential program init.lxc.static is not built
@willyko

This comment has been minimized.

Copy link

@willyko willyko commented Aug 30, 2018

when I did sudo make install for LXC, it doesn't install 3.0.1 LXC to regular path path. Instead, it created a .libs folder in src/lxc.
I had to configure LXC with
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --with-rootfs-path=/usr/lib/x86_64-linux-gnu/lxc
for it to work
(This is from clean debian 9 host)

@karelbilek

This comment has been minimized.

Copy link

@karelbilek karelbilek commented Oct 7, 2018

Also missing from dependencies is libtool

@selabie68

This comment has been minimized.

Copy link

@selabie68 selabie68 commented Feb 12, 2019

when I did sudo make install for LXC, it doesn't install 3.0.1 LXC to regular path path. Instead, it created a .libs folder in src/lxc.
I had to configure LXC with
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --with-rootfs-path=/usr/lib/x86_64-linux-gnu/lxc
for it to work
(This is from clean debian 9 host)

+1 for this issue on Debian 9.7

@decryp2kanon

This comment has been minimized.

Copy link

@decryp2kanon decryp2kanon commented Sep 22, 2020

thanks the tip! however i tried on fresh debian 8.10, 9.5 and 10.5, but i got same error. any suggest? tag bitcoin 0.20.1

  • error log
$ ./gitian-build.py --setup

base-bionic-amd64 already exists, please remove it first
Traceback (most recent call last):
  File "./gitian-build.py", line 262, in <module>
    main()
  File "./gitian-build.py", line 198, in main
    setup()
  File "./gitian-build.py", line 42, in setup
    subprocess.check_call(make_image_prog)
  File "/usr/lib/python3.5/subprocess.py", line 271, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bin/make-base-vm', '--suite', 'bionic', '--arch', 'amd64', '--lxc']' returned non-zero exit status 1
@decryp2kanon

This comment has been minimized.

Copy link

@decryp2kanon decryp2kanon commented Sep 23, 2020

i many failed on debian 9.5 and 10.5. but finally succeed on ubuntu 18.04 thanks!
https://gist.github.com/decryp2kanon/67730da9e5f78bfb07f555d106b36686

@decryp2kanon

This comment has been minimized.

Copy link

@decryp2kanon decryp2kanon commented Sep 23, 2020

gitian-builder issue on debian 9 and 10
devrandom/gitian-builder#224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.