If, like me, you’re debugging a frontend issue and you think “I can just create some artifact builds on this device” — you might run in to a few issues. In the main, they’re caused by various bits of the build system attempting to use 64-bit x86 binaries. arm64 can run 32-bit x86 code under emulation, but not 64-bit. Here are the issues I encountered, chronologically.
- The latest mozilla-build doesn’t work, because it only supplies 64-bit tools. Using an older version (2.2) does work.
- Note: Obviously this comes with older software. You should update pip and mercurial (using pip). I’d recommend not using the old software to connect to anything you don’t trust, no warranty, etc. etc.
- You can now
hg clone mozilla-central. It’ll take a while. You can also use pip to install/run other useful things, like mozregression (which seems to work but chokes when trying to kill off and delete Firefox processes when done; unsure why).
./mach bootstrapmostly works if you pick artifact builds, but:
- It tries to install 64-bit x86 rustup, which doesn’t work (this bug should be fixed soon). Commenting out this line makes things work.
- It installs a 64-bit version of NodeJS, which also won’t work. You’ll want to remove
~/.mozbuild/node, download the 32-bit windows .zip from the NodeJS website and extract the contents at
~/.mozbuild/nodeto placate it.
- If you now try to build, configure will choke on the lack of python3. This isn’t part of the old mozillabuild package, and so you want to download the latest python3 version as an “embeddable zip file” version off the python website , and extract it to
path/to/mozilla-build/python3. Then you will also want to make a copy of
python.exein that directory available as
python3.exe, because that’s the path mozilla-build expects.
- Next, configure will choke on the 64-bit version of
watchman.exethat mozilla-build has helpfully provided. Rename the watchman directory inside mozilla-build (or delete it if you’re feeling vengeful) to deal with this.
That’s it! Now artifact builds should work – or at least, they did for me. Some of the issues are caused by bootstrap, and thus fixable, but obviously we can’t retrospectively change an old copy of mozilla-build. I’ve filed a bug to provide mozilla-build for aarch64.