Error while giving gn gen command for building chromium

661 views
Skip to first unread message

Venkat Satish

unread,
Apr 1, 2024, 3:10:16 PM4/1/24
to Chromium-dev
Hi,
HI All I am building the latest Chromium and webview apk on my ubuntu system. Below are the command that I usually follow:
2) mkdir Chromium_Webview_Clean
3) cd Chromium_Webview_Clean
5) export PATH="$PATH:/path/to/depot_tools"
6) mkdir Go_to_your_chromium_dir
7) cd Go_to_your_chromium_dir
8) fetch --nohooks android
9) cd src
10) git fetch --tags
11)git fetch origin my_stable_branch(example 72.0.3617.105 from https://omahaproxy.appspot.com/)
12)git checkout -b my_stable_branch FETCH_HEAD
13)gclient sync --with_branch_heads
14) sudo ./build/install-build-deps-android.sh
15)gclient runhooks
22)for Chromium
gn gen --args='target_os="android" target_cpu="arm64" android_channel="stable" is_debug=false is_component_build = false is_official_build=true is_chrome_branded=false use_official_google_api_keys=false enable_resource_whitelist_generation=true ffmpeg_branding="Chrome" proprietary_codecs=true enable_remoting=true' out/chromium_browser_arm64_85
23)autoninja -C out/chromium_browser_arm64_85 chrome_public_apk
after giving the command number 22 I am getting error:
ERROR at //build/config/compiler/pgo/BUILD.gn:115:23: Script returned non-zero exit code.
      pgo_data_path = exec_script("//tools/update_pgo_profiles.py",
                      ^----------
Current dir: /home/zebra/Documents/chromium_webview/chromium/src/out/Default/
Command: python3 /home/zebra/Documents/chromium_webview/chromium/src/tools/update_pgo_profiles.py --target android-arm64 get_profile_path
Returned 1.
stderr:
Traceback (most recent call last):
  File "/chromium_webview/chromium/src/tools/update_pgo_profiles.py", line 166, in <module>
    sys.exit(main())
  File "/hs/chromium_webview/chromium/src/tools/update_pgo_profiles.py", line 162, in main
    return args.func(args)
  File "/_webview/chromium/src/tools/update_pgo_profiles.py", line 106, in _get_profile_path
    raise RuntimeError(
RuntimeError: requested profile "/chromium_webview/chromium/src/chrome/build/pgo_profiles/chrome-android64-main-1711590900-73c18e8a828d57831be416d14ea3581849225f77-cffb5113bf2f3cbd11c204d691f3631b9ee96e71.profdata" doesn't exist, please make sure "checkout_pgo_profiles" is set to True in the "custom_vars" section of your .gclient file, e.g.:
solutions = [
  {
    "name": "src",
    # ...
    "custom_vars": {
      "checkout_pgo_profiles": True,
    },
  },
],
and then run "gclient runhooks" to download it. You can also simply disable the PGO optimizations by setting |chrome_pgo_phase = 0| in your GN arguments.
See //build/config/BUILDCONFIG.gn:351:3: which caused the file to be included.
  "//build/config/compiler/pgo:default_pgo_flags",

can anyone help on this?

Thanks,
Venkat Satish A

Muralitharan Perumal

unread,
May 29, 2024, 9:58:25 AM5/29/24
to Chromium-dev, Venkat Satish
Hi Venkat,

It's clear from the error message, please add ' chrome_pgo_phase = 0 ' to the args list. I hope you might have tried that already.

Thanks
-M
Reply all
Reply to author
Forward
0 new messages