1 Mac OS X Build Instructions and Notes
2 ====================================
3 The commands in this guide should be executed in a Terminal application.
4 The built-in one is located in `/Applications/Utilities/Terminal.app`.
8 Install the OS X command line tools:
10 `xcode-select --install`
12 When the popup appears, click `Install`.
14 Then install [Homebrew](http://brew.sh).
17 ----------------------
19 brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config homebrew/versions/protobuf260 --c++11 qt5 libevent
21 NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended.
24 ------------------------
26 1. Clone the bitcoin source code and cd into `bitcoin`
28 git clone https://github.com/bitcoin/bitcoin
31 2. Build bitcoin-core:
33 Configure and build the headless bitcoin binaries as well as the GUI (if Qt is found).
35 You can disable the GUI build by passing `--without-gui` to configure.
41 3. It is recommended to build and run the unit tests:
45 4. You can also create a .dmg that contains the .app bundle (optional):
52 Bitcoin Core is now available at `./src/bitcoind`
54 Before running, it's recommended you create an RPC configuration file.
56 echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
58 chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
60 The first time you run bitcoind, it will start downloading the blockchain. This process could take several hours.
62 You can monitor the download process by looking at the debug.log file:
64 tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log
69 ./src/bitcoind -daemon # Starts the bitcoin daemon.
70 ./src/bitcoin-cli --help # Outputs a list of command-line options.
71 ./src/bitcoin-cli help # Outputs a list of RPC commands when the daemon is running.
73 Using Qt Creator as IDE
74 ------------------------
75 You can use Qt Creator as an IDE, for bitcoin development.
76 Download and install the community edition of [Qt Creator](https://www.qt.io/download/).
77 Uncheck everything except Qt Creator during the installation process.
79 1. Make sure you installed everything through Homebrew mentioned above
80 2. Do a proper ./configure --enable-debug
81 3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
82 4. Enter "bitcoin-qt" as project name, enter src/qt as location
83 5. Leave the file selection as it is
84 6. Confirm the "summary page"
85 7. In the "Projects" tab select "Manage Kits..."
86 8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
87 9. Select LLDB as debugger (you might need to set the path to your installation)
88 10. Start debugging with Qt Creator
93 * Tested on OS X 10.8 through 10.12 on 64-bit Intel processors only.
95 * Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714)