Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on build - #42

Closed
AlexPeregudov opened this issue Jan 31, 2023 · 18 comments
Closed

Error on build - #42

AlexPeregudov opened this issue Jan 31, 2023 · 18 comments

Comments

@AlexPeregudov
Copy link

AlexPeregudov commented Jan 31, 2023

Got

../../sandbox/policy/mac/sandbox_mac.mm:28:10: fatal error: 'sandbox/policy/mac/print_backend.sb.h' file not found
#include "sandbox/policy/mac/print_backend.sb.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[7293/36295] CXX obj/media/capture/mojom/image_capture/image_capture.mojom.o
ninja: build stopped: subcommand failed.

Changed options - no luck.

@AlexPeregudov AlexPeregudov changed the title Erro on build Error on build - Jan 31, 2023
@fathyb
Copy link
Owner

fathyb commented Jan 31, 2023

I believe I'm not experiencing this myself because I only use release builds (dev builds have a severe performance penalty). Could you run ./scripts/gn.sh args out/Default and uncomment or add the following?

# uncomment this for a release build
is_debug=false
symbol_level=0

@AlexPeregudov
Copy link
Author

The same error. It may be a problem with sources?

But
when I sync

Syncing projects:  97% (108/111) src/third_party/tflite/src                     
src/third_party/skia (ERROR)
----------------------------------------
[0:00:06] Started.
[0:00:06] Finished running: git config remote.origin.url
[0:00:06] Finished running: git rev-list -n 1 HEAD
[0:00:06] Finished running: git rev-parse --abbrev-ref=strict HEAD
----------------------------------------
Error: 90> 
90> ____ src/third_party/skia at 486deb23bc2a4d3d09c66fef52c2ad64d8b4f761
90> 	You have unstaged changes.
90> 	Please commit, stash, or reset.

@fathyb
Copy link
Owner

fathyb commented Jan 31, 2023

It seems to be caused by staged files in the Skia repository, you can remove those by running:

  • (cd chromium/src && git checkout .): revert Chromium patches
  • (cd chromium/src/third_party/skia && git checkout .): revert Skia patches
  • ./scripts/gclient.sh sync: fetch Chromium sources
  • ./scripts/patches.sh apply: apply Carbonyl patches to Chromium

@AlexPeregudov
Copy link
Author

AlexPeregudov commented Feb 1, 2023

[9397/35346] OBJCXX obj/sandbox/policy/policy/sandbox_mac.o
FAILED: obj/sandbox/policy/policy/sandbox_mac.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/sandbox/policy/policy/sandbox_mac.o.d -DSANDBOX_POLICY_IMPL -DDCHECK_ALWAYS_ON=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_XCODE_VERSION=1420 -DCR_CLANG_REVISION=\"llvmorg-16-init-14635-ga650f2ec-1\" -DCOMPONENT_BUILD -DCR_LIBCXX_REVISION=7c5e4b4eb3c5970f5525f62650c5b76f56dd99a8 -D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1 -D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DABSL_CONSUME_DLL -DBORINGSSL_SHARED_LIBRARY -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -DPROTOBUF_USE_DLLS -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out  -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector-strong -femit-dwarf-unwind=no-compact-unwind -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -fcomplete-member-pointers -arch x86_64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O0 -fno-omit-frame-pointer -g2 -gdwarf-aranges -Xclang -debug-info-kind=limited -isysroot ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacos-version-min=10.13 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang raw-ref-template-as-trivial-member -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -DPROTOBUF_ALLOW_DEPRECATED=1 -Wobjc-missing-property-synthesis -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++20 -Wno-trigraphs -fobjc-call-cxx-cdtors -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../sandbox/policy/mac/sandbox_mac.mm -o obj/sandbox/policy/policy/sandbox_mac.o
../../sandbox/policy/mac/sandbox_mac.mm:28:10: fatal error: 'sandbox/policy/mac/print_backend.sb.h' file not found
#include "sandbox/policy/mac/print_backend.sb.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[9414/35346] CXX obj/services/data_dec...om/mojom_xml_parser/xml_parser.mojom.o
ninja: build stopped: subcommand failed.

But,
'sandbox/policy/mac/print_backend.sb.h' file not found

In
https://chromium.googlesource.com/chromium/src/+/refs/heads/main/sandbox/policy/mac/

No file
print_backend.sb.h only print_backend.sb without .h

Upd.: trying to build without patching - the same error. Bug in Chromium?
MacOS Ventura 13.2 on Intel, XCode 14.2

@fathyb
Copy link
Owner

fathyb commented Feb 1, 2023

This is very weird, someone else had the exact same issue. I have a feeling you're actually doing a dev build (because of DCOMPONENT_BUILD) which is not tested.

Could you share the output of the following commands? (replace out/Default if you're using a different out directory)

(
        cd chromium/src/out/Default &&
        gn args . --list=enable_oop_printing && 
        gn args . --list=symbol_level &&
        gn args . --list=is_debug &&
        cat args.gn
)

@AlexPeregudov
Copy link
Author

AlexPeregudov commented Feb 1, 2023

gn located in chromium/depot_tools/ but I can't run it from chromium/src/out/Default

user@MacBook-Pro-User Default % gn
zsh: command not found: gn

Trying to run gn.sh wrapper
../../../../scripts/gn.sh args . --list=enable_oop_printing from chromium/src/out/Default
result

ERROR Not a build directory.
This command requires an existing build directory. I interpreted your input
"." as:
  /Users/user/carbonyl/carbonyl/chromium/src
which doesn't seem to contain a previously-generated build.

@fathyb
Copy link
Owner

fathyb commented Feb 1, 2023

My bad, here is the fixed version:

./scripts/gn.sh args out/Default --list=enable_oop_printing &&
./scripts/gn.sh args out/Default --list=is_debug &&
./scripts/gn.sh args out/Default --list=symbol_level &&
cat chromium/src/out/Default/args.gn

@AlexPeregudov
Copy link
Author

user@MacBook-Pro-User carbonyl % ./scripts/gn.sh args out/Default --list=enable_oop_printing &&
./scripts/gn.sh args out/Default --list=is_debug &&
./scripts/gn.sh args out/Default --list=symbol_level &&
cat chromium/src/out/Default/args.gn
enable_oop_printing
    Current value (from the default) = false
      From //printing/buildflags/buildflags.gni:43

    Enables out-of-process printing. While this definition matches
    `enable_print_preview`, do not base this definition upon that.  This
    feature could still be appropriate for some build configurations which
    explicitly disable print preview.

is_debug
    Current value = false
      From //out/Default/args.gn:16
    Overridden from the default = true
      From //build/config/BUILDCONFIG.gn:163

    Debug build. Enabling official builds automatically sets is_debug to false.

symbol_level
    Current value = 0
      From //out/Default/args.gn:17
    Overridden from the default = -1
      From //build/config/compiler/compiler.gni:60

    How many symbols to include in the build. This affects the performance of
    the build since the symbols are large and dealing with them is slow.
      2 means regular build with symbols.
      1 means minimal symbols, usually enough for backtraces only. Symbols with
    internal linkage (static functions or those in anonymous namespaces) may not
    appear when using this level.
      0 means no symbols.
      -1 means auto-set according to debug/release and platform.

# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.

import("//carbonyl/src/browser/args.gn")

# uncomment this to build for arm64
# target_cpu="arm64"

# uncomment this to enable ccache
# cc_wrapper="env CCACHE_SLOPPINESS=time_macros ccache"

# uncomment this if you're building for macOS
#use_lld=false

# uncomment this for a release build
is_debug=false
symbol_level=0

@fathyb
Copy link
Owner

fathyb commented Feb 1, 2023

You're indeed making a release build, let's replace the contents in src/browser/args.gn with:

use_lld=false
headless_enable_commands=false
headless_use_embedded_resources=true

Then run ./scripts/gn.sh gen out/Default to re-generate build files. This should enable all Chromium features. Might take a while to build after that.

I'm going to rebuild from a different computer on my side to try to reproduce it.

@bardbess
Copy link

bardbess commented Feb 1, 2023

I tried a build by only adding use_lld=false and removing the exclusion of printing (enable_printing, enable_print_preview). So that I had

enable_nacl=false    
enable_pdf=false    
enable_ppapi=false    
enable_plugins=false    
enable_browser_speech_service=false    
enable_component_updater=false    
enable_media_remoting=false    
enable_rust_json=false    
enable_screen_ai_service=false    
enable_speech_service=false    
enable_system_notifications=false    
enable_tagged_pdf=false    
enable_webui_certificate_viewer=false    
use_lld=false    
headless_enable_commands=false    
headless_use_embedded_resources=true 

but its complaining about a certificate issue.
error: use of undeclared identifier 'SecTrustCopyCertificateChain'; did you mean 'SecTrustGetCertificateCount'?

    Finished release [optimized] target(s) in 0.40s
[0/1] Regenerating ninja files
[6187/23779] CXX obj/net/net/x509_util_apple.o
FAILED: obj/net/net/x509_util_apple.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/net/net/x509_util_apple.o.d -DDCHECK_ALWAYS_ON=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCR_XCODE_VERSION=1251 -DCR_CLANG_REVISION=\"llvmorg-16-init-14635-ga650f2ec-1\" -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=7c5e4b4eb3c5970f5525f62650c5b76f56dd99a8 -D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1 -D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -DNET_IMPLEMENTATION -DENABLE_BUILT_IN_DNS -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default -I../../net/third_party/quiche/src -Igen/net/third_party/quiche/src -I../../third_party/zlib -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/brotli/include -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -femit-dwarf-unwind=no-compact-unwind -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -fcomplete-member-pointers -arch x86_64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -g0 -isysroot ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -mmacos-version-min=10.13 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang raw-ref-template-as-trivial-member -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -O2 -DPROTOBUF_ALLOW_DEPRECATED=1 -Wexit-time-destructors -std=c++20 -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -include obj/net/net/precompile.h-cc -c ../../net/cert/x509_util_apple.cc -o obj/net/net/x509_util_apple.o
../../net/cert/x509_util_apple.cc:144:9: error: use of undeclared identifier 'SecTrustCopyCertificateChain'; did you mean 'SecTrustGetCertificateCount'?
        SecTrustCopyCertificateChain(trust));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        SecTrustGetCertificateCount
