content_main_runner_both fails to compile due to missing mojo interface headers |
|||||
Issue descriptionhttps://build.chromium.org/p/chromium/builders/Win%20x64/builds/8202 Error Log: [23836/48619] CXX obj/content/app/content_main_runner_both/content_main_runner.obj FAILED: obj/content/app/content_main_runner_both/content_main_runner.obj ninja -t msvc -e environment.x64 -- C:\b\c\cipd\goma/gomacc.exe "C:\b\depot_tools\win_toolchain\vs_files\d3cb0e37bdd120ad0ac4650b674b09e81be45616\VC\bin\amd64/cl.exe" /nologo /showIncludes /FC @obj/content/app/content_main_runner_both/content_main_runner.obj.rsp /c ../../content/app/content_main_runner.cc /Foobj/content/app/content_main_runner_both/content_main_runner.obj /Fd"obj/content/app/content_main_runner_both_cc.pdb" c:\b\c\b\win_x64_archive\src\content\browser\gpu\gpu_process_host.h(32): fatal error C1083: Cannot open include file: 'services/ui/gpu/interfaces/gpu_host.mojom.h': No such file or directory This failure occurred once (and closed the build tree down) but did not occur a second time. I suspect it is a timing related problem, if another target generates the Mojo interface headers first, then the content_main_runner_both target will succeed, otherwise there will be a build failure. Seems highly related to: https://bugs.chromium.org/p/chromium/issues/detail?id=685440 The content_main_runner target turns off header checking since the comment states this generates a lot of noise, would that check help find missing dependencies like this?
,
Feb 6 2017
gpu/gpu_process_host.h is in //content/browser . If it's including stuff in "services/ui/gpu/interfaces/" in a header that's visible to another target (i.e. content_main_runner), I think it needs to be a public dep. It's a conditional include in content_main_runner.cc #if !defined(CHROME_MULTIPLE_DLL_BROWSER) && !defined(CHROME_MULTIPLE_DLL_CHILD) #include "content/browser/gpu/gpu_process_host.h" #endif But it's only used to call GpuProcessHost::RegisterGpuMainThreadFactory(..) -- content_main_runner.cc doesn't need all the mojo interfaces. I think there should be a header like src/content/browser/gpu/gpu_main_thread_factory.h That looks kinda like this I suppose - https://codereview.chromium.org/2675163002/
,
Feb 6 2017
I don't think content_main_runner has //content/browser as a dep though, does it?
,
Feb 6 2017
I think it "must", otherwise there'd be link errors? But for it to depend on the generated header exposed via gpu_process_host.h it would also need to depend on //services/ui/gpu/interfaces. E.g. by //content/browser exposing a public_dep
,
Feb 6 2017
,
Feb 6 2017
With the following gn config: is_component_build = false is_debug = false It doesn't look like there is a dependency: $ gn path out/xx content/app:content_main_runner_both content/browser No non-data paths found between these two targets. So adding to public_deps to content/browser should not affect this. One alternate* solution would be to always explicitly add services/ui/gpu/interfaces to content_app_deps (because gpu_process_host.h could still be included through some other headers in content_main_runner.cc, so an explicit dep would probably be safest). *: traditional meaning.
,
Feb 6 2017
,
Feb 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4091f2f04a14767d816857bd480088c3c62d25d8 commit 4091f2f04a14767d816857bd480088c3c62d25d8 Author: tapted <tapted@chromium.org> Date: Tue Feb 07 00:47:19 2017 Add gpu_main_thread_factory.h to expose less of content's guts. gpu_process_host.h exposes a lot of the content layer's guts, including mojo message files which complicate build depenencies. Add gpu_main_thread_factory.h to expose the bits that things outside of content/browser are using. Sepcifically, RegisterGpuMainThreadFactory(). After this, the only files that #include gpu_process_host.h are .cc files in content/browser or content/public/browser. That is, files built in a target that already has a dependency on the source of build flakes coming from //services/ui/gpu/interfaces/. BUG= 688477 TBR=avi@chromium.org Review-Url: https://codereview.chromium.org/2675163002 Cr-Commit-Position: refs/heads/master@{#448472} [modify] https://crrev.com/4091f2f04a14767d816857bd480088c3c62d25d8/content/app/content_main_runner.cc [modify] https://crrev.com/4091f2f04a14767d816857bd480088c3c62d25d8/content/browser/BUILD.gn [add] https://crrev.com/4091f2f04a14767d816857bd480088c3c62d25d8/content/browser/gpu/gpu_main_thread_factory.cc [add] https://crrev.com/4091f2f04a14767d816857bd480088c3c62d25d8/content/browser/gpu/gpu_main_thread_factory.h [modify] https://crrev.com/4091f2f04a14767d816857bd480088c3c62d25d8/content/browser/gpu/gpu_process_host.cc [modify] https://crrev.com/4091f2f04a14767d816857bd480088c3c62d25d8/content/browser/gpu/gpu_process_host.h [modify] https://crrev.com/4091f2f04a14767d816857bd480088c3c62d25d8/content/public/test/content_test_suite_base.cc
,
Feb 8 2017
This happened again in: - https://build.chromium.org/p/chromium/builders/Win%20x64/builds/8273 - https://build.chromium.org/p/chromium/builders/Win%20x64/builds/8275 r448472 landed after those (https://build.chromium.org/p/chromium/builders/Win%20x64/builds/8277) compile failures in 8303,8304 were unrelated. No other failures up to 8315. So I think this is resolved. re #c6: I think there is a transitive dependency that is missing in gn. adding the necessary direct dependency is forbidden (things should depend on content/public not content). And _not_ having the direct dependency doesn't break since this method call is #if-def'd out on component builds where a link error would likely manifest. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by joedow@chromium.org
, Feb 3 2017