Correct build flags for branch 3865 (77)? Getting LLVM error

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.

Correct build flags for branch 3865 (77)? Getting LLVM error

Postby HarmlessDave » Fri Nov 08, 2019 2:29 am

This is for Windows 32-bit, but with proprietary codecs. 77.1.18+g8e8d602+chromium-77.0.3865.120

Using Visual Studio 2017 15.9.16, with SDK 10.1.17763.132 installed (as well as other versions), i7-8700K, 32 GB RAM, 580 GB free disk space.

I was able to build the component version by mistake using the flags in MasterBuildQuickStart, but this is for use in an application not for CEF + Chromium development.

Error
Code: Select all
[38605/38609] LINK(DLL) libcef.dll libcef.dll.lib libcef.dll.pdb
FAILED: libcef.dll libcef.dll.lib libcef.dll.pdb
ninja -t msvc -e environment.x86 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /IMPLIB:./libcef.dll.lib /DLL /OUT:./libcef.dll /PDB:./libcef.dll.pdb @./libcef.dll.rsp
LLVM ERROR: out of memory
Stack dump:
0.      Program arguments: ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /IMPLIB:./libcef.dll.lib /DLL /OUT:./libcef.dll /PDB:./libcef.dll.pdb @./libcef.dll.rsp
0x00007FF746714F76 (0x000000AC5898BB08 0x00007FF7480F9947 0x0000000000000016 0x00007FF746714F70) <unknown module>
0x00007FF7480F97FD (0x00007FF7480F9947 0x0000000000000016 0x00007FF746714F70 0x00007FF746714F70) <unknown module>
0x000000AC5898BB08 (0x0000000000000016 0x00007FF746714F70 0x00007FF746714F70 0x000000AC5898BB50) <unknown module>
0x00007FF7480F9947 (0x00007FF746714F70 0x00007FF746714F70 0x000000AC5898BB50 0x0000000000000000) <unknown module>
0x0000000000000016 (0x00007FF746714F70 0x000000AC5898BB50 0x0000000000000000 0x00007FF7480F93F1) <unknown module>
0x00007FF746714F70 (0x000000AC5898BB50 0x0000000000000000 0x00007FF7480F93F1 0x0000000000000001) <unknown module>
0x00007FF746714F70 (0x0000000000000000 0x00007FF7480F93F1 0x0000000000000001 0x00000213A2B714D0) <unknown module>
0x000000AC5898BB50 (0x00007FF7480F93F1 0x0000000000000001 0x00000213A2B714D0 0x0000000000001000) <unknown module>
ninja: build stopped: subcommand failed.


Defines and flags, for 32-bit debug
(I separate the debug and release builds since last time I checked using official_build=true in the debug build messes up debugging)

Attempt 1:
Code: Select all
SET PATH=e:\depot_tools;%PATH%;
python e:/cef77118/automate-git.py --download-dir=e:/cef77118 --branch=3865 --no-distrib --no-build  --force-clean

set GN_DEFINES=proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2017
set CEF_ARCHIVE_FORMAT=tar.bz2

cd E:\cef77118\chromium\src\cef
cef_create_projects.bat

cd E:\cef77118\chromium\src
ninja -j 2 -C out\Debug_GN_x86 cef


Attempt 2, using settings from a successful build of branch=3683:
Code: Select all
set CEF_USE_GN=1
set GN_DEFINES=use_jumbo_build=true enable_precompiled_headers=false proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
SET PATH=e:\depot_tools;%PATH%;

cd E:\cef77118\chromium\src\cef
cef_create_projects.bat

cd E:\cef77118\chromium\src
ninja -j 2 -C out\Debug_GN_x86 cef


I'm guessing I'm misreading something in the current build instructions.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Correct build flags for branch 3865 (77)? Getting LLVM e

Postby HarmlessDave » Fri Nov 08, 2019 4:33 pm

I tried letting automate-git pick the flags, same result:

Code: Select all
SET PATH=e:\depot_tools;%PATH%;
set GYP_MSVS_VERSION=2017
set CEF_ARCHIVE_FORMAT=tar.bz2