../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrust.h:494:9: note: 'SecTrustGetCertificateCount' declared here
CFIndex SecTrustGetCertificateCount(SecTrustRef trust)
        ^
../../net/cert/x509_util_apple.cc:143:12: error: no matching conversion for functional-style cast from 'CFIndex' (aka 'long') to 'base::ScopedCFTypeRef<CFArrayRef>' (aka 'ScopedTypeRef<const __CFArray *, internal::ScopedCFTypeRefTraits<const __CFArray *>>')
    return base::ScopedCFTypeRef<CFArrayRef>(
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/mac/scoped_typeref.h:55:22: note: candidate constructor not viable: no known conversion from 'CFIndex' (aka 'long') to 'element_type' (aka 'const __CFArray *') for 1st argument
  explicit constexpr ScopedTypeRef(
                     ^
../../base/mac/scoped_typeref.h:63:3: note: candidate constructor not viable: no known conversion from 'CFIndex' (aka 'long') to 'const ScopedTypeRef<const __CFArray *, ScopedCFTypeRefTraits<const __CFArray *>>' for 1st argument
  ScopedTypeRef(const ScopedTypeRef<T, Traits>& that)
  ^
../../base/mac/scoped_typeref.h:77:3: note: candidate constructor not viable: no known conversion from 'CFIndex' (aka 'long') to 'ScopedTypeRef<const __CFArray *, ScopedCFTypeRefTraits<const __CFArray *>>' for 1st argument
  ScopedTypeRef(ScopedTypeRef<T, Traits>&& that) : object_(that.object_) {
  ^
../../base/mac/scoped_typeref.h:71:12: note: candidate template ignored: could not match 'ScopedTypeRef<R, RTraits>' against 'CFIndex' (aka 'long')
  explicit ScopedTypeRef(const ScopedTypeRef<R, RTraits>& that_as_subclass)
           ^
2 errors generated.
[6196/23779] CXX obj/net/net/socket_posix.o
ninja: build stopped: subcommand failed.

It seems SecTrustCopyCertificateChain is a macOS 12.0+ function and I'm trying to build against 11.7.2.

Probably need a condition for earlier macOS somewhere?

SecCertificateRef serverCertificate = NULL;
if (@available(macOS 12.0, *)) {
    CFArrayRef certs = SecTrustCopyCertificateChain(trust);
    serverCertificate = (SecCertificateRef)CFArrayGetValueAtIndex(certs, i);
    CFRelease(certs);
} else
{
    serverCertificate = SecTrustGetCertificateAtIndex(trust, i);
}

@fathyb
Copy link
Owner

fathyb commented Feb 1, 2023

Good find @bardbess! Thank you for investigating. I believe this error can happen if you're using an old Xcode version that does not contain the macOS 12 SDK. The function call is gated (__builtin_available(macOS 12.0, iOS 15.0, *)), but the compiler still needs the symbol as this is a runtime check.

@AlexPeregudov
Copy link
Author

Leave only 3 strings in args.gn as described above

and pull, sync, patch, set args, build


user@MacBook-Pro-User carbonyl % git pull
Updating 11d8fe2..16cf566
Fast-forward
 Cargo.toml                             |  1 +
 Dockerfile                             |  1 -
 readme.md                              | 37 +++++++++++++++++++++++++++++++++++--
 scripts/build.sh                       |  9 ++++++++-
 scripts/{docker.sh => docker-build.sh} |  4 ++--
 scripts/docker-push.sh                 | 22 ++++++++++++++++++++++
 src/browser/ffi.rs                     |  8 ++++++--
 src/chromium.patch                     | 16 ++++++++--------
 src/input/mouse.rs                     |  4 ++--
 src/input/parser.rs                    | 12 ++++++++----
 src/input/tty.rs                       | 10 ++++++----
 src/lib.rs                             |  2 ++
 src/output/size.rs                     | 26 +++++++++++++++++++++++---
 src/utils.rs                           |  4 ++++
 src/utils/log.rs                       | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/utils/try_block.rs                 |  7 +++++++
 16 files changed, 192 insertions(+), 29 deletions(-)
 rename scripts/{docker.sh => docker-build.sh} (97%)
 create mode 100755 scripts/docker-push.sh
 create mode 100644 src/utils.rs
 create mode 100644 src/utils/log.rs
 create mode 100644 src/utils/try_block.rs
user@MacBook-Pro-User carbonyl % ./scripts/gclient.sh sync
Updating depot_tools...
using /var/folders/2l/b6jq2dr93g9_k_mvfwtjvmwm0000gn/T/goma_user as tmpdir
compiler_proxy is not running
Syncing projects: 100% (134/134), done.                                                                                                 
Running hooks:  11% (15/134) mac_toolchain                 
________ running 'python3 src/build/mac_toolchain.py' in '/Users/user/carbonyl/carbonyl/chromium'
Skipping Mac toolchain installation for mac
Running hooks: 100% (134/134), done.                                                   
user@MacBook-Pro-User carbonyl % ./scripts/patches.sh apply
Stashing Chromium changes..
Saved working directory and index state WIP on (no branch): 92da8189788b1 Publish DEPS for 111.0.5511.1
HEAD is now at 92da8189788b1 Publish DEPS for 111.0.5511.1
Applying Chromium patches..
<stdin>:63: trailing whitespace.
 
<stdin>:888: trailing whitespace.
    
<stdin>:916: trailing whitespace.
  
<stdin>:1281: trailing whitespace.
  
<stdin>:2040: trailing whitespace.
               cc::NodeId node_id = cc::kInvalidNodeId) {  
warning: 5 lines add whitespace errors.
Stashing Chromium changes..
No local changes to save
HEAD is now at 486deb23bc Make uniforms in SkSLTest more data-driven.
Applying Skia patches..
Patches successfully applied
user@MacBook-Pro-User carbonyl % ./scripts/gn.sh gen out/Default
Done. Made 19180 targets from 3134 files in 16158ms
user@MacBook-Pro-User carbonyl % ./scripts/build.sh Default
    Updating crates.io index
  Downloaded autocfg v1.1.0
  Downloaded iana-time-zone v0.1.53
  Downloaded num-integer v0.1.45
  Downloaded time v0.1.45
  Downloaded num-traits v0.2.15
  Downloaded chrono v0.4.23
  Downloaded core-foundation-sys v0.8.3
  Downloaded 7 crates (338.9 KB) in 1.36s
   Compiling autocfg v1.1.0
   Compiling core-foundation-sys v0.8.3
   Compiling time v0.1.45
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling iana-time-zone v0.1.53
   Compiling chrono v0.4.23
   Compiling carbonyl v0.0.1 (/Users/user/carbonyl/carbonyl)
    Finished release [optimized] target(s) in 17.40s
[0/1] Regenerating ninja files
[25178/25178] LINK ./headless_shell

But can't find out folder

@fathyb
Copy link
Owner

fathyb commented Feb 1, 2023

Do you mean the executable? It should be in chromium/src/out/Default/headless_shell, you can also run using ./scripts/run.sh Default

@AlexPeregudov
Copy link
Author

Awesome! It's work on MacOS.

For Raspberry PI 4 - I need to build with the target_cpu="arm64" ?

@fathyb
Copy link
Owner

fathyb commented Feb 1, 2023

Yep! For the RPi you need to do it from Linux though, and the RPi needs to be a 64-bit model. If you don't need to make any changes you can skip the build and extract the binaries directly from Docker, see #21 (comment)

@bardbess
Copy link

bardbess commented Feb 1, 2023

I removed the conditional block from chromium/src/net/cert/x509_util_apple.cc

   // if (__builtin_available(macOS 12.0, iOS 15.0, *)) {
   //   return base::ScopedCFTypeRef<CFArrayRef>(  
   //       SecTrustCopyCertificateChain(trust));        
   // }

And tried running ./scripts/build.sh Default again.

This time hitting a more complicated dependency that is not so easy to comment out (yet another macOS 12+ addition).

May need to specify minimum macOS Monterey, though I guess it's a moving target if you want the latest version of chromium.

fatal error: 'ScreenCaptureKit/ScreenCaptureKit.h' file not found

    Finished release [optimized] target(s) in 0.19s
[8330/17579] OBJCXX obj/content/browser/browser/screen_capture_kit_device_mac.o
FAILED: obj/content/browser/browser/screen_capture_kit_device_mac.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/browser/browser/screen_capture_kit_device_mac.o.d -DDCHECK_ALWAYS_ON=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCR_XCODE_VERSION=1251 -DCR_CLANG_REVISION=\"llvmorg-16-init-14635-ga650f2ec-1\" -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=7c5e4b4eb3c5970f5525f62650c5b76f56dd99a8 -D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1 -D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DCONTENT_IMPLEMENTATION -DV8_USE_EXTERNAL_STARTUP_DATA -DENABLE_IPC_FUZZER -DWEBP_EXTERN=extern -DUSE_EGL -DVK_USE_PLATFORM_METAL_EXT -DLIBYUV_DISABLE_NEON -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_BUILD_FOR_MAC -DSK_METAL -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -DLEVELDB_PLATFORM_CHROMIUM=1 -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DABSL_ALLOCATOR_NOTHROW=1 -DLOGGING_INSIDE_WEBRTC -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_SANDBOX -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DCPPGC_YOUNG_GENERATION -DCPPGC_POINTER_COMPRESSION -DSQLITE_OMIT_ANALYZE -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOMATIC_INDEX -DSQLITE_OMIT_AUTORESET -DSQLITE_OMIT_COMPILEOPTION_DIAGS -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_INTROSPECTION_PRAGMAS -DSQLITE_DEFAULT_LOOKASIDE=0,0 -DSQLITE_OMIT_LOOKASIDE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_REINDEX -DSQLITE_OMIT_TRACE -DSQLITE_OMIT_UPSERT -DSQLITE_OMIT_WINDOWFUNC -DSQLITE_ENABLE_FTS3 -DSQLITE_DISABLE_FTS3_UNICODE -DSQLITE_DISABLE_FTS4_DEFERRED -DSQLITE_ENABLE_ICU -DSQLITE_SECURE_DELETE -DSQLITE_THREADSAFE=1 -DSQLITE_MAX_WORKER_THREADS=0 -DSQLITE_MAX_MMAP_SIZE=268435456 -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 -DSQLITE_DEFAULT_LOCKING_MODE=1 -DSQLITE_DEFAULT_MEMSTATUS=1 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_PCACHE_INITSZ=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_USE_ALLOCA -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_JSON -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_HAVE_ISNAN -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_LOCKING_STYLE=1 -DSQLITE_ENABLE_API_ARMOR -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/libwebp/src/src -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -Igen/third_party/private_membership/src -Igen/third_party/shell-encryption/src -Igen/components/policy/proto -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/ipcz/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/libwebm/source -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mesa_headers -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libaom/source/libaom -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default -I../../net/third_party/quiche/src -Igen/net/third_party/quiche/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -Igen/third_party/metrics_proto -I../../third_party/zlib -I../../v8/include -Igen/v8/include -I../../third_party/brotli/include -I../../third_party/distributed_point_functions -I../../third_party/distributed_point_functions/code -Igen/third_party/distributed_point_functions -I../../third_party/highway/src -I../../third_party/re2/src  -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -femit-dwarf-unwind=no-compact-unwind -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -fcomplete-member-pointers -arch x86_64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fno-omit-frame-pointer -g0 -isysroot ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -mmacos-version-min=10.13 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang raw-ref-template-as-trivial-member -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -DPROTOBUF_ALLOW_DEPRECATED=1 -Wobjc-missing-property-synthesis -std=c++20 -Wno-trigraphs -fobjc-call-cxx-cdtors -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -include obj/content/browser/browser/precompile.h-mm -c ../../content/browser/media/capture/screen_capture_kit_device_mac.mm -o obj/content/browser/browser/screen_capture_kit_device_mac.o
../../content/browser/media/capture/screen_capture_kit_device_mac.mm:7:9: fatal error: 'ScreenCaptureKit/ScreenCaptureKit.h' file not found
#import <ScreenCaptureKit/ScreenCaptureKit.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PLEASE submit a bug report to https://crbug.com and run tools/clang/scripts/process_crashreports.py (only works inside Google) which will upload a report and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/browser/browser/screen_capture_kit_device_mac.o.d -DDCHECK_ALWAYS_ON=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCR_XCODE_VERSION=1251 -DCR_CLANG_REVISION=\"llvmorg-16-init-14635-ga650f2ec-1\" -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=7c5e4b4eb3c5970f5525f62650c5b76f56dd99a8 -D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1 -D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DCONTENT_IMPLEMENTATION -DV8_USE_EXTERNAL_STARTUP_DATA -DENABLE_IPC_FUZZER -DWEBP_EXTERN=extern -DUSE_EGL -DVK_USE_PLATFORM_METAL_EXT -DLIBYUV_DISABLE_NEON -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_BUILD_FOR_MAC -DSK_METAL -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -DLEVELDB_PLATFORM_CHROMIUM=1 -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DABSL_ALLOCATOR_NOTHROW=1 -DLOGGING_INSIDE_WEBRTC -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_SANDBOX -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DCPPGC_YOUNG_GENERATION -DCPPGC_POINTER_COMPRESSION -DSQLITE_OMIT_ANALYZE -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_AUTOMATIC_INDEX -DSQLITE_OMIT_AUTORESET -DSQLITE_OMIT_COMPILEOPTION_DIAGS -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_INTROSPECTION_PRAGMAS -DSQLITE_DEFAULT_LOOKASIDE=0,0 -DSQLITE_OMIT_LOOKASIDE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_REINDEX -DSQLITE_OMIT_TRACE -DSQLITE_OMIT_UPSERT -DSQLITE_OMIT_WINDOWFUNC -DSQLITE_ENABLE_FTS3 -DSQLITE_DISABLE_FTS3_UNICODE -DSQLITE_DISABLE_FTS4_DEFERRED -DSQLITE_ENABLE_ICU -DSQLITE_SECURE_DELETE -DSQLITE_THREADSAFE=1 -DSQLITE_MAX_WORKER_THREADS=0 -DSQLITE_MAX_MMAP_SIZE=268435456 -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 -DSQLITE_DEFAULT_LOCKING_MODE=1 -DSQLITE_DEFAULT_MEMSTATUS=1 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_PCACHE_INITSZ=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_USE_ALLOCA -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_JSON -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_HAVE_ISNAN -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_LOCKING_STYLE=1 -DSQLITE_ENABLE_API_ARMOR -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/libwebp/src/src -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -Igen/third_party/private_membership/src -Igen/third_party/shell-encryption/src -Igen/components/policy/proto -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/ipcz/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/libwebm/source -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mesa_headers -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libaom/source/libaom -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default -I../../net/third_party/quiche/src -Igen/net/third_party/quiche/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -Igen/third_party/metrics_proto -I../../third_party/zlib -I../../v8/include -Igen/v8/include -I../../third_party/brotli/include -I../../third_party/distributed_point_functions -I../../third_party/distributed_point_functions/code -Igen/third_party/distributed_point_functions -I../../third_party/highway/src -I../../third_party/re2/src -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -femit-dwarf-unwind=no-compact-unwind -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -fcomplete-member-pointers -arch x86_64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fno-omit-frame-pointer -g0 -isysroot ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -mmacos-version-min=10.13 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang raw-ref-template-as-trivial-member -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -DPROTOBUF_ALLOW_DEPRECATED=1 -Wobjc-missing-property-synthesis -std=c++20 -Wno-trigraphs -fobjc-call-cxx-cdtors -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -include obj/content/browser/browser/precompile.h-mm -c ../../content/browser/media/capture/screen_capture_kit_device_mac.mm -o obj/content/browser/browser/screen_capture_kit_device_mac.o
1.	gen/media/capture/mojom/image_capture.mojom.h:190:53: current parser token ';'
2.	gen/media/capture/mojom/image_capture.mojom.h:39:1: parsing namespace 'media'
3.	gen/media/capture/mojom/image_capture.mojom.h:40:1: parsing namespace 'media::mojom'
4.	gen/media/capture/mojom/image_capture.mojom.h:180:1: parsing struct/union/class body 'media::mojom::Range'
5.	gen/media/capture/mojom/image_capture.mojom.h:188:39: parsing function body 'media::mojom::Range::New'
6.	gen/media/capture/mojom/image_capture.mojom.h:188:39: in compound statement ('{}')
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  clang++                  0x000000010774b4fe llvm::SmallVectorBase<unsigned long long>::replaceAllocation(void*, unsigned long, unsigned long, unsigned long) + 192174
1  clang++                  0x000000010774b2b6 llvm::SmallVectorBase<unsigned long long>::replaceAllocation(void*, unsigned long, unsigned long, unsigned long) + 191590
2  clang++                  0x000000010770a5f0 llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::printOptionValue(unsigned long, bool) const + 32144
3  clang++                  0x000000010770a7ea llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::printOptionValue(unsigned long, bool) const + 32650
4  libsystem_platform.dylib 0x00007fff20617d7d _sigtramp + 29
5  libsystem_platform.dylib 0x0000000000000001 _sigtramp + 18446603339972903585
6  clang++                  0x00000001059e35c6 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 83894
7  clang++                  0x0000000105a91dd8 llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>::getResultImpl(llvm::AnalysisKey*, llvm::LazyCallGraph::SCC&, llvm::LazyCallGraph&) + 5928
8  clang++                  0x0000000105b8aa0b llvm::DominatorTreeBase<llvm::MachineBasicBlock, false>::properlyDominates(llvm::MachineBasicBlock const*, llvm::MachineBasicBlock const*) const + 102939
9  clang++                  0x00000001059bb85b llvm::DominatorTreeBase<llvm::BasicBlock, false>::createChild(llvm::BasicBlock*, llvm::DomTreeNodeBase<llvm::BasicBlock>*) + 5883
10 clang++                  0x00000001059bb2ad llvm::DominatorTreeBase<llvm::BasicBlock, false>::createChild(llvm::BasicBlock*, llvm::DomTreeNodeBase<llvm::BasicBlock>*) + 4429
11 clang++                  0x0000000105bfbfc8 llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getExitBlocks(llvm::SmallVectorImpl<llvm::BasicBlock*>&) const + 80888
12 clang++                  0x0000000105989d83 llvm::AnalysisManager<llvm::Function>::getResultImpl(llvm::AnalysisKey*, llvm::Function&) + 13635
13 clang++                  0x00000001059ca4b8 llvm::DominatorTreeBase<llvm::BasicBlock, false>::createChild(llvm::BasicBlock*, llvm::DomTreeNodeBase<llvm::BasicBlock>*) + 66392
14 clang++                  0x00000001059db5fc llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 51180
15 clang++                  0x00000001059db241 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 50225
16 clang++                  0x00000001059dafbe llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 49582
17 clang++                  0x0000000105d4bf2e llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getExitingBlock() const + 27454
18 clang++                  0x0000000105e2a023 llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::isLoopExiting(llvm::BasicBlock const*) const + 97683
19 clang++                  0x0000000105c0410c llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::hasDedicatedExits() const + 2764
20 clang++                  0x0000000105b76389 llvm::DominatorTreeBase<llvm::MachineBasicBlock, false>::properlyDominates(llvm::MachineBasicBlock const*, llvm::MachineBasicBlock const*) const + 19353
21 clang++                  0x0000000105b7613d llvm::DominatorTreeBase<llvm::MachineBasicBlock, false>::properlyDominates(llvm::MachineBasicBlock const*, llvm::MachineBasicBlock const*) const + 18765
22 clang++                  0x0000000105ccccd5 llvm::DominatorTreeBase<llvm::BasicBlock, true>::updateDFSNumbers() const + 71381
23 clang++                  0x0000000105dcf42f llvm::IntervalMap<llvm::SlotIndex, llvm::LiveInterval const*, 8u, llvm::IntervalMapInfo<llvm::SlotIndex>>::deleteNode(llvm::IntervalMapImpl::NodeRef, unsigned int) + 288271
24 clang++                  0x0000000105e7f4c2 llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getUniqueExitBlock() const + 147250
25 clang++                  0x0000000105bb8188 llvm::DominatorTreeBase<llvm::MachineBasicBlock, true>::createChild(llvm::MachineBasicBlock*, llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*) + 40136
26 clang++                  0x0000000105cccc48 llvm::DominatorTreeBase<llvm::BasicBlock, true>::updateDFSNumbers() const + 71240
27 clang++                  0x0000000105dcf42f llvm::IntervalMap<llvm::SlotIndex, llvm::LiveInterval const*, 8u, llvm::IntervalMapInfo<llvm::SlotIndex>>::deleteNode(llvm::IntervalMapImpl::NodeRef, unsigned int) + 288271
28 clang++                  0x0000000105e7f4c2 llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getUniqueExitBlock() const + 147250
29 clang++                  0x0000000105bb8188 llvm::DominatorTreeBase<llvm::MachineBasicBlock, true>::createChild(llvm::MachineBasicBlock*, llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*) + 40136
30 clang++                  0x0000000105cccc48 llvm::DominatorTreeBase<llvm::BasicBlock, true>::updateDFSNumbers() const + 71240
31 clang++                  0x0000000105f83918 llvm::LoopInfoBase<llvm::BasicBlock, llvm::Loop>::getLoopsInReverseSiblingPreorder() const + 389592
32 clang++                  0x0000000105f83566 llvm::LoopInfoBase<llvm::BasicBlock, llvm::Loop>::getLoopsInReverseSiblingPreorder() const + 388646
33 clang++                  0x0000000106677900 llvm::Pass* llvm::callDefaultCtor<llvm::LiveIntervals>() + 375696
34 clang++                  0x00000001066773a6 llvm::Pass* llvm::callDefaultCtor<llvm::LiveIntervals>() + 374326
35 clang++                  0x00000001066178af llvm::Pass* llvm::callDefaultCtor<llvm::MachineTraceMetrics>() + 20271
36 clang++                  0x000000010657a2a6 llvm::Pass* llvm::callDefaultCtor<MachineSanitizerBinaryMetadata>() + 33798
37 clang++                  0x0000000105fb53a3 llvm::LoopInfoBase<llvm::BasicBlock, llvm::Loop>::getLoopsInReverseSiblingPreorder() const + 592995
38 clang++                  0x0000000107c19a97 llvm::Pass* llvm::callDefaultCtor<llvm::UnifyFunctionExitNodesLegacyPass>() + 4529207
39 clang++                  0x00000001064940b7 llvm::Pass* llvm::callDefaultCtor<llvm::DominatorTreeWrapperPass>() + 41143
40 clang++                  0x0000000106493f08 llvm::Pass* llvm::callDefaultCtor<llvm::DominatorTreeWrapperPass>() + 40712
41 clang++                  0x0000000106648472 llvm::Pass* llvm::callDefaultCtor<llvm::LiveIntervals>() + 182018
42 clang++                  0x0000000106647f96 llvm::Pass* llvm::callDefaultCtor<llvm::LiveIntervals>() + 180774
43 clang++                  0x0000000106647b68 llvm::Pass* llvm::callDefaultCtor<llvm::LiveIntervals>() + 179704
44 clang++                  0x000000010647a65f llvm::DominatorTreeBase<llvm::BasicBlock, false>::changeImmediateDominator(llvm::BasicBlock*, llvm::BasicBlock*) + 46831
45 libdyld.dylib            0x00007fff205edf3d start + 1
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 16.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project a650f2ec7a37cf1f495108bbb313e948c232c29c)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: ../../third_party/llvm-build/Release+Asserts/bin
clang++: note: diagnostic msg: Error generating preprocessed source(s).
[8339/17579] OBJCXX obj/content/browser/browser/web_contents_view_mac.o
ninja: build stopped: subcommand failed.

@bardbess
Copy link

bardbess commented Feb 1, 2023

ScreenCaptureKit is required for headless shell by carbonyl confirming my earlier comment.

minimum requirements currently is macOS Monterey (12.3).

./scripts/build.sh Default

Finished release [optimized] target(s) in 0.08s
[5027/9381] CXX obj/third_party/blink/renderer/core/core/list_item_painter.o
[9381/9381] LINK ./headless_shell
FAILED: headless_shell 
TOOL_VERSION=1675162727 ../../build/toolchain/apple/linker_driver.py -Wcrl,strippath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -Wcrl,installnametoolpath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool ../../third_party/llvm-build/Release+Asserts/bin/clang++ -B /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/  -Wl,-no_compact_unwind -Werror -Wl,-fatal_warnings -arch x86_64 -no-canonical-prefixes -Wl,-dead_strip -nostdlib++ -isysroot ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -mmacos-version-min=10.13 -Wl,-ObjC -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib -o "./headless_shell" "@./headless_shell.rsp"
ld: framework not found ScreenCaptureKit
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
  File "carbonyl/chromium/src/out/Default/../../build/toolchain/apple/linker_driver.py", line 400, in <module>
    LinkerDriver(sys.argv).run()
  File "carbonyl/chromium/src/out/Default/../../build/toolchain/apple/linker_driver.py", line 156, in run
    subprocess.check_call(compiler_driver_args, env=env)
  File "/usr/local/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['../../third_party/llvm-build/Release+Asserts/bin/clang++', '-B', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/', '-Wl,-no_compact_unwind', '-Werror', '-Wl,-fatal_warnings', '-arch', 'x86_64', '-no-canonical-prefixes', '-Wl,-dead_strip', '-nostdlib++', '-isysroot', '../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk', '-mmacos-version-min=10.13', '-Wl,-ObjC', '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib', '-o', './headless_shell', '@./headless_shell.rsp']' returned non-zero exit status 1.
ninja: build stopped: subcommand failed.

Just another comment which might explain why "Fullscreen mode not supported yet".

In the file chromium/src/content/browser/media/capture/screen_capture_kit_device_mac.mm even though the screen capture kit is loaded it has a condition around full screen mode limiting the feature to macOS Ventura (13.0)

  // Desktop capture is not working in macOS < 13, see https:://crbug.com/1352441.    
  bool IsScreenCaptureKitDesktopWorking(void) {    
    if (@available(macOS 13.0, *)) {                                                                                                                                                  
      return true;      
    } else {      
      return false;    
    }    
  }

...

std::unique_ptr<media::VideoCaptureDevice> CreateScreenCaptureKitDeviceMac(    
      const DesktopMediaID& source) {    
    switch (source.type) {    
      case DesktopMediaID::TYPE_SCREEN:    
        if (!IsScreenCaptureKitDesktopWorking())    
          return nullptr;    
        // ScreenCaptureKitDeviceMac only supports a single display at a time. It    
        // will not stitch desktops together.    
        // https://crbug.com/1178360    
        if (source.id == webrtc::kFullDesktopScreenId ||    
            source.id == webrtc::kInvalidScreenId) {       
          return nullptr;       
        }       
        break;    
      case DesktopMediaID::TYPE_WINDOW:    
        break;    

...

So it seems you can probably get full-screen working on the latest version of OSX.

@fathyb
Copy link
Owner

fathyb commented Feb 4, 2023

I'm closing this now that we have CI and binaries available.

@fathyb fathyb closed this as completed Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants