Merge pull request #2686 from patricklodder/1.14.5-update-osx-guide

docs: update macos build guide
This commit is contained in:
chromatic 2024-02-18 13:37:49 -08:00 committed by GitHub
commit e0278f6878
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 66 additions and 200 deletions

View File

@ -55,7 +55,7 @@ these dependencies.
- [Unix Build Notes](doc/build-unix.md)
- [Windows Build Notes](doc/build-windows.md)
- [macOS Build Notes](doc/Building-Dogecoin-1.14-for-Mac.md)
- [macOS Build Notes](doc/build-macos.md)
### Testing

View File

@ -1,99 +0,0 @@
### Building dogecoin-qt 1.14 on modern macs. ###
Note that this requires changes made by michilumin on the 1.14-dev branch as well as some changes to BDB.
Tested on OSX 10.11 El Capitan, 10.13 High Sierra and 11.1 Big Sur.
**Paper wallet printing support seems to work fine through this method as well.**
### Clone dogecoin locally, or check it out, etc. ###
For this purpose, just indicating the 1.14-branding branch in my repo.
$git clone -b 1.14-branding --single-branch https://github.com/michilumin/dogecoin.git
### Set up OSX basic build dependencies. ##
Install xcode-select commandline utils.
$xcode-select --install
**note:** If you have Xcode installed, simply zip it up and move it for this process, as your current Xcode install will likely conflict. Unzip it back later.
Make sure frameworks dir is properly owned...
$sudo mkdir /usr/local/Frameworks
$sudo chown $(whoami):admin /usr/local/Frameworks
Install Brew. (If you already have Brew installed, perform a 'brew update'.)
$/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install dependencies via Brew.
$brew install autoconf automake libtool miniupnpc openssl pkg-config protobuf qt5 zeromq qrencode librsvg boost
Install Boost lib via Brew from source, and link it to be sure:
**note** Boost version may have changed by the time you're reading this, from 167.
$brew install boost --build-from-source --HEAD
$brew link boost167
### Get, Patch And Compile BDB 5.3 ###
Download bdb 5.3.28 source from Oracle.
$curl -o db-5.3.28.tar.gz http://download.oracle.com/berkeley-db/db-5.3.28.tar.gz
$tar xvfz db-5.3.28.tar.gz
$cd db-5.3.28
Build BDB 5.3.28
$cd ../..
$cd build_unix
$../dist/configure CXX=clang++ --enable-cxx
$make
$sudo mkdir /usr/local/BerkeleyDB.5.3
$sudo chown $(whoami):admin /usr/local/BerkeleyDB.5.3
$sudo make install
### Set some environment variables and links for bdb and openssl ###
$export LDFLAGS=-L/usr/local/BerkeleyDB.5.3/lib
$export CPPFLAGS=-I/usr/local/BerkeleyDB.5.3/include
_**NOTE:** for MacOS BigSur (11.1) or later, and possibly Catalina (10.15) you will also have to include the "OBJC_OLD_DISPATCH_PROTOTYPES=1" flag._
_So in this case you want the above export to be:_
$export CPPFLAGS="-I/usr/local/BerkeleyDB.5.3/include -DOBJC_OLD_DISPATCH_PROTOTYPES=1"
_(Note that the quotes are required.)_
$export INCPATHS=-I/usr/local/opt/openssl/include
$export LIBPATHS=-L/usr/local/opt/openssl/lib
$cd /usr/local/include
$ln -s ../opt/openssl/include/openssl
### Go back to your Dogecoin repo ###
$cd ~/dogecoin
$./autogen.sh
$./configure --with-gui=qt5 --with-qrcode=yes
$make
Go have a beverage.
$make install
Go have another beverage.
Run it.
$/usr/local/bin/dogecoin-qt

65
doc/build-macos.md Normal file
View File

