|
|
@ -5,8 +5,9 @@ This guide will show you how to build bitcoind(headless client) for OSX.
|
|
|
|
Notes
|
|
|
|
Notes
|
|
|
|
-----
|
|
|
|
-----
|
|
|
|
|
|
|
|
|
|
|
|
* Tested on OS X 10.5 through 10.9 on Intel processors only. PPC is not
|
|
|
|
* Tested on OS X 10.6 through 10.9 on 64-bit Intel processors only.
|
|
|
|
supported because it is big-endian.
|
|
|
|
Older OSX releases or 32-bit processors are no longer supported.
|
|
|
|
|
|
|
|
|
|
|
|
* All of the commands should be executed in a Terminal application. The
|
|
|
|
* All of the commands should be executed in a Terminal application. The
|
|
|
|
built-in one is located in `/Applications/Utilities`.
|
|
|
|
built-in one is located in `/Applications/Utilities`.
|
|
|
|
|
|
|
|
|
|
|
@ -47,6 +48,10 @@ Installing the dependencies using MacPorts is very straightforward.
|
|
|
|
|
|
|
|
|
|
|
|
sudo port install boost db48@+no_java openssl miniupnpc autoconf pkgconfig automake
|
|
|
|
sudo port install boost db48@+no_java openssl miniupnpc autoconf pkgconfig automake
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Optional: install Qt4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sudo port install qt4-mac qrencode protobuf-cpp
|
|
|
|
|
|
|
|
|
|
|
|
### Building `bitcoind`
|
|
|
|
### Building `bitcoind`
|
|
|
|
|
|
|
|
|
|
|
|
1. Clone the github tree to get the source code and go into the directory.
|
|
|
|
1. Clone the github tree to get the source code and go into the directory.
|
|
|
@ -54,7 +59,7 @@ Installing the dependencies using MacPorts is very straightforward.
|
|
|
|
git clone git@github.com:bitcoin/bitcoin.git bitcoin
|
|
|
|
git clone git@github.com:bitcoin/bitcoin.git bitcoin
|
|
|
|
cd bitcoin
|
|
|
|
cd bitcoin
|
|
|
|
|
|
|
|
|
|
|
|
2. Build bitcoind:
|
|
|
|
2. Build bitcoind (and Bitcoin-Qt, if configured):
|
|
|
|
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
./autogen.sh
|
|
|
|
./configure
|
|
|
|
./configure
|
|
|
@ -102,35 +107,33 @@ Rerunning "openssl version" should now return the correct version.
|
|
|
|
|
|
|
|
|
|
|
|
Creating a release build
|
|
|
|
Creating a release build
|
|
|
|
------------------------
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
You can ignore this section if you are building `bitcoind` for your own use.
|
|
|
|
|
|
|
|
|
|
|
|
A bitcoind binary is not included in the Bitcoin-Qt.app bundle. You can ignore
|
|
|
|
bitcoind/bitcoin-cli binaries are not included in the Bitcoin-Qt.app bundle.
|
|
|
|
this section if you are building `bitcoind` for your own use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If you are building `bitcoind` for others, your build machine should be set up
|
|
|
|
If you are building `bitcoind` or `Bitcoin-Qt` for others, your build machine should be set up
|
|
|
|
as follows for maximum compatibility:
|
|
|
|
as follows for maximum compatibility:
|
|
|
|
|
|
|
|
|
|
|
|
All dependencies should be compiled with these flags:
|
|
|
|
All dependencies should be compiled with these flags:
|
|
|
|
|
|
|
|
|
|
|
|
-mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
|
|
|
|
-mmacosx-version-min=10.6
|
|
|
|
|
|
|
|
-arch x86_64
|
|
|
|
|
|
|
|
-isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
|
|
|
|
|
|
|
|
|
|
|
|
For MacPorts, that means editing your macports.conf and setting
|
|
|
|
For MacPorts, that means editing your macports.conf and setting
|
|
|
|
`macosx_deployment_target` and `build_arch`:
|
|
|
|
`macosx_deployment_target` and `build_arch`:
|
|
|
|
|
|
|
|
|
|
|
|
macosx_deployment_target=10.5
|
|
|
|
macosx_deployment_target=10.6
|
|
|
|
build_arch=i386
|
|
|
|
build_arch=x86_64
|
|
|
|
|
|
|
|
|
|
|
|
... and then uninstalling and re-installing, or simply rebuilding, all ports.
|
|
|
|
... and then uninstalling and re-installing, or simply rebuilding, all ports.
|
|
|
|
|
|
|
|
|
|
|
|
As of December 2012, the `boost` port does not obey `macosx_deployment_target`.
|
|
|
|
As of December 2012, the `boost` port does not obey `macosx_deployment_target`.
|
|
|
|
Download `http://gavinandresen-bitcoin.s3.amazonaws.com/boost_macports_fix.zip`
|
|
|
|
Download `http://gavinandresen-bitcoin.s3.amazonaws.com/boost_macports_fix.zip`
|
|
|
|
for a fix. Some ports also seem to obey either `build_arch` or
|
|
|
|
for a fix.
|
|
|
|
`macosx_deployment_target`, but not both at the same time. For example, building
|
|
|
|
|
|
|
|
on an OS X 10.6 64-bit machine fails. Official release builds of Bitcoin-Qt are
|
|
|
|
|
|
|
|
compiled on an OS X 10.6 32-bit machine to workaround that problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Once dependencies are compiled, creating `Bitcoin-Qt.app` is easy:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
make -f Makefile.osx RELEASE=1
|
|
|
|
Once dependencies are compiled, see release-process.md for how the Bitcoin-Qt.app
|
|
|
|
|
|
|
|
bundle is packaged and signed to create the .dmg disk image that is distributed.
|
|
|
|
|
|
|
|
|
|
|
|
Running
|
|
|
|
Running
|
|
|
|
-------
|
|
|
|
-------
|
|
|
@ -145,10 +148,13 @@ commands:
|
|
|
|
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
|
|
|
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
|
|
|
|
|
|
|
|
|
|
|
When next you run it, it will start downloading the blockchain, but it won't
|
|
|
|
When next you run it, it will start downloading the blockchain, but it won't
|
|
|
|
output anything while it's doing this. This process may take several hours.
|
|
|
|
output anything while it's doing this. This process may take several hours;
|
|
|
|
|
|
|
|
you can monitor its process by looking at the debug.log file, like this:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log
|
|
|
|
|
|
|
|
|
|
|
|
Other commands:
|
|
|
|
Other commands:
|
|
|
|
|
|
|
|
|
|
|
|
./bitcoind --help # for a list of command-line options.
|
|
|
|
|
|
|
|
./bitcoind -daemon # to start the bitcoin daemon.
|
|
|
|
./bitcoind -daemon # to start the bitcoin daemon.
|
|
|
|
./bitcoind help # When the daemon is running, to get a list of RPC commands
|
|
|
|
./bitcoin-cli --help # for a list of command-line options.
|
|
|
|
|
|
|
|
./bitcoin-cli help # When the daemon is running, to get a list of RPC commands
|
|
|
|