Skip to content

Instantly share code, notes, and snippets.

@chrisguida
Last active July 23, 2024 18:43
Show Gist options
  • Save chrisguida/a2adf91dca5787c295f7d59d7d20958c to your computer and use it in GitHub Desktop.
Save chrisguida/a2adf91dca5787c295f7d59d7d20958c to your computer and use it in GitHub Desktop.
Notes for installing Core Lightning on MacOS M1

Notes for installing Core Lightning on MacOS M1 (tested on M1 Max)

Keep in mind that the instructions are designed for Intel, so /usr/local needs to be replaced by /opt/homebrew in most places.

Make sure native rust toolchain is installed for rust stuff

install nightly-aarch64-apple-darwin toolchain to get rid of errors about wrong arch lib linked

rustup install nightly-aarch64-apple-darwin

Then to make this toolchain your default:

rustup default nightly-aarch64-apple-darwin

Update LDFLAGS and CPPFLAGS:

export LDFLAGS="-L/opt/homebrew/opt/sqlite/lib"
export CPPFLAGS="-I/opt/homebrew/opt/sqlite/include"

Configure and make:

./configure && make -j$(( $(nproc) - 1))

Nondeterministic issues with cpu usage on first launch

If lightningd hogs all your CPU when you start it up, kill it, delete its pid file, and try again. I haven't discovered why this happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment