Skip to content

cef: Build CEF 8078 for macOS arm64 and x86_64 on a Mac (part of #1864) #2418

Open

Description

@zackees

Part of #1864 (build-host decision recorded there). Chromium has no Linux→macOS cross build, so this needs a Mac. One Apple Silicon Mac builds both architectures. macOS stays on 7871 (also upstream OBS's pin) until then.

Scope

  • recipes/cef/macos in obs-rust/obs-studio-libs: CEF 8078, at the Linux build's commit, with proprietary codecs, symbol_level=1, chrome_pgo_phase=0, and libcef_sandbox.dylib kept in the framework (Use the CEF sandbox on macOS (obs-rust/obs-studio#1092) obs-browser#12 needs it).
  • The archives in the obs-rust/cef 8078 release with SHA-256s, then the obs-studio pin.

Acceptance criteria

Needs a person with an Apple Silicon Mac to claim it.

Activity

  1. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    /ready

  2. nathan-v commented on Oct 26, 2026

    @nathan-v
    Contributor

    Claiming: #2418, the macOS CEF 8078 archives (arm64 and x86_64) on this Apple Silicon Mac.

    1. Recipe PR in obs-studio-libs today: recipes/cef/macos/build.sh with sync, build, and pack. Checkout 426920c33ef22551e0b8f48cf343d623ac25642d, the Linux 8078 build (156.0.8+g426920c+chromium-156.0.8078.48). GN defines are is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome symbol_level=1 chrome_pgo_phase=0. One architecture per run. Pack fails unless args.gn has the codec flags and Release/Chromium Embedded Framework.framework/Libraries/libcef_sandbox.dylib is in the tree. The recipe test checks those. RED, then GREEN.

    2. Build here (Xcode 27). arm64 first, then x86_64, deleting that arch's out directory after pack so both fit in the ~160 GB free. The build target is cefclient, because the macOS distrib copies the framework out of cefclient.app. Expect about a day per architecture.

    3. Upload cef_binary_8078_macos_arm64.tar.xz and cef_binary_8078_macos_x86_64.tar.xz to the obs-rust/cef 8078 release, with sha256s.

    4. obs-studio PR: pin the hashes and extend ci/test_cef_pin.py so the version floor covers macOS. Then obs-browser builds, a browser source plays an H.264 MP4 page, and the sandbox reports on.

    The script runs on the host. Chromium's macOS build needs Xcode, and the bosn stacks in obs-studio-libs are Linux containers.

  3. nathan-v commented on Oct 26, 2026

    @nathan-v
    Contributor

    Recipe is up: obs-rust/obs-studio-libs#17 (RED 9a90fab, GREEN 5b1db4a). Starting the arm64 checkout on this Mac. The x86_64 build waits until that out directory is packed and removed.

  4. nathan-v commented on Oct 26, 2026

    @nathan-v
    Contributor

    Arm64 checkout finished (32 GB, commit 426920c33ef22551e0b8f48cf343d623ac25642d). args.gn has the codec flags, symbol_level=1, and target_cpu = "arm64". Ninja is compiling out/Release_GN_arm64 (about 90k steps). x86_64 waits until this out directory is packed and removed.

  5. nathan-v commented on Oct 26, 2026

    @nathan-v
    Contributor

    The arm64 ninja stopped on the first Metal shader step: Xcode 27 has no metal compiler until xcodebuild -downloadComponent MetalToolchain. That component is installed now (metal 32023.921), the .air file built, and ninja is running again in out/Release_GN_arm64.

  6. nathan-v commented on Oct 26, 2026

    @nathan-v
    Contributor

    Arm64 archive is packed: cef_binary_8078_macos_arm64.tar.xz, sha256 2ddd78dd796af956728984747aaba4d859658354f00c6035be975b9f322f95cb, CEF_VERSION 156.0.8+g426920c+chromium-156.0.8078.48. The framework, libcef_sandbox.dylib, and libcef_dll_wrapper.a are arm64. The arm64 out directory is removed. I cannot upload it; I have pull-only on obs-rust/cef. Starting the x86_64 build on the same checkout.

  7. 16 remaining items

  8. nathan-v commented on Oct 28, 2026

    @nathan-v
    Contributor

    @zackees Empty is what this macOS build produces.

    CEF_SANDBOX_COMPAT_HASH is the Windows sandbox ABI check. In cef/BUILD.gn the make_version_header action adds --sandbox-files only under is_win. The files are //chrome/chrome_elf/chrome_elf_main.h, //sandbox/policy/mojom/sandbox.mojom, //sandbox/win/src/sandbox.h, and //sandbox/win/src/sandbox_types.h. tools/make_version_header.py says the hash is Windows only and writes "" when that list is absent. Its test asserts #define CEF_SANDBOX_COMPAT_HASH "" for that call. make_distrib.py copies the generated gen/cef/include/cef_version.h into the archive, which is the header in both of these tarballs.

    The only consumer of a non-empty value is libcef_dll/wrapper/cef_scoped_library_loader_win.cc, which compares the bootstrap EXE with libcef.dll. cef_api_hash documents entry 3 as Windows only.

    On macOS the sandbox library is libcef_sandbox.dylib inside the framework. Both archives contain that dylib, and the wrapper was built with CEF_USE_SANDBOX. The empty macro is the normal header for this platform.

  9. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Thanks @nathan-v — that is the answer, and I checked it in the CEF source rather than taking it on description. It settles the last open question on the sandbox criterion.

    What I verified (chromiumembedded/cef @ master, the tree these archives were built from):

    Claim Where Result
    --sandbox-files is added only under is_win BUILD.gn → action("make_version_header"), inside if (is_win), with exactly chrome_elf_main.h, sandbox/policy/mojom/sandbox.mojom, sandbox/win/src/sandbox.h, sandbox/win/src/sandbox_types.h ✅ as you said
    The tool writes "" when it gets no sandbox files tools/make_version_header.py: if sandbox_files: ... else: sandbox_hash = "" ✅
    Its test pins that empty value tools/make_version_header_test.py::test_fixed_version_content_empty_and_populated_sandbox_hash asserts #define CEF_SANDBOX_COMPAT_HASH "" ✅
    The only non-empty consumer is the Windows loader libcef_dll/wrapper/cef_scoped_library_loader_win.cc (code search: no other consumer outside tools/, cef_api_hash.h and version_manager.py); cef_scoped_library_loader_mac.mm has no compat-hash reference at all ✅
    make_distrib.py ships the generated header gen/cef/include/cef_version.h into the archive ✅

    So, for the record: an empty CEF_SANDBOX_COMPAT_HASH in the macOS archives is the correct header, not a missing bake-in, and the macOS sandbox criterion is libcef_sandbox.dylib inside Chromium Embedded Framework.framework with the wrapper built CEF_USE_SANDBOX — both of which your two archives satisfy. Nothing to rebuild.

    I recorded it where the provenance lives rather than here: obs-rust/cef#5 adds a sandbox block per macOS asset in releases/8078.json and a version-header bullet in PROVENANCE.md, quoting the same three files. That is #2674's rule — the record has to be in the manifest, not a comment thread. Docs only; no archive or hash is touched.

    What is still open on this issue, none of it on you today:

    1. The recipe test that checks the codec flags and that the sandbox library is in the archive.
    2. obs-browser building against these archives, a browser source playing an H.264 MP4 page, and the sandbox reporting on — that last one is bug: browser: CEF 7871 (Chromium 150.0.7871.252, end of life, two in-the-wild V8 CVEs) runs with no_sandbox on every platform #1092's check and is now unblocked by your answer rather than waiting on the header.
    3. The macOS arm in the version-floor guard.

    Your bundle was what made 1 and 3 checkable at all, so thank you for the thorough write-up.

  10. moved this from In progress to Ready in obs-rust Multiviewon Oct 29, 2026
  11. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Claiming: #2418 — the macOS 8078 pin, now that the archives are on the mirror.

    The build half of this issue landed before the claim lapsed: @nathan-v's arm64 and x86_64 archives are on the obs-rust/cef 8078 release and their SHA-256s match what he posted (I re-checked the release digests). What is left is the pin, which is the part that makes the macOS lanes use it.

    Plan (one PR):

    1. RED: ci/test_cef_pin.py holds the macOS targets to the same 8078 floor and URL the Linux pin already meets, and asserts cmake/common/buildspec_common.cmake honours the per-platform versions / releases overrides. Fails today (macOS resolves to 7871).
    2. GREEN: buildspec_common.cmake reads versions.<platform> / releases.<platform> with a fallback to version / baseUrl (setup_ubuntu's jq already does this for Linux), and CMakePresets.json pins macos-arm64 / macos-x86_64 to 8078 with the release's digests.
    3. Validation: the two asset URLs answer 200 and their SHA-256s equal the release digests; PR CI's macOS lanes build with ENABLE_BROWSER=true, which is what proves the archives are usable. Windows and ubuntu-aarch64 stay on 7871, so cef_support.py still fails on those three pins — that is cef: Cross-build CEF 8078 for Windows x64 and arm64 from Linux (part of #1864) #2417's and the aarch64 slice's work, not this PR's.
  12. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    PR opened: #2994 (RED fcd0945cc / GREEN 2649a8fcd). The macOS targets now read their own versions/releases row in CMakePresets.json through buildspec_common.cmake, so Build 🧱 / macOS 🍏 downloads the 8078 archives with ENABLE_BROWSER=true and builds against them.\n\nValidation: the two asset URLs answer 200 and their SHA-256s are the release digests; ci.test_cef_pin + ci.test_cef_support are green (11 tests). PR CI does not build the macOS app (that lane is schedule/dispatch only), so I dispatched scheduled.yaml on the branch: 41004532761. The PR waits on that macOS lane before it is queued.

  13. moved this from Ready to In progress in obs-rust Multiviewon Oct 30, 2026
  14. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Coordinator status: the macOS pin (#2994) and the archive-layout fix (#3016) are both merged. The macOS builds and the analyze lane passed on #3016's Scheduled dispatch, so the build half is done. Two acceptance criteria still have no evidence: a browser source playing an H.264 MP4 page with the CEF sandbox reported on (#1092), and the recipe test for the codec flags and the sandbox library. Leaving this open for whoever has a Mac to post that run.

  15. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    macOS build evidence on master, after #2994 (8078 pins) and #3016 (flat archive root): the nightly Scheduled workflow on master (41050600920) built both macOS lanes against the 8078 archives:

    • Build 🧱 / macOS 🍏 (arm64): success
    • Build 🧱 / macOS 🍏 (x86_64): success

    That was the last thing failing for this issue — before #3016, FindCEF reported CEF_LIBRARY_RELEASE-NOTFOUND and both lanes stopped in configure.

    Still open on the acceptance criteria: a real-app render (obs-browser loads a page, a dock opens, obs-browser-page starts) on macOS, which the scheduled build does not do. Keeping the issue open until that run is pasted here; #1864 tracks the remaining platforms (#2417 Windows, #3062 Linux aarch64).

  16. moved this from In progress to Ready in obs-rust Multiviewon Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Next upreadyMeets the definition of Ready; claimablesize:LSeveral days

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions