Trouble when building chromium

2,458 views
Skip to first unread message

Long Le

unread,
Nov 2, 2017, 6:02:21 AM11/2/17
to Chromium-dev
I having some errors when building chromium, im newbie with this, can anyone help me
this is my error output
D:\src> ninja -C out\Default chrome
ninja: Entering directory `out\Default'
[316/32815] RC obj/chrome/chrome_exe_version/chrome_exe_version.res
FAILED: obj/chrome/chrome_exe_version/chrome_exe_version.res
D:/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py rc-wrapper environment.x64 rc.exe -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D"CR_CLANG_REVISION=\"315613-1\"" -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -DDEPRECATEDENUMERATOR(x)=[[deprecated(x)]] -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000000 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -I../.. -Igen /foobj/chrome/chrome_exe_version/chrome_exe_version.res gen/chrome/chrome_exe_version.rc
<stdin>(5,10):  fatal error: 'verrsrc.h' file not found
#include <verrsrc.h>
         ^~~~~~~~~~~
1 error generated.
[317/32815] RC obj/chrome/chrome_dll_version/chrome_dll_version.res
FAILED: obj/chrome/chrome_dll_version/chrome_dll_version.res
D:/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py rc-wrapper environment.x64 rc.exe -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D"CR_CLANG_REVISION=\"315613-1\"" -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -DDEPRECATEDENUMERATOR(x)=[[deprecated(x)]] -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000000 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -I../.. -Igen /foobj/chrome/chrome_dll_version/chrome_dll_version.res gen/chrome/chrome_dll_version.rc
<stdin>(5,10):  fatal error: 'verrsrc.h' file not found
#include <verrsrc.h>
         ^~~~~~~~~~~
1 error generated.
[321/32815] ACTION //chrome/browser/metrics:expired_histograms_array(//build/toolchain/win:win_clang_x64)
ninja: build stopped: subcommand failed.

bruce...@chromium.org

unread,
Nov 3, 2017, 6:49:21 PM11/3/17
to Chromium-dev
That file is supposed to be found here:

c:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um

Make sure you have the necessary parts of the 10.0.15063 SDK installed. Currently that is the only Windows 10 SDK that can be used to build Chromium.

jiang Han

unread,
Dec 14, 2017, 9:10:12 AM12/14/17
to Chromium-dev
I have same error.I have also set the win 10 sdk to the PATH.but get same error..

在 2017年11月4日星期六 UTC+8上午6:49:21,bruce...@chromium.org写道:

Junaid Iqbal

unread,
Dec 14, 2017, 9:38:19 AM12/14/17
to Chromium-dev
I am facing the same issue. Windows 10 SDK is installed properly. I can manually find the file but ninja is saying that file not found. Any help would be appreciated, thanks.

Junaid Iqbal

unread,
Dec 14, 2017, 9:49:10 AM12/14/17
to Chromium-dev
this is the error that I got:

FAILED: obj/chrome/chrome_exe_version/chrome_exe_version.res
C:/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py rc-wrapper environment.x64 rc.exe -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D"CR_CLANG_REVISION=\"318667-1\"" -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -DDEPRECATEDENUMERATOR(x)=[[deprecated(x)]] -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000000 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -I../.. -Igen /foobj/chrome/chrome_exe_version/chrome_exe_version.res gen/chrome/chrome_exe_version.rc
<stdin>(5,10):  fatal error: 'verrsrc.h' file not found
#include <verrsrc.h>
         ^~~~~~~~~~~
1 error generated.

Junaid Iqbal

unread,
Dec 14, 2017, 10:53:35 AM12/14/17
to Chromium-dev
I think I figure it out. I checked the windows 10 SDK version, it was 10.0.16299.0 before. Then I downloaded and installed a different version "Windows 10 SDK (ver. 10.0.15063.468)" from this link https://developer.microsoft.com/en-us/windows/downloads/sdk-archive

I tried building again and it works! :)

Cheers!

Junaid Iqbal

unread,
Dec 14, 2017, 10:57:29 AM12/14/17
to Chromium-dev
Now I am having a different issue: Following is the error I got. Any suggestions?

ninja: Entering directory `out\Default'
[74/33989] CXX obj/base/base/precompile.cc.obj
FAILED: obj/base/base/precompile.cc.obj
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  @obj/base/base/precompile.cc.obj.rsp /c ../../build/precompile.cc /Foobj/base/base/precompile.cc.obj /Fd"obj/base/base_cc.pdb"
Assertion failed: ID < FilenamesByID.size() && "Invalid FilenameID", file C:\b\rr\tmpcwzqyv\w\src\third_party\llvm\tools\clang\include\clang/Basic/SourceManagerInternals.h, line 105
Wrote crash dump file "C:\Users\jiqbal1\AppData\Local\Temp\clang-cl.exe-0bb411.dmp"
LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.  Make sure the file exists and is readable.  Calling loadDataForExe

LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.  Make sure the file exists and is readable.  Calling loadDataForExe

LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.  Make sure the file exists and is readable.  Calling loadDataForExe

#0 0x00007ff7120df276 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x183f276)
#1 0x00007ff713e84179 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x35e4179)
#2 0x00007ff713e805f8 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x35e05f8)
#3 0x00007ff713e7432a (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x35d432a)
#4 0x00007ff713e743c6 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x35d43c6)
#5 0x00007ff712fb8f54 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x2718f54)
#6 0x00007ff712fd4df5 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x2734df5)
#7 0x00007ff712fd1a62 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x2731a62)
#8 0x00007ff712f9ab29 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x26fab29)
#9 0x00007ff71275a77c (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x1eba77c)
#10 0x00007ff71275a77c (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x1eba77c)
#11 0x00007ff712e7b152 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x25db152)
#12 0x00007ff712716860 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x1e76860)
#13 0x00007ff712701071 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x1e61071)
#14 0x00007ff71278d133 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x1eed133)
#15 0x00007ff7108a6d2e (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x6d2e)
#16 0x00007ff7108a47cf (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x47cf)
#17 0x00007ff713e6b4c5 (C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x35cb4c5)
#18 0x00007ffa4a0a1fe4 (C:\WINDOWS\System32\KERNEL32.DLL+0x11fe4)
#19 0x00007ffa4ab6ef91 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6ef91)
clang-cl.exe: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 6.0.0 (trunk 318667)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\depot_tools\chromium\src\third_party\llvm-build\Release+Asserts\bin
clang-cl.exe: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-cl.exe: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-cl.exe: note: diagnostic msg: C:\Users\jiqbal1\AppData\Local\Temp\precompile-1d6059.sh
clang-cl.exe: note: diagnostic msg:

********************
[79/33989] ACTION //chrome/app/vector_icons:chrome_vector_icons(//build/toolchain/win:win_clang_x64)

Bruce Dawson

unread,
Dec 14, 2017, 2:37:30 PM12/14/17
to junai...@gmail.com, Chromium-dev
The clang-cl crash is a known issue. It is a clang bug. crbug.com/780124 is tracking it. The clang team has a fix but it has not yet shipped.

The bug only happens with precompiled headers so you can work around it by adding this to your gn args:

enable_precompiled_headers = false

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/IstIGwsPt1E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/dd5f2428-e04f-44dd-96c7-bec3353c3ad6%40chromium.org.

Junaid Iqbal

unread,
Dec 15, 2017, 10:04:50 AM12/15/17
to Chromium-dev, junai...@gmail.com
works like a charm!

Thanks Bruce!
To unsubscribe from this group and all its topics, send an email to chromium-dev...@chromium.org.

Junaid Iqbal

unread,
Dec 15, 2017, 2:29:59 PM12/15/17
to Chromium-dev, junai...@gmail.com
Hi Bruce,

The build went successful. Now I cannot figure out how to run the browser.

Actually, I am playing around with dom project (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom).

I build one of the test target (third_party/WebKit/Source/core/dom:dom) by using this command (ninja -C out/Default third_party/WebKit/Source/core/dom:dom). 

I cannot find any chrome.exe or any file to run the browser?

Thanks,

Bruce Dawson

unread,
Dec 15, 2017, 5:55:36 PM12/15/17
to Junaid Iqbal, Chromium-dev
If you want to run the browser you must build the browser.

ninja -C out/Default chrome
out\Default\chrome.exe


To unsubscribe from this group and all its topics, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/9953ebfb-4ffa-4eb4-ae18-a18eef28de41%40chromium.org.

Junaid Iqbal

unread,
Dec 18, 2017, 2:32:22 PM12/18/17
to Chromium-dev, junai...@gmail.com
Thanks for your reply. Is it possible to build specific project and run that instead of building the whole browser?

 Actually when I setup the build, I created the visual studio project by running this command: 

gn gen --ide=vs --filters=//third_party\WebKit\Source\core\dom out\Default

I am only interested in DOM project that is why I created a project for DOM only.

Bruce Dawson

unread,
Dec 18, 2017, 2:53:49 PM12/18/17
to Junaid Iqbal, Chromium-dev
There are different executables that you can build and run but third_party\WebKit\Source\core\dom is not a stand-alone executable, it is just a list of source files that can be linked into an executable. The DOM cannot exist in a vacuum.

Also note that the filters that you apply only affect the Visual Studio solution that you use to browse the source. The filters do not affect what you build. What you build is controlled by what targets you specify to your ninja command.

To find what executables you can build you can search the BUILD.gn files for "executable(". chrome, browser_tests, and content_shell are popular choices.

To unsubscribe from this group and all its topics, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b038591c-aedb-4766-b683-42944dc56aa0%40chromium.org.

Junaid Iqbal

unread,
Dec 19, 2017, 9:54:12 AM12/19/17
to Chromium-dev, junai...@gmail.com
Thanks. This was really helpful for me.

So let say if I change some code in out\Default directory, let say document.h file. When I build chrome using this command

ninja -C out\Default chrome

Would my modification in document.h take effect when I run the browser?

Christian Biesinger

unread,
Dec 19, 2017, 11:48:56 AM12/19/17
to junai...@gmail.com, Chromium-dev
Yes, that will work and is the recommended approach.

(Changing Document.h will rebuild a lot of things and so probably take
a long time, fyi)

Christian
> You received this message because you are subscribed to the Google Groups
> "Chromium-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2732d8e3-d162-4e81-9285-b29842cf9168%40chromium.org.

Bruce Dawson

unread,
Dec 19, 2017, 4:10:19 PM12/19/17
to Junaid Iqbal, Chromium-dev
So let say if I change some code in out\Default directory, let say document.h file

I assume you are planning to change code in third_party\WebKit\Source\core\dom\Document.h, rather than change files that are in out\Default? If so then yes, that will work. ninja tracks dependencies so that it knows exactly what to build.

Chrome is a huge and complex project. I recommend reading as much as you can about the process. Here are some links to look at:



To unsubscribe from this group and all its topics, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2732d8e3-d162-4e81-9285-b29842cf9168%40chromium.org.

Junaid Iqbal

unread,
Dec 20, 2017, 10:29:29 AM12/20/17
to Chromium-dev, junai...@gmail.com
Thanks for the helpful links, I will definitely look into them.

Building chrome using this command:

 ninja -C out\Default chrome

takes hours. I am only working around DOM project (third_party\WebKit\Source\core\dom) and modifying some of the files. Modifying one line of code and waiting hours to see its effect is really killing my time. Is there any quicker way to test my changes in the browser? 

thanks,

Torne (Richard Coles)

unread,
Dec 20, 2017, 10:41:30 AM12/20/17
to junai...@gmail.com, Chromium-dev
It only rebuilds the things that it has to rebuild due to your changes, unless you deleted the output directory in between. It should not take hours to build after each change.

Are you building in debug or release? Are you building a component build or not?

You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/63dc3a37-9e51-4f31-a894-ec7caaea4667%40chromium.org.

Bruce Dawson

unread,
Dec 20, 2017, 2:24:06 PM12/20/17
to Torne (Richard Coles), Junaid Iqbal, Chromium-dev
This link has some hints on how to make your builds faster, but Chrome is huge and builds will never be fast on most machines.


On my laptop (four-cores, eight-threads, 32 GB of RAM, SSD) with the recommended settings a full Chrome build takes about two hours. An incremental build takes, well, it depends on what has changed. If you are doing a component build and you touch a .cc file then an incremental build may just take a few seconds (compile the one file, incrementally link one DLL, done) but if you change a header file then the time can be almost arbitrarily long because many .cc files may need to be recompiled. If incremental linking fails then it can take much longer.

Chrome builds parallelize very nicely so machines with more cores will be significantly faster, but still slow.

sain...@gmail.com

unread,
Dec 23, 2017, 3:55:29 AM12/23/17
to Chromium-dev
This works, thank you.

Junaid Iqbal

unread,
Jan 3, 2018, 2:22:25 PM1/3/18
to Chromium-dev, junai...@gmail.com
It works fine now. However, the first build takes a lot of time but after that everything is good.

Cheers! 

Junaid Iqbal

unread,
Jan 5, 2018, 12:33:49 PM1/5/18
to Chromium-dev, junai...@gmail.com
I am trying to print some messaging for debugging purpose. For example, I want to print a simple hello world whenever any page is loaded. Maybe its a very basic question. Any suggestion on that?


On Wednesday, December 20, 2017 at 11:41:30 AM UTC-4, Torne (Richard Coles) wrote:
Reply all
Reply to author
Forward
0 new messages