Author

Topic: How do you build the Bitcoin deamon for all targets at once? (Read 1498 times)

hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
It's possible, but it can be a bit of a pain if you've never done it before. It's the way that the official binaries are built.

On the plus side, it's very well documented here.

If you're starting with an existing Ubuntu system, you can skip down to "Setting up Debian for gitian building". This particular section needs a few changes for Ubuntu (it was originally written for Debian 7.4). Specifically, the apt-get line should read:
Code:
sudo apt-get install apt-cacher-ng git python-vm-builder ruby1.9.1 lxc
Don't run the "adduser debian sudo" line. The "set up LXC and the rest with the following, which is a complex jumble of settings and workarounds" section is partly unnecessary, and it should instead look like this for Ubuntu:
Code:
# the version of lxc-start in Ubuntu needs to run as root, so make sure
# that the build script can execute it without providing a password
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-execute" | sudo tee /etc/sudoers.d/gitian-lxc >/dev/null
sudo chmod 440 /etc/sudoers.d/gitian-lxc
# make sure that USE_LXC is always set when logging in,
# and configure LXC IP addresses
echo 'export USE_LXC=1' >> ~/.profile
echo 'export LXC_GUEST_IP=10.0.3.5' >> ~/.profile
echo 'export GITIAN_HOST_IP=10.0.3.1' >> ~/.profile
echo 'export LXC_BRIDGE=lxcbr0' >> ~/.profile
The section which talks about manually installing python-vm-builder can be ignored.

The rest of this document should work on Ubuntu.

One important note: if you're running this on a fully updated Ubuntu 14.04 system, it won't work due to a bug (see here). I think it should work on most previous releases of Ubuntu, or on an unupdated version of 14.04 (but not 14.04.1), but I'm not certain of this....

(edited several times...)

FYI the bug affecting 14.04 has been fixed in the current version of Gitian, you can use it as the host OS now (but you should continue to use "precise" as the guest OS as per the docs).
member
Activity: 84
Merit: 10
Theymos, unban my account.
It's possible, but it can be a bit of a pain if you've never done it before. It's the way that the official binaries are built.

On the plus side, it's very well documented here.

If you're starting with an existing Ubuntu system, you can skip down to "Setting up Debian for gitian building". This particular section needs a few changes for Ubuntu (it was originally written for Debian 7.4). Specifically, the apt-get line should read:
Code:
sudo apt-get install apt-cacher-ng git python-vm-builder ruby1.9.1 qemu-utils debootstrap lxc
Don't run the "adduser debian sudo" line. The "set up LXC and the rest with the following, which is a complex jumble of settings and workarounds" section is partly unnecessary, and it should instead look like this for Ubuntu:
Code:
# the version of lxc-start in Ubuntu needs to run as root, so make sure
# that the build script can execute it without providing a password
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-start" > /etc/sudoers.d/gitian-lxc
# make sure that USE_LXC is always set when logging in,
# and configure LXC IP addresses
echo 'export USE_LXC=1' >> ~/.profile
echo 'LXC_GUEST_IP=10.0.3.5' >> ~/.profile
echo 'GITIAN_HOST_IP=10.0.3.1' >> ~/.profile
echo 'LXC_BRIDGE=lxcbr0' >> ~/.profile
The section which talks about manually installing python-vm-builder can be ignored.

The rest of this document should work on Ubuntu.

One important note: if you're running this on a fully updated Ubuntu 14.04 system, it won't work due to a bug (see here). I think it should work on most previous releases of Ubuntu, or on an unupdated version of 14.04 (but not 14.04.1), but I'm not certain of this....

Awesome! Thank you very much. I'm going to switch to 12.04 instead of 14.04.1 as most of the documentation is built for that anyway.
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
It's possible, but it can be a bit of a pain if you've never done it before. It's the way that the official binaries are built.

On the plus side, it's very well documented here.

If you're starting with an existing Ubuntu system, you can skip down to "Setting up Debian for gitian building". This particular section needs a few changes for Ubuntu (it was originally written for Debian 7.4). Specifically, the apt-get line should read:
Code:
sudo apt-get install apt-cacher-ng git python-vm-builder ruby1.9.1 lxc
Don't run the "adduser debian sudo" line. The "set up LXC and the rest with the following, which is a complex jumble of settings and workarounds" section is partly unnecessary, and it should instead look like this for Ubuntu:
Code:
# the version of lxc-start in Ubuntu needs to run as root, so make sure
# that the build script can execute it without providing a password
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-execute" | sudo tee /etc/sudoers.d/gitian-lxc >/dev/null
sudo chmod 440 /etc/sudoers.d/gitian-lxc
# make sure that USE_LXC is always set when logging in,
# and configure LXC IP addresses
echo 'export USE_LXC=1' >> ~/.profile
echo 'export LXC_GUEST_IP=10.0.3.5' >> ~/.profile
echo 'export GITIAN_HOST_IP=10.0.3.1' >> ~/.profile
echo 'export LXC_BRIDGE=lxcbr0' >> ~/.profile
The section which talks about manually installing python-vm-builder can be ignored.

The rest of this document should work on Ubuntu.

One important note: if you're running this on a fully updated Ubuntu 14.04 system, it won't work due to a bug (see here). I think it should work on most previous releases of Ubuntu, or on an unupdated version of 14.04 (but not 14.04.1), but I'm not certain of this....

(edited several times...)
member
Activity: 84
Merit: 10
Theymos, unban my account.
I'd like to build the Bitcoin deamon for Linux, Windows, and OSX all at the same time, or at least all from Ubuntu Linux in some way. I'm a web developer, not a software developer, so if this isn't possible, please let me know.
Jump to: