Unable to compile by following MasterBuildQuickStart

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Unable to compile by following MasterBuildQuickStart

Postby mck » Thu May 12, 2022 10:54 am

Hi, I'm new here and this is my first post, so I apologize in advance if I do not include all the obvious information needed.

I have, in the past, successfully built the project by following the https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart. Last time I did so was v.86 (4240) so it's been a while.

My setup is:
    Win10 64bit
    VS 2019 v.16.11.2 (other VS versions are also installed)
    Win 10 v.10.0.19041.685 SDK (other Win 10 SDK's are also installed)
    Ninja v.1.8.2

I follow the "Windows Setup" section of MasterBuildQuickStart but get an error in step 7 when running create.bat.
The error:
Code: Select all
Generating CEF project files...
Traceback (most recent call last):
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 268, in <module>
    sys.exit(main())
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 257, in main
    output = BuildOutput(sys.argv[1:])
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 249, in BuildOutput
    values = GenerateValues(options, evals)
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 199, in GenerateValues
    values = FetchValues(options.file, options.official)
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 61, in FetchValues
    FetchValuesFromFile(lastchange_values, lastchange_filename)
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 29, in FetchValuesFromFile
    for line in open(file_name, 'r').readlines():
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\code\\chromium_git\\chromium\\src\\build\\util\\LASTCHANGE'
ERROR at //build/util/version.gni:73:11: Script returned non-zero exit code.
_result = exec_script("version.py",
          ^----------
Current dir: c:/code/chromium_git/chromium/src/out/Debug_GN_x64/
Command: c:/code/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python3/bin/python3.exe c:/code/chromium_git/chromium/src/build/util/version.py -f ../../chrome/VERSION -t "full = \"@MAJOR@.@MINOR@.@BUILD@.@PATCH@\" major = \"@MAJOR@\" minor = \"@MINOR@\" build = \"@BUILD@\" patch = \"@PATCH@\" " --os win
Returned 1.
See //ui/gl/features.gni:8:1: whence it was imported.
import("//build/util/version.gni")
^--------------------------------
See //BUILD.gn:36:1: whence it was imported.
import("//ui/gl/features.gni")
^----------------------------
Traceback (most recent call last):
  File "tools\gclient_hook.py", line 146, in <module>
    RunAction(src_dir, cmd)
  File "c:\code\chromium_git\chromium\src\cef\tools\gclient_util.py", line 36, in RunAction
    command, cwd=dir, always_show_header=True, print_stdout=True)
  File "c:\code\depot_tools\gclient_utils.py", line 683, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), command_output.getvalue(), None)
subprocess2.CalledProcessError: Command 'gn gen out\\Debug_GN_x64 --ide=vs2019 --sln=cef --filters=//cef/*' returned non-zero exit status 1 in c:\code\chromium_git\chromium\src
Traceback (most recent call last):
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 268, in <module>
    sys.exit(main())
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 257, in main
    output = BuildOutput(sys.argv[1:])
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 249, in BuildOutput
    values = GenerateValues(options, evals)
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 199, in GenerateValues
    values = FetchValues(options.file, options.official)
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 61, in FetchValues
    FetchValuesFromFile(lastchange_values, lastchange_filename)
  File "c:/code/chromium_git/chromium/src/build/util/version.py", line 29, in FetchValuesFromFile
    for line in open(file_name, 'r').readlines():
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\code\\chromium_git\\chromium\\src\\build\\util\\LASTCHANGE'
ERROR at //build/util/version.gni:73:11: Script returned non-zero exit code.
_result = exec_script("version.py",
          ^----------
Current dir: c:/code/chromium_git/chromium/src/out/Debug_GN_x64/
Command: c:/code/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python3/bin/python3.exe c:/code/chromium_git/chromium/src/build/util/version.py -f ../../chrome/VERSION -t "full = \"@MAJOR@.@MINOR@.@BUILD@.@PATCH@\" major = \"@MAJOR@\" minor = \"@MINOR@\" build = \"@BUILD@\" patch = \"@PATCH@\" " --os win
Returned 1.
See //ui/gl/features.gni:8:1: whence it was imported.
import("//build/util/version.gni")
^--------------------------------
See //BUILD.gn:36:1: whence it was imported.
import("//ui/gl/features.gni")
^----------------------------


I have also tried with --branch=4951 in step 6. Then step 7 gives the following error:

Code: Select all
Generating CEF project files...
Creating c:\code\chromium_git\chromium\src\out\Debug_GN_x64 directory.
c:\code\chromium_git\chromium\.gclient_entries missing, .gclient file in parent directory c:\code\chromium_git\chromium might not be the file you want to use.
c:\code\chromium_git\chromium\.gclient_entries missing, .gclient file in parent directory c:\code\chromium_git\chromium might not be the file you want to use.
gn.py: Could not find gn executable at: c:\code\chromium_git\chromium\src\buildtools\win\gn.exe
Traceback (most recent call last):
  File "tools\gclient_hook.py", line 146, in <module>
    RunAction(src_dir, cmd)
  File "c:\code\chromium_git\chromium\src\cef\tools\gclient_util.py", line 36, in RunAction
    command, cwd=dir, always_show_header=True, print_stdout=True)
  File "c:\code\depot_tools\gclient_utils.py", line 683, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), command_output.getvalue(), None)
subprocess2.CalledProcessError: Command 'gn gen out\\Debug_GN_x64 --ide=vs2019 --sln=cef --filters=//cef/*' returned non-zero exit status 2 in c:\code\chromium_git\chromium\src
c:\code\chromium_git\chromium\.gclient_entries missing, .gclient file in parent directory c:\code\chromium_git\chromium might not be the file you want to use.
c:\code\chromium_git\chromium\.gclient_entries missing, .gclient file in parent directory c:\code\chromium_git\chromium might not be the file you want to use.
gn.py: Could not find gn executable at: c:\code\chromium_git\chromium\src\buildtools\win\gn.exe


My goal is to compile version 101 (4951) - any pointers you might be able to provide would be much appreciated!
mck
Newbie
 
Posts: 3
Joined: Thu May 12, 2022 2:40 am

Re: Unable to compile by following MasterBuildQuickStart

Postby magreenblatt » Thu May 12, 2022 1:31 pm

The errors say that files are missing. Are those files missing?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to compile by following MasterBuildQuickStart

Postby mck » Sat May 14, 2022 2:02 am

magreenblatt wrote:The errors say that files are missing. Are those files missing?

For version 101 (4951) "c:\code\chromium_git\chromium\src\buildtools\win\gn.exe" is not there. The only file in that dir is "clang-format.exe.sha1"
mck
Newbie
 
Posts: 3
Joined: Thu May 12, 2022 2:40 am

Re: Unable to compile by following MasterBuildQuickStart

Postby magreenblatt » Sat May 14, 2022 3:36 am

Something likely failed when you ran automate_git.py. Try the manual steps here: https://bitbucket.org/chromiumembedded/ ... e-failures
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to compile by following MasterBuildQuickStart

Postby mck » Tue May 17, 2022 6:38 am

So I started over, and tried MasterBuildQuickStart witohout targeting a specific version. I stopped after step 6 and ran this: c:\code\chromium_git>python ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --no-distrib --no-build
which did not seem to result in errors - Here is the output:
Code: Select all
--> Download Directory: c:\code\chromium_git
--> Depot Tools Directory: c:\code\depot_tools
--> Updating depot_tools
-------- Running "update_depot_tools.bat" in "c:\code\depot_tools"...
-------- Running "c:\code\depot_tools\git.bat config --get remote.origin.url" in "c:\code\chromium_git\cef"...
--> CEF Branch: master
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: c:\code\chromium_git\cef
-------- Running "c:\code\depot_tools\git.bat rev-parse HEAD" in "c:\code\chromium_git\cef"...
-------- Running "c:\code\depot_tools\git.bat fetch" in "c:\code\chromium_git\cef"...
-------- Running "c:\code\depot_tools\git.bat rev-parse origin/master" in "c:\code\chromium_git\cef"...
--> CEF Current Checkout: 2dcee2ccfc2f69f05ed496b5f2514081adb0b518
--> CEF Desired Checkout: 2dcee2ccfc2f69f05ed496b5f2514081adb0b518 (origin/master)
--> Reading c:\code\chromium_git\cef\CHROMIUM_BUILD_COMPATIBILITY.txt
--> CEF Output Directory: c:\code\chromium_git\out_master
-------- Running "c:\code\depot_tools\git.bat config --get remote.origin.url" in "c:\code\chromium_git\chromium\src"...
--> Chromium URL: https://chromium.googlesource.com/chromium/src.git
-------- Running "c:\code\depot_tools\git.bat fetch" in "c:\code\chromium_git\chromium\src"...
remote: Finding sources: 100% (5641/5641)
remote: Total 5641 (delta 3033), reused 5382 (delta 3033)
Receiving objects: 100% (5641/5641), 9.92 MiB | 13.92 MiB/s, done.
Resolving deltas: 100% (3033/3033), completed with 1113 local objects.
From https://chromium.googlesource.com/chromium/src
   24c9f7978206b..97312e50f9d05  lkgr                       -> origin/lkgr
   9cbe99ccf2e21..ea8700c4f799d  lkgr-android-internal      -> origin/lkgr-android-internal
   9cbe99ccf2e21..a12ccfc2897be  main                       -> origin/main
   f9c6cfd687b4a..1cc90dc55468e  refs/branch-heads/4664_110 -> branch-heads/4664_110
   dded79b5dfbee..c407cf319e867  refs/branch-heads/4896     -> branch-heads/4896
   46bfb20f455b7..33314a99aad77  refs/branch-heads/4951     -> branch-heads/4951
   8ea5bf35f7f4d..019a3d4a6a1a9  refs/branch-heads/5005     -> branch-heads/5005
   073242d91d57c..3b5dc3043002b  refs/branch-heads/5060     -> branch-heads/5060
   4a382a54ec1b6..f9e5f6e7641b0  refs/branch-heads/5066     -> branch-heads/5066
 * [new ref]                     refs/branch-heads/5067     -> branch-heads/5067
-------- Running "c:\code\depot_tools\git.bat fetch --tags" in "c:\code\chromium_git\chromium\src"...
remote: Finding sources: 100% (30/30)
remote: Total 30 (delta 12), reused 30 (delta 12)
Unpacking objects: 100% (30/30), 134.02 KiB | 290.00 KiB/s, done.
From https://chromium.googlesource.com/chromium/src
 * [new tag]                     100.0.4896.172 -> 100.0.4896.172
 * [new tag]                     100.0.4896.173 -> 100.0.4896.173
 * [new tag]                     101.0.4951.70  -> 101.0.4951.70
 * [new tag]                     102.0.5005.56  -> 102.0.5005.56
 * [new tag]                     102.0.5005.57  -> 102.0.5005.57
 * [new tag]                     103.0.5060.7   -> 103.0.5060.7
 * [new tag]                     103.0.5060.8   -> 103.0.5060.8
 * [new tag]                     104.0.5066.2   -> 104.0.5066.2
 * [new tag]                     104.0.5067.0   -> 104.0.5067.0
 * [new tag]                     104.0.5067.1   -> 104.0.5067.1
-------- Running "c:\code\depot_tools\git.bat rev-parse HEAD" in "c:\code\chromium_git\chromium\src"...
-------- Running "c:\code\depot_tools\git.bat rev-parse refs/tags/102.0.5005.0" in "c:\code\chromium_git\chromium\src"...
--> Chromium Current Checkout: 8de62243dedae3eab18f21708dd87db0a66ef45e
--> Chromium Desired Checkout: 8de62243dedae3eab18f21708dd87db0a66ef45e (refs/tags/102.0.5005.0)


I'm a bit unsure as to what to run from the description here: https://bitbucket.org/chromiumembedded/cef/wiki/ChromiumUpdate.md#markdown-header-resolving-automate_gitpy-update-failures - I guess I do not need to when the above "automate-git.py" ran without errors? - can you elaborate?
I tried running: python ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --run-tests --build-failure-limit=1000 --fast-update --force-cef-update

But that resulted in some errors, and I'm now unsure as to the state of the repo so now I'm trying again with a clean slate.
mck
Newbie
 
Posts: 3
Joined: Thu May 12, 2022 2:40 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 55 guests