The correct way, install homebrew on apple m1.
# We'll be installing Homebrew in the /opt directory.
cd /opt
# Create a directory for Homebrew. This requires root permissions.
sudo mkdir homebrew
# Make us the owner of the directory so that we no longer require root permissions.
sudo chown -R $(whoami) /opt/homebrew
# Download and unzip Homebrew. This command can be found at https://docs.brew.sh/Installation.
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
# Add the Homebrew bin directory to the PATH. If you don't use zsh, you'll need to do this yourself.
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
pip3 install ds_store mac_alias
Download the Bitcoin code
# Download bitcoin/bitcoin on Github.
git clone https://github.com/bitcoin/bitcoin
# Switch to the bitcoin folder
cd bitcoin/
Compilation tool for apple m1
cd depends/
make
# After completing this step, you will see one more folder (arm-apple-darwin20.2.0) in /bitcoin/depends.
# Go back to bitcoin folder
cd ..
./autogen.sh
# Set up the compilation tool
./configure --prefix=$PWD/depends/arm-apple-darwin20.2.0
# https://github.com/bitcoin/bitcoin/tree/master/depends
# Start to compile bitcoin
make HOST=arm-apple-darwin20
make check
make deploy
I didn't find it that easy
One thing I had to add to the above, was, after
cd depends/
, you need tomake
with an argument to make it create thearm-apple-darwin20...
folder - the mainmake
command still failed:I needed all those configure flags to enable
configure
to run without error.But
make
producedNo matter how many ways I tried to make 'boost' in ARM-64 code