-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Create an ARM build to support running Cockroach on an m1-powered Mac #68648
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
Comments
Let's keep these as separate. While on the surface they are both ARM64 architectures and much of the work we do for to improve support for one will directly help the other, they are for different OSes and are different custom chips so there are likely to be specific needs for each one. If we end up finding there is minimal difference, we can close one as duplicate then. |
I have built an arm image locally and pushed it here: https://quay.io/repository/ecordell/crdb It's very painful to build locally, however: because the builder image is amd64-only, it runs in qemu on an m1 mac, which is very prone to segfaulting during the build. Since the builder image already supports outputting arm images, it would be great if there were an official release. |
@jhatcher9999 Sorry, just clarifying: what is the actual feature request here? Is this asking for an official release for ARM Macs? If you just want a native Cockroach executable that will run on your own machine, you can build it yourself. The Bazel build works and supports M1 Macs. If the request is for an official release, that's going to be a big investment. It'll probably happen at some point but I'm not sure it's planned for the next release. |
Hey Ricky -- I work for Cockroach, and I'm just passing this on as feedback from various customers. I have some customers who are wanting to run CRDB (for development purposes) on their local m1-based MAC laptops so they want a build that is performant. I also have some customers who are wanting to use CRDB in their CI/CD pipelines and they have had issues running those in docker-based containers. And, a third case is folks that want to run their actual production CRDB clusters on EC2 instances and AWS is starting to push ARM-based servers. So, I guess the feature request is to have a CRL-supported build that works well across those 3 scenarios. |
OK. The third case is a dup of #32689 (macOS vs. Linux, and indeed the bugs should be kept separate per James' comment). As for the first case, you can work around by building your own The second case isn't addressed until we have a cross-build (official release) for M1 Macs, which I think is what this bug will track. |
Ricky, do we have instructions for doing your own Cockroach build that I could follow and/or share? |
General instructions: https://wiki.crdb.io/wiki/spaces/CRDB/pages/73204103/Building+from+source+on+macOS Bazel-specific instructions: https://wiki.crdb.io/wiki/spaces/CRDB/pages/2221703221/Developing+with+Bazel I recommend building w/ Bazel if you're building from |
Here. I made a version of v21.2.2 for ARM64 @rickystewart @jhatcher9999 It should run on an M1 Mac. I also made an all-in-one Dockerfile with all the superdeps, takes several hours to run on a Rock64 but it will yield the same bits: https://github.com/christoofar/cockroachdb-arm64 You can install DockerCE and fire it up in Docker Swarm or k8s and should work fine or just grab the ARM64 image from Docker Hub. |
I have a multiarch cockroachdb docker image based on @christoofar work https://hub.docker.com/r/juliuszaromskis/cockroachdb |
A customer reports in a Zendesk ticket (I can share details):
|
Any progress with this? |
Rosetta often crashes unexpectedly while emulating the |
Correction, beta 5 it is. |
I see that beta 5 just got tagged. How would I ago about installed beta 5 for testing the MacOS ARM version? |
The URLs will be published shortly on the website 🕺 |
I see that the binary got added to https://www.cockroachlabs.com/docs/releases/index.html?filters=mac. But there is only a column for intel binaries? Does that binary install the correct version, or is there a different URL for ARM version? |
Waiting for cockroachdb/docs#15281 to merge :) |
Link to download Apple M1/M2 build: https://www.cockroachlabs.com/docs/releases/index.html?filters=mac |
The homebrew recipe still needs to be adapted: https://github.com/cockroachdb/homebrew-tap/blob/master/Formula/cockroach.rb |
Hi @AndiDog, our homebrew tap always points to the latest stable version, which is still a v22.1.X release. Once we release v22.2.0, it will include the ARM64 version. Here is the PR if you'd like to follow along: cockroachdb/homebrew-tap#117. |
Uh oh!
There was an error while loading. Please reload this page.
Running the cockroach executable from a Mac with an m1 chip runs very poorly.
I'd like to see an ARM build that would support better performance on M1 chips.
Epic DEVINF-247
Jira issue: CRDB-9140
The text was updated successfully, but these errors were encountered: