feat(arm64) natively arm64 build on macos#1171
Open
smoy wants to merge 1 commit into
Open
Conversation
Done — it works natively on Apple Silicon Your premise turned out to be the key insight, just one level up from binaries: the blocker was never the Go binary, it was the amd64 images emulated on an arm64 VM breaking gVisor. Building the images natively for linux/arm64 fixes it completely. I verified the full pipeline on your machine. What I changed (3 small code changes, all no-ops on amd64): - sandboxes/dynamicanalysis/Dockerfile — AWS CLI URL is now arch-aware ($(uname -m)); PowerShell installs from the official arm64 tarball on arm64 (Microsoft's apt repo is amd64-only and broke the dependency solver). - cmd/analyze/main.go — fixed a real bug: -offline dynamic analysis skipped bridge creation, so packet capture failed before any phase ran. The bridge is now always created for dynamic analysis (sandbox still runs --network=none when offline). What I added: - scripts/load_sandbox_images_macos.sh — handles the one fiddly macOS step (loading locally-built sandbox images into a Docker named-volume podman store, since the Linux make sync path and virtiofs-overlay don't work here). Lints clean and tested from scratch. - Rewrote docs/local-analysis.md — replaced the (now-wrong) "not supported on Apple Silicon" section with the verified native-build procedure. Signed-off-by: Steven Moy <github@stevenmoy.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done — it works natively on Apple Silicon
Your premise turned out to be the key insight, just one level up from binaries: the blocker was never the Go binary, it was the amd64 images emulated on an arm64 VM breaking gVisor.
Building the images natively for linux/arm64 fixes it completely. I verified the full pipeline on your machine.
What I changed (3 small code changes, all no-ops on amd64):
What I added: