stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 671 forks source link

Add Dockerfile for building binaries on macos-arm64 #2458

Closed hstove closed 3 years ago

hstove commented 3 years ago

In our CI, we have actions that run through the Dockerfiles in build-scripts and build binaries for each platform. These are really helpful, especially with the integration into clarity-js-sdk.

However, we do not have a Dockerfile.macos-arm64 build script. When users install clarity-js-sdk on Apple Silicon, they need to pass ENV vars to build from source. The DX could be much improved by building binaries automatically.

I did spend some time trying to fiddle with a new Dockerfile.macos-arm64 build script, but it was a bit out of my depth, especially the osxcross stuff. I'm happy to come back to it and try again - it's a good learning process. Building the optimized binaries without Docker are straightforward, fortunately.

If it turns out that osxcross is not quite ready for this build target, then another option is to essentially clone the Dockerfile.macos-x64 file and rename it to macos-arm64. This will not be optimized, but the binaries run fine on Apple Silicon, and it would greatly improve the DX for folks who like to download pre-built binaries.

zone117x commented 3 years ago

@hstove do you have an M1 or know someone who does who can test this build output? https://github.com/blockstack/stacks-blockchain/pull/2456

kantai commented 3 years ago

Closing this in favor of #2419

blockstack-devops commented 6 hours ago

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