Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Installing from source on an M1 Mac #20783

Closed
milancermak opened this issue Oct 19, 2021 · 3 comments · Fixed by #21008
Closed

Installing from source on an M1 Mac #20783

milancermak opened this issue Oct 19, 2021 · 3 comments · Fixed by #21008

Comments

@milancermak
Copy link

TL;DR:
All I had to do to build from source on an M1 Mac is adding this line to [dependencies] in programs/bpf_loader/Cargo.toml:

openssl = { version = "0.10", features = ["vendored"] }

Problem

There's a problem when developing for Solana on an M1 Mac as is evident by various issues on here (e.g. #19743 or #17406) or by others on Stack Overflow. There's not really a good solution, the commonly accepted one seems to be to use Rosetta and reinstall the whole toolchain. I didn't want to go down that route so I tried cloning the repo and compiling from scratch.

Proposed Solution

I already had brew install openssl and brew install coreutils (due to the greadlink dependency in cargo_install_all.sh). The only thing I needed to change was adding openssl as a dependency to Cargo.toml in bpf_loader as mentioned above.

I'm new to Solana and I don't know enough to send a PR, but I was hoping you could incorporate this to offer native M1 builds for the community.

@0xMuse
Copy link

0xMuse commented Oct 24, 2021

This works 👍 Could you open a PR so the Solana folks can give a review and hopefully merge this change into the next release?

@Wildebeest
Copy link
Contributor

It turns out that the openssl crate people fixed the homebrew integration back in February. Sent you a PR that just bumps the version and seems to work.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants