Skip to content

[REQUEST] arm64 support #186

@davidjb

Description

@davidjb

What would you like to have implemented?

Builds of Chromium for both x86_64 and arm64.

I know this has been discussed a lot previously in #93 and #19 but with the general availability release of provided.al2023 for Lambda (https://aws.amazon.com/blogs/compute/introducing-the-amazon-linux-2023-runtime-for-aws-lambda/), this now seems feasible given previous discussions around blockers.

I wanted to open the discussion around adding this support as some changes would be needed to the build & release processes to handle both architectures. Mostly, I wanted to see what help I could be with that process, to document my findings so far, and contribute PRs/fixes for issues in the compilation process where possible.

Why would it be useful?

arm64-based AWS Lambda function invocation is notably cheaper than x86_64, but also having an arm64 version of Chromium allows for situations such as where emulation of x86_64 isn't possible or problematic on ARM CPUs (e.g. local invocation of functions via AWS SAM).

Other info

I'm currently running the Ansible playbook from this repo against both c6i.16xlarge and c6g.16xlarge instances for x86_64 and arm64 respectively. It's taken over an hour just to clone the Chromium source (at least 44GB of data), but I'll report the issues I'm encountering on either environment below.

Status so far

  • How/where is aws.tar.br built and updated?

x86_64 host

ARM64/Gravitron host

Given the below and general notes at https://chromium.googlesource.com/chromium/src/+/main/docs/linux/chromium_arm.md, it appears that cross-compiling for ARM is the only option at present.

[ec2-user@host chromium]$ gclient sync --delete_unversioned_trees --revision 905e8bdd32d891451d94d1ec71682e989da2b0a1 --with_branch_head
Updating depot_tools...
'/srv/source/depot_tools/.cipd_bin/goma_ctl.py' was not found and may not be supported on this platform!
Syncing projects: 100% (157/157), done.

________ running 'cipd ensure -log-level error -root /srv/source/chromium -ensure-file /tmp/tmpxji4sdpz.ensure' in '.'
Errors:
  failed to resolve infra/rbe/client/linux-arm64@re_client_version:0.113.0.8b45b89-gomaip (line 8): no such package: infra/rbe/client/linux-arm64
Error: Command 'cipd ensure -log-level error -root /srv/source/chromium -ensure-file /tmp/tmpxji4sdpz.ensure' returned non-zero exit status 1
Errors:
  failed to resolve infra/rbe/client/linux-arm64@re_client_version:0.113.0.8b45b89-gomaip (line 8): no such package: infra/rbe/client/linux-arm64
[ec2-user@host chromium]$ gclient runhooks
Updating depot_tools...
'/srv/source/depot_tools/.cipd_bin/goma_ctl.py' was not found and may not be supported on this platform!
Hook 'vpython3 -vpython-spec src/.vpython3 -vpython-tool install' took 26.87 secs
Running hooks:   3% ( 6/170) nacltools
________ running 'python3 src/build/download_nacl_toolchains.py --mode nacl_core_sdk sync --extract' in '/srv/source/chromium'
Traceback (most recent call last):
  File "/srv/source/chromium/src/build/download_nacl_toolchains.py", line 55, in <module>
    sys.exit(Main(sys.argv[1:]))
  File "/srv/source/chromium/src/build/download_nacl_toolchains.py", line 51, in Main
    return package_version.main(args)
  File "/srv/source/chromium/src/native_client/build/package_version/package_version.py", line 1290, in main
    arguments = ParseArgs(args)
  File "/srv/source/chromium/src/native_client/build/package_version/package_version.py", line 1118, in ParseArgs
    host_arch = pynacl.platform.GetArch3264()
  File "/srv/source/chromium/src/native_client/pynacl/platform.py", line 133, in GetArch3264
    assert machine in ARCH3264_DICT, "Unrecognized arch machine: %s" % machine
AssertionError: Unrecognized arch machine: aarch64
Error: Command 'python3 src/build/download_nacl_toolchains.py --mode nacl_core_sdk sync --extract' returned non-zero exit status 1 in /srv/source/chromium
Traceback (most recent call last):
  File "/srv/source/chromium/src/build/download_nacl_toolchains.py", line 55, in <module>
    sys.exit(Main(sys.argv[1:]))
  File "/srv/source/chromium/src/build/download_nacl_toolchains.py", line 51, in Main
    return package_version.main(args)
  File "/srv/source/chromium/src/native_client/build/package_version/package_version.py", line 1290, in main
    arguments = ParseArgs(args)
  File "/srv/source/chromium/src/native_client/build/package_version/package_version.py", line 1118, in ParseArgs
    host_arch = pynacl.platform.GetArch3264()
  File "/srv/source/chromium/src/native_client/pynacl/platform.py", line 133, in GetArch3264
    assert machine in ARCH3264_DICT, "Unrecognized arch machine: %s" % machine
AssertionError: Unrecognized arch machine: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions