Failed to build Chromium after remove out/Debug, cors.mojom-shared.h' file not found

156 views
Skip to first unread message

xin...@intel.com

unread,
Jun 5, 2018, 3:25:42 AM6/5/18
to Chromium-dev
I have two separate chromium folder(src1, src2), both can successfully build debug/release version before Yesterday. 
However,  in yesterday,  I synced both src1 and src2, and delete src2/out/Debug. Then src1/out/Debug/ src1/out/Release and  src2/out/Release built successfully, but src2/out/Debug fails.

The complains of src2/out/Debug:
In file included from ../../services/network/public/cpp/network_ipc_param_traits.h:28:
../../services/network/public/cpp/resource_request.h:18:10: fatal error: 'services/network/public/mojom/cors.mojom-shared.h' file not found
#include "services/network/public/mojom/cors.mojom-shared.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4434/24270] CXX obj/components/content_settings/core/browser/browser/content_settings_utils.o
ninja: build stopped: subcommand failed.


cors.mojom-shared.h exists in src2/out/Release and src1/out/Release src1/out/Debug:
src2$ find ./ -name cors.mojom-shared.h
./out/Release/gen/services/network/public/mojom/cors.mojom-shared.h

src1$ find ./ -name cors.mojom-shared.h
./out/Debug/gen/services/network/public/mojom/cors.mojom-shared.h
./out/Release/gen/services/network/public/mojom/cors.mojom-shared.

And my build args for debug:
cat out/Debug/args.gn 
# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
is_debug = true
is_component_build = true
enable_nacl = false
remove_webcore_debug_symbols = true
symbol_level = 2

Asesh Shrestha

unread,
Jun 5, 2018, 11:13:10 PM6/5/18
to Chromium-dev
Did you try: gn gen out\Debug and try again?

xin...@intel.com

unread,
Jun 6, 2018, 2:45:38 AM6/6/18
to Chromium-dev
Thanks.  After sync code today, problem resolved.

bruce...@chromium.org

unread,
Jun 7, 2018, 4:53:06 PM6/7/18
to Chromium-dev
This is, unfortunately, a known bug.

The generic fix is gn clean followed by a fresh build (and crossing your fingers), explicitly building the missing file (ninja -C out/Debug gen/services/network/public/mojom/cors.mojom-shared.h), or perhaps building with -k 0 so that the step that generates the file will eventually be created, and the next build will succeed.

This is tracked by crbug.com/655123.

Nico Weber

unread,
Jun 7, 2018, 6:17:02 PM6/7/18
to Bruce Dawson, Chromium-dev
On Thu, Jun 7, 2018 at 4:53 PM, <bruce...@chromium.org> wrote:
This is, unfortunately, a known bug.

The generic fix is gn clean followed by a fresh build (and crossing your fingers), explicitly building the missing file (ninja -C out/Debug gen/services/network/public/mojom/cors.mojom-shared.h), or perhaps building with -k 0 so that the step that generates the file will eventually be created, and the next build will succeed.

This is tracked by crbug.com/655123.

That bug is "we don't have an automated way to find missing deps".

The issue at hand is "a specific dep is missing".

I think those are separate bugs. If the cors.mojom-shared.h issue still happens, it deserves its own bug that someone needs to fix. (Like https://crbug.com/816984 https://crbug.com/522336 etc)
 

--
--
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 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/da46fe50-ffcf-45db-9105-c6e609c9b868%40chromium.org.

Colin Blundell

unread,
Jun 8, 2018, 3:32:11 AM6/8/18
to tha...@chromium.org, Bruce Dawson, Chromium-dev
On Fri, Jun 8, 2018 at 12:16 AM Nico Weber <tha...@chromium.org> wrote:
On Thu, Jun 7, 2018 at 4:53 PM, <bruce...@chromium.org> wrote:
This is, unfortunately, a known bug.

The generic fix is gn clean followed by a fresh build (and crossing your fingers), explicitly building the missing file (ninja -C out/Debug gen/services/network/public/mojom/cors.mojom-shared.h), or perhaps building with -k 0 so that the step that generates the file will eventually be created, and the next build will succeed.

This is tracked by crbug.com/655123.

That bug is "we don't have an automated way to find missing deps".

The issue at hand is "a specific dep is missing".

I think those are separate bugs. If the cors.mojom-shared.h issue still happens, it deserves its own bug that someone needs to fix. (Like https://crbug.com/816984 https://crbug.com/522336 etc)

Related to this: Xing, what was your build command, and what was the file on which compilation failed? With both of those, it should be fairly easy to track down the missing dep.
 

Xu, Xing

unread,
Jun 8, 2018, 4:12:28 AM6/8/18
to blun...@chromium.org, tha...@chromium.org, Bruce Dawson, Chromium-dev

Build  command: ninja –C out/Debug chrome

 

Anyway, it works now.

 

Regards,

Xing

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/HnrU_h7MHQA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGE5NFde8pU31SiCihOVUEaDYe2vsk1ERR-maEyGu64jdyhPA%40mail.gmail.com.

Colin Blundell

unread,
Jun 8, 2018, 4:13:44 AM6/8/18
to Xu, Xing, blun...@chromium.org, tha...@chromium.org, Bruce Dawson, Chromium-dev
On Fri, Jun 8, 2018 at 10:11 AM Xu, Xing <xin...@intel.com> wrote:

Build  command: ninja –C out/Debug chrome

 

Anyway, it works now.

 


These kinds of problems are basically flaky by definition, so it working now doesn't mean that the problem is fixed :). Do you recall which file failed to compile? Without that info, searching for the missing dep is a needle-in-a-haystack problem.

Thanks,

Colin

Xu, Xing

unread,
Jun 8, 2018, 4:16:25 AM6/8/18
to Colin Blundell, tha...@chromium.org, Bruce Dawson, Chromium-dev

The complains of src2/out/Debug:

In file included from ../../services/network/public/cpp/network_ipc_param_traits.h:28:

../../services/network/public/cpp/resource_request.h:18:10: fatal error: 'services/network/public/mojom/cors.mojom-shared.h' file not found

#include "services/network/public/mojom/cors.mojom-shared.h"

 

 

Regards,

Colin Blundell

unread,
Jun 8, 2018, 4:19:48 AM6/8/18
to Xu, Xing, Colin Blundell, tha...@chromium.org, Bruce Dawson, Chromium-dev
On Fri, Jun 8, 2018 at 10:15 AM Xu, Xing <xin...@intel.com> wrote:

The complains of src2/out/Debug:

In file included from ../../services/network/public/cpp/network_ipc_param_traits.h:28:

../../services/network/public/cpp/resource_request.h:18:10: fatal error: 'services/network/public/mojom/cors.mojom-shared.h' file not found

#include "services/network/public/mojom/cors.mojom-shared.h"


Those files were presumably included from a .cc file that the compiler was trying to build, no? That's the file I'm asking about.

Xu, Xing

unread,
Jun 8, 2018, 4:23:40 AM6/8/18
to Colin Blundell, tha...@chromium.org, Bruce Dawson, Chromium-dev

Aha, it’s lucky that Ubuntu bash shell keeps such a long historyJ

gen/services/network/public/mojom/websocket.mojom.cc:32:

 

 

 

Src2$ ninja -C out/Debug chrome

ninja: Entering directory `out/Debug'

[20/19837] CXX obj/services/network/public/mojom/websocket_mojom/websocket.mojom.o

FAILED: obj/services/network/public/mojom/websocket_mojom/websocket.mojom.o

../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/services/network/public/mojom/websocket_mojom/websocket.mojom.o.d -DBLINK_PLATFORM_IMPLEMENTATION=1 -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"332838-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DCR_LIBCXX_REVISION=332543 -DCR_LIBCXXABI_REVISION=331450 -DCR_SYSROOT_HASH=4e7db513b0faeea8fb410f70c9909e8736f5c0ab -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DPROTOBUF_USE_DLLS -DBORINGSSL_SHARED_LIBRARY -I../.. -Igen -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -O0 -fno-omit-frame-pointer -g2 -gsplit-dwarf -ggnu-pubnames -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-thirdparty-webkit -Xclang -plugin-arg-find-bad-constructs -Xclang check-enum-max-value -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-header-guard -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/nss -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/nspr -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -c gen/services/network/public/mojom/websocket.mojom.cc -o obj/services/network/public/mojom/websocket_mojom/websocket.mojom.o

In file included from gen/services/network/public/mojom/websocket.mojom.cc:32:

In file included from ../../services/network/public/cpp/network_ipc_param_traits.h:28:

../../services/network/public/cpp/resource_request.h:19:10: fatal error: 'services/network/public/mojom/fetch_api.mojom-shared.h' file not found

#include "services/network/public/mojom/fetch_api.mojom-shared.h"

        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.

[29/19837] CXX obj/services/preferences/public/cpp/cpp/persistent_pref_store_client.o

ninja: build stopped: subcommand failed.

 

 

 

 

Regards,

Colin Blundell

unread,
Jun 8, 2018, 5:02:27 AM6/8/18
to Xu, Xing, Colin Blundell, tha...@chromium.org, Bruce Dawson, Chromium-dev
Thank you! I filed a bug with the results of my investigation and put the relevant folks on it. The problem is evident but the solution is not totally straightforward as described on the bug.

Colin Blundell

unread,
Jun 13, 2018, 5:15:05 AM6/13/18
to Colin Blundell, Xu, Xing, tha...@chromium.org, Bruce Dawson, Chromium-dev
To close the loop: this is now fixed, thanks to yhirano@.
Reply all
Reply to author
Forward
0 new messages