Bitcoin Forum
May 23, 2024, 06:22:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do you build the Bitcoin deamon for all targets at once?  (Read 1469 times)
CozyLife (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10

Theymos, unban my account.


View Profile WWW
September 03, 2014, 11:40:09 PM
 #1

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.

Due to an article that BitcoinTalk didn't like that I wrote on CCN, my account is banned. Theymos refuses to reply to my request for hearing his side of the story instead of banning my account. Please sign my petition to get Theymos to unban my account. Thank you.
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
September 04, 2014, 01:24:52 AM
Last edit: September 06, 2014, 11:35:38 AM by btchris
 #2

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...)
CozyLife (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10

Theymos, unban my account.


View Profile WWW
September 04, 2014, 02:39:38 AM
 #3

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.

Due to an article that BitcoinTalk didn't like that I wrote on CCN, my account is banned. Theymos refuses to reply to my request for hearing his side of the story instead of banning my account. Please sign my petition to get Theymos to unban my account. Thank you.
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
September 06, 2014, 11:41:42 AM
 #4

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).
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!