Skip to content

fix: support building Android APK on Apple Silicon Macs#457

Merged
m1sterc001guy merged 1 commit into
fedimint:masterfrom
FrankChinedu:fix/docker-apple-silicon
May 21, 2026
Merged

fix: support building Android APK on Apple Silicon Macs#457
m1sterc001guy merged 1 commit into
fedimint:masterfrom
FrankChinedu:fix/docker-apple-silicon

Conversation

@FrankChinedu

Copy link
Copy Markdown
Contributor

Docker builds on Apple Silicon (arm64) failed due to three issues:

  1. appimagetool-x86_64.AppImage cannot execute under Rosetta inside Docker containers (Exec format error). Added SKIP_APPIMAGETOOL build arg so Apple Silicon hosts skip this step; CI (amd64) is unaffected.

  2. Android NDK toolchain is linux-x86_64 and must run under linux/amd64. Added --platform linux/amd64 to docker build and docker run so Docker uses Rosetta to translate x86_64 binaries on Apple Silicon hosts.

  3. libc6-dev-i386 is x86-only — resolved by the platform fix above.

Also fixed two pre-existing script bugs:

  • Stale .dart_tool.host directory caused mv to fail on retry builds
  • Flutter build/ artifacts from host embed /Users/... paths that are incompatible with Docker's /workspace mount; now cleaned before build

Docker builds on Apple Silicon (arm64) failed due to three issues:

1. appimagetool-x86_64.AppImage cannot execute under Rosetta inside
   Docker containers (Exec format error). Added SKIP_APPIMAGETOOL build
   arg so Apple Silicon hosts skip this step; CI (amd64) is unaffected.

2. Android NDK toolchain is linux-x86_64 and must run under linux/amd64.
   Added --platform linux/amd64 to docker build and docker run so Docker
   uses Rosetta to translate x86_64 binaries on Apple Silicon hosts.

3. libc6-dev-i386 is x86-only — resolved by the platform fix above.

Also fixed two pre-existing script bugs:
- Stale .dart_tool.host directory caused mv to fail on retry builds
- Flutter build/ artifacts from host embed /Users/... paths that are
  incompatible with Docker's /workspace mount; now cleaned before build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@FrankChinedu FrankChinedu force-pushed the fix/docker-apple-silicon branch from 70e1a97 to daf2db3 Compare May 20, 2026 16:16

@m1sterc001guy m1sterc001guy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! We don't have a ton of contributors building on macs so understandable if we missed something there. I re-tested on my machine (linux) and nothing is broken, so let's merge.

@m1sterc001guy m1sterc001guy merged commit e5a168c into fedimint:master May 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants