Unable to build CEF master

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 build CEF master

Postby danielcigloo » Sun Mar 15, 2020 3:18 am

Hi

I had to rebuild cef from scratch, after formatting my pc.

Of course, building CEF from latest master branch (commit #f96cd1d), as instructed in MasterBuildQuickStart - it seems like some files are missing in chromium source (i guess they were removed in recent updates)

Specifically 'chromium_git/chromium/src/build/split_static_library.gni' (there may be more files missing, its the first error i encountered)

I have searched for 'split_static_library.gni' file in latest chromium source and couldnt find it.

Here is the full error information:
Code: Select all
....

Generating CEF project files...
ERROR at //v8/gni/v8.gni:8:1: Unable to load "C:/code/chromium_git/chromium/src/build/split_static_library.gni".
import("//build/split_static_library.gni")
^----------------------------------------
See //tools/v8_context_snapshot/v8_context_snapshot.gni:12:1: whence it was imported.
import("//v8/gni/v8.gni")
^-----------------------
See //services/BUILD.gn:7:1: whence it was imported.
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
^-----------------------------------------------------------
See //BUILD.gn:78:5: which caused the file to be included.
    "//services:services_unittests",
    ^------------------------------
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 645, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out\\Release_GN_x86 --ide=vs2019 --sln=cef --filters=//cef/*' returned non-zero exit status 1 in C:\code\chromium_git\chromium\src


I guess master branch should be modified to support recent chromium changes
danielcigloo
Newbie
 
Posts: 3
Joined: Wed Jan 01, 2020 4:13 am

Re: Unable to build CEF master

Postby magreenblatt » Sun Mar 15, 2020 9:02 am

You need to specify the cef target.
Code: Select all
ninja -C out\Debug_GN_x86 cef
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to build CEF master

Postby danielcigloo » Sun Mar 15, 2020 9:12 am

thank you, i dont know how i could have missed that :/

however, theres another error now:
Code: Select all
ImportError: No module named jinja2


full error:
Code: Select all
c:\code\chromium_git\chromium\src>ninja -C out\Release_GN_x64 cef
ninja: Entering directory `out\Release_GN_x64'
[117/912] ACTION //third_party/dawn/src/dawn:dawncpp_headers_gen__json_tarball(//build/toolchain/win:win_clang_x64)
FAILED: gen/third_party/dawn/dawncpp_headers_gen.json_tarball
c:/code/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe ../../third_party/dawn/generator/dawn_json_generator.py --dawn-json ../../third_party/dawn/dawn.json --wire-json ../../third_party/dawn/dawn_wire.json --targets dawncpp_headers --template-dir C:/code/chromium_git2/chromium/src/third_party/dawn/generator/templates --jinja2-path C:/code/chromium_git2/chromium/src/third_party/jinja2 --output-json-tarball gen/third_party/dawn/dawncpp_headers_gen.json_tarball --depfile gen/third_party/dawn/dawncpp_headers_gen.json_tarball.d --expected-outputs-file gen/third_party/dawn/dawncpp_headers_gen.expected_outputs --allowed-output-dirs-file gen/third_party/dawn/dawncpp_headers_gen.allowed_output_dirs
Traceback (most recent call last):
  File "../../third_party/dawn/generator/dawn_json_generator.py", line 19, in <module>
    from generator_lib import Generator, run_generator, FileRender
  File "c:\code\chromium_git\chromium\src\third_party\dawn\generator\generator_lib.py", line 93, in <module>
    import jinja2
ImportError: No module named jinja2
[118/912] ACTION //third_party/dawn/src/dawn:dawn_headers_gen__json_tarball(//build/toolchain/win:win_clang_x64)
FAILED: gen/third_party/dawn/dawn_headers_gen.json_tarball
c:/code/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe ../../third_party/dawn/generator/dawn_json_generator.py --dawn-json ../../third_party/dawn/dawn.json --wire-json ../../third_party/dawn/dawn_wire.json --targets dawn_headers --template-dir C:/code/chromium_git2/chromium/src/third_party/dawn/generator/templates --jinja2-path C:/code/chromium_git2/chromium/src/third_party/jinja2 --output-json-tarball gen/third_party/dawn/dawn_headers_gen.json_tarball --depfile gen/third_party/dawn/dawn_headers_gen.json_tarball.d --expected-outputs-file gen/third_party/dawn/dawn_headers_gen.expected_outputs --allowed-output-dirs-file gen/third_party/dawn/dawn_headers_gen.allowed_output_dirs
Traceback (most recent call last):
  File "../../third_party/dawn/generator/dawn_json_generator.py", line 19, in <module>
    from generator_lib import Generator, run_generator, FileRender
  File "c:\code\chromium_git\chromium\src\third_party\dawn\generator\generator_lib.py", line 93, in <module>
    import jinja2
ImportError: No module named jinja2
[121/912] STAMP obj/ui/resources/ui_unscaled_resources_grd.inputdeps.stamp
ninja: build stopped: subcommand failed.
danielcigloo
Newbie
 
Posts: 3
Joined: Wed Jan 01, 2020 4:13 am

Re: Unable to build CEF master

Postby magreenblatt » Sun Mar 15, 2020 11:28 am

I have not seen that error. What GN_DEFINES are you using? Do you have multiple python versions in your PATH?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to build CEF master

Postby danielcigloo » Mon Mar 16, 2020 2:45 am

Do you have multiple python versions in your PATH?

I had, but i have removed all installations of Python (add/remove center) and issue is the same
Its most probably something that have changed on my machine, because in the recent past i have successfully built from source. (master branch, 1 month ago)
i might try setup clean VM and redo everything.

I have not seen that error. What GN_DEFINES are you using?

update.bat:
Code: Select all
set CEF_USE_GN=1
set GN_DEFINES=use_jumbo_build=true enable_precompiled_headers=false is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2019
set GN_ARGUMENTS=--ide=vs2019 --sln=cef --filters=//cef/*
python ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --no-build --no-distrib


create.bat:
Code: Select all
set GN_DEFINES=use_jumbo_build=true enable_precompiled_headers=false is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2019 --sln=cef --filters=//cef/*
call cef_create_projects.bat
danielcigloo
Newbie
 
Posts: 3
Joined: Wed Jan 01, 2020 4:13 am

Re: Unable to build CEF master

Postby magreenblatt » Mon Mar 16, 2020 2:27 pm

I don’t think it’s related, but you shouldn’t use enable_precompiled_headers=false with recent branches.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 53 guests