Can't build CEF

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.

Can't build CEF

Postby finder2 » Thu Aug 17, 2023 5:58 am

I'm trying to rebuild and update my client with codecs support, but it fails at
update_depot_tools.bat

It says that
gomacc.exe has stopped working
A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available.


CMD output:
c:\code\depot_tools>update_depot_tools.bat
Updating depot_tools...
Downloading CIPD client for windows-amd64 from https://chrome-infra-packages.appspot.c ... 66f0a38b...
Traceback (most recent call last):
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2383, in <module>
sys.exit(main())
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2377, in main
goma = GetGomaDriver()
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2373, in GetGomaDriver
return GomaDriver(env)
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 532, in __init__
self._env.GetGomaTmpDir())
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 1499, in GetGomaTmpDir
self._goma_tmp_dir = _CheckOutput([self._gomacc_binary, 'tmp_dir'],
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 416, in _CheckOutput
return PopenWithCheck(args,
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 403, in communicate
raise CalledProcessError(
__main__.CalledProcessError: Command returned non-zero exit status 3221226505


How can I fix it?
finder2
Mentor
 
Posts: 51
Joined: Fri Jun 13, 2014 1:33 am

Re: Can't build CEF

Postby magreenblatt » Thu Aug 17, 2023 8:39 am

Have you built CEF/Chromium successfully on this machine previously? If so, perhaps a downloaded file has become corrupted. You might try a new/clean download of depot_tools.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Can't build CEF

Postby magreenblatt » Thu Aug 17, 2023 8:41 am

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Can't build CEF

Postby finder2 » Thu Aug 17, 2023 9:03 am

magreenblatt wrote:Have you built CEF/Chromium successfully on this machine previously? If so, perhaps a downloaded file has become corrupted. You might try a new/clean download of depot_tools.

Yep, I built CEF many times, but Windows 10 was 1803, now I updated it up to 22H2 version.
finder2
Mentor
 
Posts: 51
Joined: Fri Jun 13, 2014 1:33 am

Re: Can't build CEF

Postby finder2 » Thu Aug 17, 2023 9:43 am

I managed to complete update_depot_tools.bat from my old depot_tools (2 years old), but when I run update.bat occurs similar error

c:\code\chromium_git>update.bat

c:\code\chromium_git>set GN_DEFINES=is_component_build=true is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome

c:\code\chromium_git>set GN_ARGUMENTS=--ide=vs2022 --sln=cef --filters=//cef/*

c:\code\chromium_git>python3 ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --no-distrib --no-build
--> 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"...
Updating depot_tools...
Traceback (most recent call last):
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2383, in <module>
sys.exit(main())
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2377, in main
goma = GetGomaDriver()
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2373, in GetGomaDriver
return GomaDriver(env)
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 532, in __init__
self._env.GetGomaTmpDir())
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 1499, in GetGomaTmpDir
self._goma_tmp_dir = _CheckOutput([self._gomacc_binary, 'tmp_dir'],
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 416, in _CheckOutput
return PopenWithCheck(args,
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 403, in communicate
raise CalledProcessError(
__main__.CalledProcessError: Command returned non-zero exit status 3221226505
Traceback (most recent call last):
File "..\automate\automate-git.py", line 1019, in <module>
raise Exception("Not a valid CEF Git checkout: %s" % (cef_dir))
Exception: Not a valid CEF Git checkout: c:\code\chromium_git\cef
c:\code\chromium_git>
finder2
Mentor
 
Posts: 51
Joined: Fri Jun 13, 2014 1:33 am

Re: Can't build CEF

Postby magreenblatt » Thu Aug 17, 2023 10:26 am

This doesn't fix the underlying issue, but you can stop depot_tools from updating an additional time by setting the DEPOT_TOOLS_UPDATE=0 environment variable.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Can't build CEF

Postby finder2 » Thu Aug 17, 2023 12:02 pm

I just tried to build it on my server on clean Windows 10 and Visual Studio community 2022 and got the same error on update_depot_tools.bat, but without "gomacc.exe has stopped working"

Microsoft Windows [Version 10.0.19045.3324]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Admin>cd c:\code\depot_tools

c:\code\depot_tools>update_depot_tools.bat
Updating depot_tools...
Downloading CIPD client for windows-amd64 from https://chrome-infra-packages.appspot.c ... 66f0a38b...
Traceback (most recent call last):
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2383, in <module>
sys.exit(main())
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2377, in main
goma = GetGomaDriver()
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 2373, in GetGomaDriver
return GomaDriver(env)
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 532, in __init__
self._env.GetGomaTmpDir())
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 1499, in GetGomaTmpDir
self._goma_tmp_dir = _CheckOutput([self._gomacc_binary, 'tmp_dir'],
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 416, in _CheckOutput
return PopenWithCheck(args,
File "c:\code\depot_tools\\.cipd_bin\goma_ctl.py", line 403, in communicate
raise CalledProcessError(
__main__.CalledProcessError: Command returned non-zero exit status 3221226505
c:\code\depot_tools>
finder2
Mentor
 
Posts: 51
Joined: Fri Jun 13, 2014 1:33 am

Re: Can't build CEF

Postby ndesktop » Fri Aug 18, 2023 2:54 am

I run into an update_depot_tools.bat error as well (not sure if it is the same error) on Windows 10 (branch 5563).
Anyways, what worked *for me* was manual editing of depot_tools/update_depot_tools.bat and commented out the goma_ctl.bat line
from
call "%~dp0\goma_ctl.bat" update_hook

to
:: call "%~dp0\goma_ctl.bat" update_hook

[/quote]
After this, the error went away and the build succeeded.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Can't build CEF

Postby finder2 » Fri Aug 18, 2023 11:05 am

ndesktop wrote:After this, the error went away and the build succeeded.


Thanks, it helped to complete update_depot_tools.bat and download CEF and Chromium at update.bat,
but it still fails at create.bat if I add codecs support

set GN_DEFINES=is_component_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2022 --sln=cef --filters=//cef/*
call cef_create_projects.bat



Output:

Apply win_light_mode_3534.patch in c:\code\chromium_git\chromium\src
10 0 base/win/dark_mode_support.cc
2 2 ui/native_theme/native_theme_win.cc
... already applied (skipping).

86 patches total (0 applied, 86 skipped, 0 failed)

Generating CEF project files...
Creating c:\code\chromium_git\chromium\src\out\Debug_GN_x64 directory.
Generating Visual Studio projects took 69944ms
Done. Made 18259 targets from 3366 files in 148112ms
Applying issue #1999 fix to c:\code\chromium_git\chromium\src\out\Debug_GN_x64\obj\cef\libcef.ninja
Creating c:\code\chromium_git\chromium\src\out\Release_GN_x64 directory.
Generating Visual Studio projects took 71035ms
Done. Made 18777 targets from 3365 files in 156886ms
Applying issue #1999 fix to c:\code\chromium_git\chromium\src\out\Release_GN_x64\obj\cef\libcef.ninja
Creating c:\code\chromium_git\chromium\src\out\Debug_GN_x86 directory.
Traceback (most recent call last):
File "c:/code/chromium_git/chromium/src/build/vs_toolchain.py", line 600, in <module>
sys.exit(main())
File "c:/code/chromium_git/chromium/src/build/vs_toolchain.py", line 596, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "c:/code/chromium_git/chromium/src/build/vs_toolchain.py", line 411, in CopyDlls
_CopyDebugger(target_dir, target_cpu)
File "c:/code/chromium_git/chromium/src/build/vs_toolchain.py", line 453, in _CopyDebugger
raise Exception('%s not found in "%s"\r\nYou must install '
Exception: dbghelp.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbghelp.dll"
You must install Windows 10 SDK version 10.0.22621.0 including the "Debugging Tools for Windows" feature.
ERROR at //build/toolchain/win/BUILD.gn:24:3: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py",
^----------
Current dir: c:/code/chromium_git/chromium/src/out/Debug_GN_x86/
Command: c:/code/depot_tools/bootstrap-2@3_8_10_chromium_26_bin/python3/bin/python3.exe c:/code/chromium_git/chromium/src/build/vs_toolchain.py copy_dlls c:/code/chromium_git/chromium/src/out/Debug_GN_x86 Debug x86
Returned 1 and printed out:

Copying C:\Windows\SysWOW64\msvcp140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\msvcp140.dll...
Copying C:\Windows\SysWOW64\vccorlib140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vccorlib140.dll...
Copying C:\Windows\SysWOW64\vcruntime140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vcruntime140.dll...
Copying C:\Windows\SysWOW64\msvcp140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\msvcp140d.dll...
Copying C:\Windows\SysWOW64\vccorlib140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vccorlib140d.dll...
Copying C:\Windows\SysWOW64\vcruntime140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vcruntime140d.dll...Copying C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\ucrt\ucrtbased.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\ucrtbased.dll...

See //BUILD.gn:81:1: which caused the file to be included.
group("gn_all") {
^----------------
Traceback (most recent call last):
File "tools\gclient_hook.py", line 149, 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 716, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), command_output.getvalue(), None)
subprocess2.CalledProcessError: Command 'gn gen out\\Debug_GN_x86 --ide=vs2022 --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/vs_toolchain.py", line 600, in <module>
sys.exit(main())
File "c:/code/chromium_git/chromium/src/build/vs_toolchain.py", line 596, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "c:/code/chromium_git/chromium/src/build/vs_toolchain.py", line 411, in CopyDlls
_CopyDebugger(target_dir, target_cpu)
File "c:/code/chromium_git/chromium/src/build/vs_toolchain.py", line 453, in _CopyDebugger
raise Exception('%s not found in "%s"\r\nYou must install '
Exception: dbghelp.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbghelp.dll"
You must install Windows 10 SDK version 10.0.22621.0 including the "Debugging Tools for Windows" feature.
ERROR at //build/toolchain/win/BUILD.gn:24:3: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py",
^----------
Current dir: c:/code/chromium_git/chromium/src/out/Debug_GN_x86/
Command: c:/code/depot_tools/bootstrap-2@3_8_10_chromium_26_bin/python3/bin/python3.exe c:/code/chromium_git/chromium/src/build/vs_toolchain.py copy_dlls c:/code/chromium_git/chromium/src/out/Debug_GN_x86 Debug x86
Returned 1 and printed out:

Copying C:\Windows\SysWOW64\msvcp140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\msvcp140.dll...
Copying C:\Windows\SysWOW64\vccorlib140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vccorlib140.dll...
Copying C:\Windows\SysWOW64\vcruntime140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vcruntime140.dll...
Copying C:\Windows\SysWOW64\msvcp140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\msvcp140d.dll...
Copying C:\Windows\SysWOW64\vccorlib140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vccorlib140d.dll...
Copying C:\Windows\SysWOW64\vcruntime140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vcruntime140d.dll...Copying C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\ucrt\ucrtbased.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\ucrtbased.dll...

See //BUILD.gn:81:1: which caused the file to be included.
group("gn_all") {
^----------------

c:\code\chromium_git\chromium\src\cef>
finder2
Mentor
 
Posts: 51
Joined: Fri Jun 13, 2014 1:33 am

Re: Can't build CEF

Postby magreenblatt » Fri Aug 18, 2023 11:34 am

Copying C:\Windows\SysWOW64\msvcp140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\msvcp140.dll...
Copying C:\Windows\SysWOW64\vccorlib140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vccorlib140.dll...
Copying C:\Windows\SysWOW64\vcruntime140.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vcruntime140.dll...
Copying C:\Windows\SysWOW64\msvcp140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\msvcp140d.dll...
Copying C:\Windows\SysWOW64\vccorlib140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vccorlib140d.dll...
Copying C:\Windows\SysWOW64\vcruntime140d.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\vcruntime140d.dll...
Copying C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\ucrt\ucrtbased.dll to c:/code/chromium_git/chromium/src/out/Debug_GN_x86\ucrtbased.dll...

Do these files exist for you?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 200 guests