@ -0,0 +1,65 @@
# Building dogecoin-qt 1.14 on MacOS #
Tested on MacOs Ventura and Sonoma on Intel (x86_64) and Apple Silicon (arm64) macs.
### Clone dogecoin locally, or check it out, etc. ###
```sh
git clone https://github.com/dogecoin/dogecoin.git
```
### Set up OSX basic build dependencies. ##
Install xcode-select commandline utils.
```sh
xcode-select --install
```
Make sure frameworks dir is properly owned...
```sh
sudo mkdir -p /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks
```
Install Brew. (If you already have Brew installed, perform a `brew update`.)
```sh
git clone https://github.com/Homebrew/brew homebrew
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
chmod -R go-w "$(brew --prefix)/share/zsh"
```
Install dependencies via Brew.
```sh
brew install autoconf automake libtool miniupnpc openssl pkg-config protobuf@21 \
qt5 zeromq qrencode librsvg boost berkeley-db@5 libevent
brew link protobuf@21
```
### Go back to your Dogecoin repo ###
```sh
cd ~/dogecoin
./autogen.sh
./configure --with-gui=qt5 --with-boost=`brew --prefix boost`
make
```
Go have a beverage.
```sh
make install
```
Go have another beverage.
Run it.
```sh
/usr/local/bin/dogecoin-qt
```

View File

@ -1,100 +0,0 @@
Mac OS X Build Instructions and Notes
====================================
The commands in this guide should be executed in a Terminal application.
The built-in one is located in `/Applications/Utilities/Terminal.app`.
Preparation
-----------
Install the OS X command line tools:
`xcode-select --install`
When the popup appears, click `Install`.
Then install [Homebrew](https://brew.sh).
Dependencies
----------------------
brew install automake libtool boost miniupnpc openssl pkg-config protobuf qt5 libevent
brew install berkeley-db # You need to make sure you install a version >= 5.3.28, but as close to 5.3.28 as possible. Check the homebrew docs to find out how to install older versions.
If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
brew install librsvg
NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended.
Build Dogecoin Core
------------------------
1. Clone the dogecoin source code and cd into `dogecoin`
git clone https://github.com/dogecoin/dogecoin
cd dogecoin
2. Build dogecoin:
Configure and build the headless dogecoin binaries as well as the GUI (if Qt is found).
You can disable the GUI build by passing `--without-gui` to configure.
./autogen.sh
./configure
make
3. It is recommended to build and run the unit tests:
make check
4. You can also create a .dmg that contains the .app bundle (optional):
make deploy
Running
-------
Dogecoin Core is now available at `./src/dogecoind`
Before running, it's recommended you create an RPC configuration file.
echo -e "rpcuser=dogecoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Dogecoin/dogecoin.conf"
chmod 600 "/Users/${USER}/Library/Application Support/Dogecoin/dogecoin.conf"
The first time you run dogecoind, it will start downloading the blockchain. This process could take several hours.
You can monitor the download process by looking at the debug.log file:
tail -f $HOME/Library/Application\ Support/Dogecoin/debug.log
Other commands:
-------
./src/dogecoind -daemon # Starts the dogecoin daemon.
./src/dogecoin-cli --help # Outputs a list of command-line options.
./src/dogecoin-cli help # Outputs a list of RPC commands when the daemon is running.
Using Qt Creator as IDE
------------------------
You can use Qt Creator as an IDE, for dogecoin development.
Download and install the community edition of [Qt Creator](https://www.qt.io/download/).
Uncheck everything except Qt Creator during the installation process.
1. Make sure you installed everything through Homebrew mentioned above
2. Do a proper ./configure --enable-debug
3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
4. Enter "dogecoin-qt" as project name, enter src/qt as location
5. Leave the file selection as it is
6. Confirm the "summary page"
7. In the "Projects" tab select "Manage Kits..."
8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
9. Select LLDB as debugger (you might need to set the path to your installation)
10. Start debugging with Qt Creator
Notes
-----
* Tested on OS X 10.8 through 10.12 on 64-bit Intel processors only.
* Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/dogecoin/dogecoin/issues/7714)