E:\>e:/cef77118/automate-git.py --download-dir=e:/cef77118 --branch=3865 --no-release-build

--> Download Directory: e:\cef77118
--> Depot Tools Directory: e:\cef77118\depot_tools
--> Extracting https://storage.googleapis.com/chrome-infra/depot_tools.zip to e:\cef77118\depot_tools.
--> Updating depot_tools
-------- Running "update_depot_tools.bat" in "e:\cef77118\depot_tools"...
Downloading CIPD client for windows-amd64 from https://chrome-infra-packages.appspot.com/client?platform=windows-amd64&version=git_revision:2a121dde003a3079db0fdf58195b52cbf486f6ba...
--> CEF Branch: 3865
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: e:\cef77118\cef
-------- Running "e:\cef77118\depot_tools\git.bat clone https://bitbucket.org/chromiumembedded/cef.git e:\cef77118\cef" in "e:\cef77118"...
Cloning into 'e:\cef77118\cef'...
remote: Counting objects: 58510, done

 . . . .

Done. Made 11001 targets from 1972 files in 6972ms
Applying issue #1999 fix to e:\cef77118\chromium\src\out\Debug_GN_x64\obj\cef\libcef.ninja

Generating CEF buildinfo header file...
File include/cef_config.h updated.
--> e:\cef77118\chromium\src\out\Debug_GN_x86\args.gn contents:
clang_use_chrome_plugins=false
enable_basic_printing=true
enable_nacl=false
enable_print_preview=true
enable_service_discovery=false
enable_widevine=true
forbid_non_component_debug_builds=false
is_component_build=false
is_debug=true
optimize_webui=true
target_cpu="x86"
-------- Running "ninja -C out\Debug_GN_x86 cefclient" in "e:\cef77118\chromium\src"...
ninja: Entering directory `out\Debug_GN_x86'
[29230/38337] ACTION //cef:make_pack_header_strings(//build/toolchain/win:win_clang_x86)
File includes/include/cef_pack_strings.h updated.
[29234/38337] ACTION //cef:make_pack_header_resources(//build/toolchain/win:win_clang_x86)
File includes/include/cef_pack_resources.h updated.
[38336/38337] LINK(DLL) libcef.dll libcef.dll.lib libcef.dll.pdb
FAILED: libcef.dll libcef.dll.lib libcef.dll.pdb
ninja -t msvc -e environment.x86 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /IMPLIB:./libcef.dll.lib /DLL /OUT:./libcef.dll /PDB:./libcef.dll.pdb @./libcef.dll.rsp
LLVM ERROR: out of memory
Stack dump:
0.      Program arguments: ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /IMPLIB:./libcef.dll.lib /DLL /OUT:./libcef.dll /PDB:./libcef.dll.pdb @./libcef.dll.rsp
LLVM ERROR: out of memory
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "E:\cef77118\automate-git.py", line 1549, in <module>
    if options.buildlogfile else None)
  File "E:\cef77118\automate-git.py", line 61, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "C:\Python27amd64\lib\subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)


Any ideas?
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Correct build flags for branch 3865 (77)? Getting LLVM e

Postby HarmlessDave » Fri Nov 08, 2019 4:45 pm

I'm seeing some Google results that imply LLVM might be using too many threads on this 6-core / 12-thread PC, but using `-j 2 ` didn't prevent the out of memory errors so I might either need to set other flag(s) or disable the hyperthreading in the BIOS?
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Correct build flags for branch 3865 (77)? Getting LLVM e

Postby magreenblatt » Fri Nov 08, 2019 5:29 pm

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

Re: Correct build flags for branch 3865 (77)? Getting LLVM e

Postby HarmlessDave » Fri Nov 15, 2019 1:45 pm

Thanks!

For anyone else trying to do this, the problem seems to be with building a non-official, non-component debug version. For Windows it seems you now must have either have `GN_DEFINES=is_official_build=true` or `is_component_build=true` or the build will fail.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 94 guests