Skip to content

recipe(cef): build Linux arm64 from the x86_64 host (#3062) - #26

Merged
zackees merged 2 commits into
mainfrom
infra/3062-cef-linux-arm64
Oct 30, 2026
Merged

zackees merged 2 commits into
mainfrom
infra/3062-cef-linux-arm64

Conversation

@zackees

@zackees zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member

Refs obs-rust/obs-studio#3062

recipes/cef/linux could only ever produce x86_64: the automated build was pinned to --x64-build, Release_GN_x64 and the linux64 minimal distribution. That is why ubuntu-aarch64 still pins CEF 7871 and the nightly CEF version guard fails on it every day (obs-rust/obs-studio actions run 41010694789).

RED — 3194d0a

tests/test_cef_recipe.py::test_linux_recipe_builds_arm64 fails on the old recipe:

assert '--arm64-build' in '#!/usr/bin/env bash\n# CEF 8078 ...'
E       AssertionError

GREEN — 86b35cb

build.sh takes sync|build|pack [x86_64|arm64]; the argument defaults to x86_64, so the existing invocation and archive are unchanged.

  • arm64: --arm64-build, Release_GN_arm64, the linuxarm64 minimal distribution, and target_cpu=arm64 appended to GN_DEFINES — without it the x86_64 host builds x86_64 silently.
  • The archive is named cef_binary_8078_linux_aarch64.tar.xz, which is what obs-studio's pin expects (ci/test_cef_pin.py).
  • pack refuses an args.gn whose target_cpu is not the one asked for, so a mis-built tree cannot be published under the arm64 name.
  • pack copies the arm64 libcef_dll_wrapper.a from the CEF build tree: the distribution's own cmake build compiles the wrapper for this host.

Local: uv run --project . pytest -q → 47 passed; ruff check . clean; bash -n clean.

Not yet verified (why this is a draft)

No Chromium build has run against this script yet. sync/build/pack arm64 on the x86_64 build host is the next step, and it needs a fresh Chromium checkout (~150 GB; the host has 344 GB free and its out/cef is empty). That run decides three things this PR assumes:

  1. automate-git.py 8078 accepts --arm64-build for a Linux target (its --arm flag is 32-bit only; arm64 goes through target_cpu).
  2. the depot_tools sysroot hook installs the arm64 sysroot for target_cpu=arm64 (install-build-deps.sh --no-arm is the 32-bit ARM set, so that flag stays).
  3. the wrapper really is at out/Release_GN_arm64/libcef_dll_wrapper/libcef_dll_wrapper.a, and the minimal distribution is linuxarm64.

Once the archive exists I will post its SHA-256 and the pin change in obs-studio separately.

obs-rust/obs-studio#3062: the recipe only ever builds x86_64 (--x64-build, Release_GN_x64, the linux64 distribution), so ubuntu-aarch64 stays on CEF 7871 and the nightly version guard fails on it. The test fails on the current recipe.
obs-rust/obs-studio#3062.

recipes/cef/linux/build.sh takes an optional x86_64|arm64 argument (default
x86_64, so the existing archive is unchanged):

- arm64: --arm64-build, Release_GN_arm64, the linuxarm64 minimal distribution,
  target_cpu=arm64 in GN_DEFINES so the x86_64 host does not build x86_64
  silently, and the archive name obs-studio pins, _linux_aarch64.
- pack refuses an args.gn that was not built for the requested target_cpu.
- pack takes the arm64 libcef_dll_wrapper.a the CEF build made, since the
  distribution's cmake build would compile it for this host.

tests/test_cef_recipe.py covers the flags and names (RED in 3194d0a).
@zackees

zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Recipe-only evidence, so this half can land before the host build:

  • RED 3194d0a — tests/test_cef_recipe.py fails on the missing arm64 flags (--arm64-build, target_cpu=arm64, Release_GN_arm64, linuxarm64, cef_binary_8078_linux_aarch64.tar.xz).
  • GREEN 86b35cb — the same tests pass; uv run --project . pytest -q → 47 passed on the branch at 86b35cb (re-run on this host, 2026-10-30 19:4x UTC).
  • pack refuses an args.gn built for the other architecture, so a wrong-arch archive cannot be uploaded.

The real sync/build/pack arm64 (a ~150 GB Chromium checkout, many hours of ninja on this host) and the archive upload stay on #3062; that is what the draft was waiting on and it needs the recipe on main, not this branch.

@zackees
zackees merged commit 09dd939 into main Oct 30, 2026
@zackees
zackees deleted the infra/3062-cef-linux-arm64 branch October 30, 2026 19:34
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In progress to Done in obs-rust Multiview Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant