Build geckodriver for AArch64 on Mac (Apple Silicon)
Categories
(Testing :: geckodriver, task, P2)
Tracking
(firefox88 fixed)
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
With Apple having released Big Sur there is now a need for Aarch64 support for geckodriver. We should ship support for it with the next release.
Given that we do not ship a DMG bundle we will have to release two different versions of geckodriver on Mac. One for Intel and the other for Aarch64.
Assignee | ||
Comment 1•4 years ago
|
||
For the current status of implementation in Rust see:
https://github.com/rust-lang/rust/issues/73908
Right now there is no Tier1 support for MacOS Aarch64, and as such we also don't have toolchain build jobs.
Given that Rosetta will be perfectly emulating a current x86-64 binary of geckodriver on ARM, there shouldn't be an immediate need to get this support added. Lets revisit in a couple of weeks.
Assignee | ||
Comment 2•4 years ago
|
||
As it looks like we will get aarch64 support in Rust 1.49. In bug 1678439 the beta release is used to actually build Firefox for Apple Silicon.
So lets wait for the 1.49 release, and reconsider then.
Assignee | ||
Comment 3•4 years ago
|
||
With bug 1684954 our internal rustc version will be updated to the final 1.49. With that bug fixed we can then check if we want to publish native aarch64 builds.
Assignee | ||
Comment 4•4 years ago
|
||
There are rumors that Apple might remove Rosetta 2 support in some regions earlier. As developers have seen for the 3rd beta for MacOS 11.3 some strings have been added. If that's true or not, we should be prepared for that and actually ship a ARM64 version of geckodriver.
Also all dependencies are fixed, and our build system has support for it.
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
With the attached patch I get a build error because the linker tries to use arm64
instead of aarch64
:
https://treeherder.mozilla.org/logviewer?job_id=332653505&repo=try&lineNumber=588-592
[task 2021-03-10T08:49:54.211Z] error: linking with `cc` failed: exit code: 1
[task 2021-03-10T08:49:54.211Z] |
[task 2021-03-10T08:49:54.211Z] = note: "cc" "-arch" "arm64" [..]
[task 2021-03-10T08:49:54.212Z] = note: cc: error: arm64: No such file or directory
[task 2021-03-10T08:49:54.212Z] cc: error: unrecognized command line option '-arch'; did you mean '-march='?
Glandium, do you have an idea what's wrong here?
Comment 8•4 years ago
|
||
You need to update taskcluster/scripts/misc/build-geckodriver.sh. See what was done for cbindgen in https://phabricator.services.mozilla.com/D104978
Assignee | ||
Comment 9•4 years ago
|
||
Thanks! That looks pretty straight forward.
Assignee | ||
Comment 10•4 years ago
|
||
Joel, is there a way to run wpt (wdspec) tests on a Aarch64 MacOS device yet? We would like to make sure that when shipping the geckodriver binary for M1 is actually working.
Comment 11•4 years ago
|
||
we don't have any machines in production yet- there is a lot of paperwork and right now we are waiting on vpn connection. I didn't plan for wdspec capacity. currently on osx, these take up ~3 hours for a full set of tests. That is a lot and basically every hour of automation ~= 1 machine needed. Is there a reduced set of tests you can run? Maybe opt only, ignore headless, and a subset of the existing tests?
Assignee | ||
Comment 12•4 years ago
|
||
(In reply to Joel Maher ( :jmaher ) (UTC -0800) from comment #11)
Is there a reduced set of tests you can run? Maybe opt only, ignore headless, and a subset of the existing tests?
Running all wdspec tests shouldn't take 3h. Maybe you are confused with web-platform-tests that contain these tests. When I query mozilla-central I can see:
https://treeherder.mozilla.org/jobs?repo=mozilla-central&searchStr=wdspec%2Cship%2Cmac
So headless takes around 37minutes and non-headless 45minutes. Basically I would be happy with just a having test jobs for mozilla-central for now (maybe even nightly only). And it doesn't matter if it's headless or not. We could take what's faster.
Given that we don't have machines in production yet, I would suggest that we land this patch and have the Aarch64 binary at least build. We could mention Tier-2 support and not putting it on the official release page of geckodriver.
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
whimboo, can we run a subset of opt/headless? there is machine reboot and taskcluster overhead as well, per job it starts to add up.
Assignee | ||
Comment 15•4 years ago
|
||
(In reply to Joel Maher ( :jmaher ) (UTC -0800) from comment #14)
whimboo, can we run a subset of opt/headless? there is machine reboot and taskcluster overhead as well, per job it starts to add up.
I would have to forward this to James. Not sure if running wpt jobs on Taskcluster mozharness support running specific folders.
Sadly we don't have just sanity checks. But whereby what about the Rust unit tests? Would those maybe sufficient for the time being until we have a pool of M1 machines in production?
Comment 16•4 years ago
|
||
wpt tests are not scheduled for M1 nor are rust tests. We have vetted this list of tests with many people, the goal is bare minimum test coverage for the new platform, not minimum test coverage or low test coverage. Just asking for 50 machines in production has added weeks of signatures and meetings.
Assignee | ||
Comment 17•4 years ago
|
||
Sorry I was unclear. wdspec
is a subset of wpt, which can be run independently. But I don't know if folder selection will work easily.
Comment 18•4 years ago
|
||
Folder selection can work; if you have a list of tests (or a test) that we could use as critical smoketests we have the ability to configure a task that just runs those. But per what jmaher says it sounds like we shouldn't expect much in the short term; nothing more than "geckodriver is able to start and create a session", and even that might be too much right now. Running the first test of a given type incurs all the overhead of creating the test environment specific to that test type, which as jmaher says can be many minutes of machine time and we're highly constrained.
That said I don't think GeckoDriver should have loads of arch-specific code so if we can verify it works at all then it would be surprising (but not impossible!) to see M1 additional specific issues in individual tests (unless they are underlying Gecko issues ofc).
Assignee | ||
Comment 19•4 years ago
|
||
Ok, then we will use the approach as layed out in comment 12 and ship aarch64 support as tier-2.
Comment 20•4 years ago
|
||
bugherder |
Assignee | ||
Comment 21•4 years ago
|
||
Hi Mike, during your review of my patch you offered a quick smoke test of geckodriver on an M1 device. If you find the time we would appreciate your feedback in how it works. As mentioned on Phabricator running the Wdspec tests would be the best way here. To do that you would have to run the following command:
mach wpt --webdriver-binary=path/to/geckodriver testing/web-platform/tests/webdriver/tests/
Thanks a lot!
Assignee | ||
Comment 23•4 years ago
|
||
Yes, tests take a long time to run. Thanks a lot for verifying that it works!
Assignee | ||
Updated•4 years ago
|
Description
•