Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

How to build the CEF binaries

igor666
Posts: 73
Joined: Fri Feb 08, 2019 1:25 pm

Re: How to build the CEF binaries

Post by igor666 »

Finally managed to build cef 6778, but through a crutch, I don’t know how these libraries will work, whether there will be errors, I’ll see in the near future, but the build was successful. I'll describe it here, maybe it will be useful to someone.
After an unsuccessful build, we see the following message:

Code: Select all

midl.exe output different from files in gen/chrome/updater/app/server/win, see C:\Temp\tmp7fer4a97
To rebaseline:
  copy /y C:\Temp\tmp32zc79mt\* ..\..\third_party\win_build_output\midl\chrome\updater\app\server\win\x86
[47807/51320] CXX obj/components/autofill/content/renderer/renderer/form_autofill_util.obj
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "c:\code\automate\automate-git.py", line 1397, in <module>
    run(command + build_path + target, chromium_src_dir, depot_tools_dir,
  File "c:\code\automate\automate-git.py", line 66, in run
    return subprocess.check_call(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "c:\code\depot_tools\bootstrap-2@3_11_8_chromium_35_bin\python3\bin\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['autoninja', '-C', 'out\\Release_GN_x86', 'cefclient']' returned non-zero exit
status 1.
The files in the "C:\Temp\tmp32zc79mt" folder are identical to the files in the "..\..\third_party\win_build_output\midl\chrome\updater\app\server\win\x86" folder, so copying, as stated in the message, does not brought positive results in the subsequent build. But the files from the folder "C:\Temp\tmp7fer4a97" are different, so I copied these files to the folder "..\..\third_party\win_build_output\midl\chrome\updater\app\server\win\x86" and after that build was successful.
But there is one peculiarity: after running the build script, apparently the script is checked and
copies the midl files into the folder "..\..\third_party\win_build_output\midl\chrome\updater\app\server\win\x86" due to which the error occurs, so the files from the temporary folder must be replaced after all script checks, for example, at the moment when ninja is launched, i.e. this message appears:

Code: Select all

clang_use_chrome_plugins=false
disable_fieldtrial_testing_config=true
enable_background_mode=false
enable_cdm_host_verification=true
enable_cdm_storage_id=true
enable_downgrade_processing=false
enable_nacl=false
enable_resource_allowlist_generation=false
enable_rlz=true
enable_widevine=true
is_component_build=false
is_debug=false
is_official_build=true
optimize_webui=true
target_cpu="x86"
-------- Running "autoninja -C out\Release_GN_x86 cefclient" in "c:\code\chromium_git\chromium\src"...
ninja: Entering directory `out\Release_GN_x86'
[1/2] ACTION //cef:args_gn_source(//build/toolchain/win:win_clang_x86)
After this, the build runs successfully, without the midl error.
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

Re: How to build the CEF binaries

Post by thefunkyjoint »

I've been building binaries without errors, probably the last 10 branches were flawless.

But i could not compile the 6778 brach ; it stops with errors after some hours. I'm asking for help on CEF forum, and when i find out the issue , i'll post further information here.
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to build the CEF binaries

Post by salvadordf »

I just read your post in the CEF forum and updated the information in the first post.
Thanks!!! :)
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

Re: How to build the CEF binaries

Post by thefunkyjoint »

I'm having the error below right after starting to build branch 6834 ; looks like something changed on the environment requisites ? :?

ERROR:root:Failed to bootstrap depot_tools.
Git was not found in PATH. Have you installed it?
Traceback (most recent call last):
File "e:\code\automate\automate-git.py", line 998, in <module>
run('update_depot_tools.bat', depot_tools_dir, depot_tools_dir)
File "e:\code\automate\automate-git.py", line 66, in run
return subprocess.check_call(
^^^^^^^^^^^^^^^^^^^^^^
File "e:\code\chromium_git\depot_tools\bootstrap-2@3_11_8_chromium_35_bin\python3\bin\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['update_depot_tools.bat']' returned non-zero exit status 1.
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to build the CEF binaries

Post by salvadordf »

The build scripts for the new branch don't have any new setting or switch.

Make sure to download the depot_tools again manually and try again.

The log has an error about Git. Is it installed and is it in your PATH ?
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

Re: How to build the CEF binaries

Post by thefunkyjoint »

I did not change anytning on my environment, i will have to look what is happening. Maybe is the recent major Windows update
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

Re: How to build the CEF binaries

Post by thefunkyjoint »

I had to reinstall GIT, looks like the Win update 24h2 messed with something ; now it's compiling :D
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to build the CEF binaries

Post by salvadordf »

I just updated the guide for the 7103 branch.
That branch requires VS2022 17.13.4 and Windows 10 SDK version 10.0.26100.3323
coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to build the CEF binaries

Post by coater »

Creating D:\code\chromium_git\chromium\src\out\Release_GN_x64 directory.
ERROR Need exactly one build directory to generate.
I expected something more like "gn gen out/foo"
You can also see "gn help gen".
Traceback (most recent call last):
File "D:\code\chromium_git\chromium\src\cef\tools\gclient_hook.py", line 154, in <module>
RunAction(src_dir, cmd)
File "D:\code\chromium_git\chromium\src\cef\tools\gclient_util.py", line 35, in RunAction
gclient_utils.CheckCallAndFilter(
File "D:\code\depot_tools\gclient_utils.py", line 733, in CheckCallAndFilter
raise subprocess2.CalledProcessError(rv, args, kwargs.get('cwd', None),
subprocess2.CalledProcessError: Command 'gn gen out\\Release_GN_x64 --ide=vs2022 --sln=cef --filters=//cef/* ' returned non-zero exit status 1 in D:\code\chromium_git\chromium\src
ERROR Need exactly one build directory to generate.
I expected something more like "gn gen out/foo"
You can also see "gn help gen".


------------------
set GN_DEFINES=ffmpeg_branding=Chrome proprietary_codecs=true is_official_build=true is_debug=false is_asan=true dcheck_always_on=true
set GN_ARGUMENTS=--ide=vs2022 --sln=cef --filters=//cef/*
call cef_create_projects.bat
--------------------
There is no problem to generate Debug_GN_x64, but when generating Release_GN_x64, this error happen!
Post Reply