chromiumgn

gn: Unresolved dependencies


I'm attempting to build Chromium on Ubuntu 22.04. I've cloned the git repo, checked out the 102.0.5005.59 branch, added the depot_tools directory to PATH, and run

fetch --nohooks chromium
./build/install-build-deps.sh --no-chromeos-fonts
./build/install-build-deps-android.sh --no-chromeos-fonts
gclient runhooks

I then attempted to generate the ninja files by running gn args out/Default and setting

is_debug = false
is_clang = true
symbol_level = 2
dcheck_always_on = false
is_component_build = false
target_os = "android"
target_cpu = "arm64"
blink_symbol_level = 0
v8_symbol_level = 0
ignore_elf32_limitations = true

as the build parameters. However, this failed with

Generating files...
ERROR Unresolved dependencies.
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes(//build/toolchain/android:android_clang_arm64)
  needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__assetres(//build/toolchain/android:android_clang_arm64)
  needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__assetres(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__build_config_crbug_908819(//build/toolchain/android:android_clang_arm64)
  needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__build_config_crbug_908819(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__dex(//build/toolchain/android:android_clang_arm64)
  needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__header(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__dex(//build/toolchain/android:android_clang_arm64)
  needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__impl(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__header(//build/toolchain/android:android_clang_arm64)
  needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__header(//build/toolchain/android:android_clang_arm64)
//third_party/androidx:androidx_test_espresso_espresso_contrib_java__classes__process_host(//build/toolchain/android:android_clang_arm64)
  needs //third_party/android_deps:com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java__impl(//build/toolchain/android:android_clang_arm64)
//third_party/webrtc_overrides:webrtc_component(//build/toolchain/android:android_clang_arm)
  needs //third_party/webrtc/rtc_base:rtc_base_approved(//build/toolchain/android:android_clang_arm)
//third_party/webrtc_overrides:webrtc_component(//build/toolchain/android:android_clang_arm64)
  needs //third_party/webrtc/rtc_base:rtc_base_approved(//build/toolchain/android:android_clang_arm64)
//third_party/webrtc_overrides:webrtc_component(//build/toolchain/linux:clang_x64)
  needs //third_party/webrtc/rtc_base:rtc_base_approved(//build/toolchain/linux:clang_x64)

What's weird is, if I do the same with the 103.0.5060.22 branch, then everything works perfectly. What am I missing?


Solution

  • Looks like you missed to pull all the third-party dependencies needed for Chromium to compile. You should run the following command after checking out or switching to another branch/version/tag of Chromium as each branch/version/tag could have different versions of third-party dependencies:

    gclient sync
    

    Now start the compilation process