Last active
November 14, 2022 06:12
-
-
Save raffecat/5348704fc9b8a7938422ea44386a764d to your computer and use it in GitHub Desktop.
Building Dogecoin Core on M1 mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MacBook Air M1 2020, macOS 12.5.1 Monterey, XCode 14.1 | |
# https://github.com/dogecoin/dogecoin/blob/master/doc/Building-Dogecoin-1.14-for-Mac.md | |
# https://github.com/dogecoin/dogecoin/blob/master/doc/build-osx.md | |
git clone [email protected]:dogecoin/dogecoin.git | |
cd dogecoin | |
git checkout tags/v1.14.6 | |
brew install boost --build-from-source --HEAD # per Building-Dogecoin-1.14-for-Mac.md | |
brew install autoconf automake libtool miniupnpc pkg-config protobuf qt5 zeromq qrencode librsvg libevent [email protected] | |
brew install berkeley-db@5 # You need to make sure you install a version >= 5.3.28, but as close to 5.3.28 as possible. | |
# more homebrew BS… https://github.com/Homebrew/brew/issues/12879 | |
# `brew --prefix openssl` returns the path to openssl@3 – EVEN IF it's not installed! | |
# libevent depends on [email protected] and `brew install openssl` installs openssl@3 | |
# however, the Dogecoin Core tests FAIL when compiled with openssl@3 (seems to be OldDecrypt) | |
# so now I have to symlink openssl@3 to [email protected] (because the configure script uses `brew --prefix openssl`) | |
ln -s /opt/homebrew/opt/[email protected] `brew --prefix openssl` | |
# `brew --prefix berkeley-db` returns the wrong path when berkeley-db@5 is installed (as above) | |
ln -s /opt/homebrew/opt/berkeley-db@5 `brew --prefix berkeley-db` | |
# this is what I ended up using… | |
export LDFLAGS="-L/opt/homebrew/opt/boost/lib -L/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/opt/qt@5/lib -L/opt/homebrew/opt/berkeley-db@5/lib" | |
export CPPFLAGS="-I/opt/homebrew/opt/boost/include -I/opt/homebrew/opt/openssl@3/include -I/opt/homebrew/opt/qt@5/include -I/opt/homebrew/opt/berkeley-db@5/include" | |
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig:/opt/homebrew/opt/qt@5/lib/pkgconfig" | |
export BOOST_ROOT="/opt/homebrew/opt/boost" | |
export BOOST_LIBRARYDIR="/opt/homebrew/opt/boost/lib" | |
export BOOST_LDFLAGS="-L/opt/homebrew/opt/boost/lib" | |
export BOOST_CPPFLAGS="-I/opt/homebrew/opt/boost/include" | |
# some compile errors due to different std lib implementations… | |
# src/net.h ~ add: #include <array> | |
# src/cuckoocache.h ~ add: #include <deque> | |
./autogen.sh | |
./configure | |
make | |
make check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also: https://multipass.run/docs/create-an-instance