Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building leap for OS X #2413

Open
bensig opened this issue Oct 29, 2024 · 0 comments
Open

Building leap for OS X #2413

bensig opened this issue Oct 29, 2024 · 0 comments
Labels

Comments

@bensig
Copy link

bensig commented Oct 29, 2024

Here is a little script that might help anyone trying to build cleos, keosd, and nodeos for OS X on an M* chip.

Requires pyenv and brew

Once you have brew - you can use that to install pyenv

#!/bin/bash

# Script to build and install cleos and keosd from the Antelope Leap repository on macOS

# Function to print messages
echo_message() {
    echo -e "\n==== $1 ====\n"
}

# Step 1: Install prerequisites using Homebrew
echo_message "Installing prerequisites..."
brew install cmake gcc@10 wget gmp automake libtool boost doxygen pyenv

# Ensure Python 3 is set up via pyenv, then install numpy
echo_message "Setting up Python environment..."
pyenv shell 3
pip install numpy

# Step 2: Clone the Leap repository
echo_message "Cloning Antelope Leap repository..."
git clone https://github.com/antelopeio/leap.git
cd leap || exit 1

# Fetch tags and check out the latest release tag
echo_message "Checking out the latest Leap release tag..."
git fetch --all --tags
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout "$LATEST_TAG"
git pull
git submodule update --init --recursive

# Step 3: Build the project
echo_message "Building the project..."
mkdir build
cd build || exit 1
cmake ..

# Compile using the number of physical cores available
make -j"$(sysctl -n hw.physicalcpu)"

# Step 4: Install cleos and keosd
echo_message "Installing cleos and keosd..."
sudo make install

# Confirmation message
echo_message "Installation complete! cleos and keosd have been installed."
echo "Installed version:"
cleos --version
keosd --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants