New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 665694 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Compile (flake?): extension.h:24:10: fatal error: 'extensions/features/features.h' file not found

Project Member Reported by tapted@chromium.org, Nov 16 2016

Issue description

Possibly due to r431741 "Move enable extensions define to a build flag"


Compiling at r431815 on Mac with `ninja -k0`

$ cat chrome/VERSION
MAJOR=56
MINOR=0
BUILD=2919
PATCH=0


args.gn has

is_component_build = true
is_debug = true


I got

FAILED: obj/extensions/browser/mojo/mojo/keep_alive_impl.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/extensions/browser/mojo/mojo/keep_alive_impl.o.d /* snip */ -c ../../extensions/browser/mojo/keep_alive_impl.cc -o obj/extensions/browser/mojo/mojo/keep_alive_impl.o
In file included from ../../extensions/browser/mojo/keep_alive_impl.cc:5:
In file included from ../../extensions/browser/mojo/keep_alive_impl.h:11:
In file included from ../../extensions/browser/extension_registry_observer.h:9:
../../extensions/common/extension.h:24:10: fatal error: 'extensions/features/features.h' file not found
#include "extensions/features/features.h"
         ^
1 error generated.

FAILED: obj/extensions/browser/mojo/mojo/service_registration.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/extensions/browser/mojo/mojo/service_registration.o.d /* snip */ -c ../../extensions/browser/mojo/service_registration.cc -o obj/extensions/browser/mojo/mojo/service_registration.o
In file included from ../../extensions/browser/mojo/service_registration.cc:14:
In file included from ../../extensions/browser/extension_registry.h:16:
In file included from ../../extensions/common/extension_set.h:18:
../../extensions/common/extension.h:24:10: fatal error: 'extensions/features/features.h' file not found
#include "extensions/features/features.h"
         ^
1 error generated.


Building again was successful.
 
Cc: -brettw@chromium.org
Owner: brettw@chromium.org
Status: Assigned (was: Untriaged)
Yep, seems likely to be r431741 - Brett, can you take a look?
Labels: -Pri-3 Pri-1
FWIW, I hit it in a different place:
[637/8240] CXX obj/chrome/browser/apps/app_shim/app_shim/app_shim_handler_mac.o
FAILED: obj/chrome/browser/apps/app_shim/app_shim/app_shim_handler_mac.o 
/Users/schenney/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/apps/app_shim/app_shim/app_shim_handler_mac.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PDF=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DDISABLE_NACL -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=287780-2 -DCR_XCODE_VERSION=0511 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCOMPONENT_BUILD -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_MAC -DV8_USE_EXTERNAL_STARTUP_DATA -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DMESA_EGL_NO_X11_HEADERS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DPROTOBUF_USE_DLLS -DBORINGSSL_SHARED_LIBRARY -DUSING_V8_SHARED -I../.. -Igen -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/mesa/src/include -I../../third_party/libwebm/source -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -Igen -I../../third_party/ced/src -I../../third_party/WebKit -Igen/third_party/WebKit -I../../v8/include -Igen/v8/include -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -O2 -gdwarf-2 -isysroot /Users/schenney/development/chromium_1/src/build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.9 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -c ../../chrome/browser/apps/app_shim/app_shim_handler_mac.cc -o obj/chrome/browser/apps/app_shim/app_shim/app_shim_handler_mac.o
In file included from ../../chrome/browser/apps/app_shim/app_shim_handler_mac.cc:17:
../../chrome/browser/chrome_notification_types.h:9:10: fatal error: 'extensions/features/features.h' file not found
#include "extensions/features/features.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

There seems to be missing build dependencies. Building again fixes the issue.
Cc: brettw@chromium.org
Owner: tapted@chromium.org
Status: Started (was: Assigned)
This also came up at https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/RJ1JIryjaMU/

Note that doing things like

$ rm out/gn_Debug/gen/extensions/features/features.h && touch extensions/browser/mojo/keep_alive_impl.cc && ninja -C out/gn_Debug -v obj/extensions/browser/mojo/mojo/keep_alive_impl.o

will not reproduce this. I.e. ninja will always regenerate the header before attempting to compile keep_alive_impl.cc. Same for app_shim_handler_mac.cc.

However, deleting out/gn_Debug/.ninja_deps in addition *does* reproduce the problem (after compiling 1875 other targets -- mostly v8 :/).

After that, `ninja -C out/gn_Debug -v obj/extensions/browser/mojo/mojo/keep_alive_impl.o` will keep failing.

fix: //extensions/browser/mojo should depend on //extensions/common (although it's not the file failing in the comments above, e/b/mojo/service_registration.cc includes stuff from //extensions/common, so the dep is valid). Then `ninja -C out/gn_Debug -v obj/extensions/browser/mojo/mojo/keep_alive_impl.o` works.


For //chrome/browser/apps/app_shim it's a similar story. Although app_shim_handler_mac.cc doesn't depend on extensions, extension_app_shim_handler_mac in the same target does depend on both //extensions/common and //extensions/browser.


Cc: ah...@yandex-team.ru
r436385 removed //extensions/browser/mojo

fix for app_shim is in https://codereview.chromium.org/2548403003/
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ee456f20d1987d8dfa75f1c431722111eb4ca2a

commit 6ee456f20d1987d8dfa75f1c431722111eb4ca2a
Author: tapted <tapted@chromium.org>
Date: Tue Dec 06 06:33:02 2016

Add missing //extensions/ deps for app_shim.

This currently causes build flakes the first time an output directory
is built, since it depends transitively on a generated header. Ninja is
smart enough add a dependency to the generated header once the generated
file exists, but doesn't do that on the initial build.

Although the errors blame other files, chrome/browser/apps/app_shim/'s
extension_app_shim_handler_mac.cc includes files from extensions/common.
The source set should have this dependency. This fixes the problem.

There are other missing dependencies, such as the path of files named in
the compile error. However, they can't be added without creating a
dependency loop, since its the missing dependencies that depend on these
targets via a source_set.

BUG= 665694 

Review-Url: https://codereview.chromium.org/2548403003
Cr-Commit-Position: refs/heads/master@{#436540}

[modify] https://crrev.com/6ee456f20d1987d8dfa75f1c431722111eb4ca2a/chrome/browser/apps/app_shim/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment