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 protobuf --c++11 qt5 libevent
21 In case you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
25 NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended.
28 ------------------------
30 1. Clone the bitcoin source code and cd into `bitcoin`
32 git clone https://github.com/bitcoin/bitcoin
35 2. Build bitcoin-core:
37 Configure and build the headless bitcoin binaries as well as the GUI (if Qt is found).
39 You can disable the GUI build by passing `--without-gui` to configure.
45 3. It is recommended to build and run the unit tests:
49 4. You can also create a .dmg that contains the .app bundle (optional):
56 Bitcoin Core is now available at `./src/bitcoind`
58 Before running, it's recommended you create an RPC configuration file.
60 echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
62 chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
64 The first time you run bitcoind, it will start downloading the blockchain. This process could take several hours.
66 You can monitor the download process by looking at the debug.log file:
68 tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log
73 ./src/bitcoind -daemon # Starts the bitcoin daemon.
74 ./src/bitcoin-cli --help # Outputs a list of command-line options.
75 ./src/bitcoin-cli help # Outputs a list of RPC commands when the daemon is running.
77 Using Qt Creator as IDE
78 ------------------------
79 You can use Qt Creator as an IDE, for bitcoin development.
80 Download and install the community edition of [Qt Creator](https://www.qt.io/download/).
81 Uncheck everything except Qt Creator during the installation process.
83 1. Make sure you installed everything through Homebrew mentioned above
84 2. Do a proper ./configure --enable-debug
85 3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
86 4. Enter "bitcoin-qt" as project name, enter src/qt as location
87 5. Leave the file selection as it is
88 6. Confirm the "summary page"
89 7. In the "Projects" tab select "Manage Kits..."
90 8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
91 9. Select LLDB as debugger (you might need to set the path to your installation)
92 10. Start debugging with Qt Creator
97 * Tested on OS X 10.8 through 10.12 on 64-bit Intel processors only.
99 * Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714)