Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on Linux Debug, 'extensions/buildflags/buildflags.h' file not found #1352

Closed
AlexeyBarabash opened this issue Sep 29, 2018 · 0 comments · Fixed by brave/brave-core#528
Assignees
Labels

Comments

@AlexeyBarabash
Copy link
Contributor

Description

Fresh clone of brave-browser with Chromium "70.0.3538.35" fails to build on Linux Debug.

Steps to Reproduce

run these commands 2018-09-29

git clone git@github.com:brave/brave-browser.git
cd brave-browser
npm install
npm run init
npm run build

Actual result:

c/chrome/browser/resources/settings/default_brave_shields_page/default_brave_shields_page.js
building brave...
gn gen /home/alexey/Projects/br_br_master/brave-browser/src/out/Debug --args="safe_browsing_mode=1 root_extra_deps=[\"//brave\"] is_component_build=true proprietary_codecs=true ffmpeg_branding=\"Chrome\" enable_nacl=false enable_widevine=false target_cpu=\"x64\" is_official_build=false is_debug=true dcheck_always_on=true brave_channel=\"development\" google_api_key=\"AIzaSyAH90V94EcZBP5oH7oc-mXQrSKgASVxER8\" brave_google_api_key=\"AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q\" brave_google_api_endpoint=\"https://www.googleapis.com/geolocation/v1/geolocate?key=\" brave_product_name=\"Brave\" brave_project_name=\"brave\" brave_version_major=\"0\" brave_version_minor=\"57\" brave_version_build=\"1\" chrome_version_string=\"70.0.3538.35\" safebrowsing_api_endpoint=\"safebrowsing.brave.com\" brave_referrals_api_key=\"\" symbol_level=2 enable_profiling=true is_win_fastlink=true cc_wrapper=\"/home/alexey/Projects/br_br_master/brave-browser/src/brave/script/redirect-cc.py\" "
Done. Made 10142 targets from 1803 files in 2069ms
ninja -C /home/alexey/Projects/br_br_master/brave-browser/src/out/Debug brave
ninja: Entering directory `/home/alexey/Projects/br_br_master/brave-browser/src/out/Debug'
[225/34286] CXX obj/brave/extensions/renderer/renderer/brave_shields_content_setting.o
FAILED: obj/brave/extensions/renderer/renderer/brave_shields_content_setting.o 
/home/alexey/Projects/br_br_master/brave-browser/src/brave/script/redirect-cc.py ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/brave/extensions/renderer/renderer/brave_shields_content_setting.o.d -DBRAVE_CHROMIUM_BUILD -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -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 -D_GNU_SOURCE -DCR_CLANG_REVISION=\"340925-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DCR_LIBCXX_REVISION=332543 -DCR_LIBCXXABI_REVISION=331450 -DCR_SYSROOT_HASH=815a8c22f8657fe57d02e2c2d893bcdc25a243cf -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -I../../brave/chromium_src -I. -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -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 -fcomplete-member-pointers -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-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -O0 -fno-omit-frame-pointer -g2 -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 -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++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 ../../brave/extensions/renderer/brave_shields_content_setting.cc -o obj/brave/extensions/renderer/renderer/brave_shields_content_setting.o
In file included from ../../brave/extensions/renderer/brave_shields_content_setting.cc:19:
In file included from ../../extensions/renderer/script_context_set.h:16:
../../extensions/common/extension.h:20:10: fatal error: 'extensions/buildflags/buildflags.h' file not found
#include "extensions/buildflags/buildflags.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[242/34286] ACTION //brave/components/brave_webtorrent/extension:brave_webtorrent(//build/toolchain/linux:clang_x64)
ninja: build stopped: subcommand failed.
null
null
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! brave@0.57.1 build: `node ./scripts/commands.js build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the brave@0.57.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/alexey/.npm/_logs/2018-09-29T12_39_41_109Z-debug.log

Expected result:

Build succeeded.

Additional Information

can be workarounded with patch

diff --git a/extensions/renderer/BUILD.gn b/extensions/renderer/BUILD.gn
index 68ed640..80be1c9 100644
--- a/extensions/renderer/BUILD.gn
+++ b/extensions/renderer/BUILD.gn
@@ -11,4 +11,8 @@ source_set("renderer") {
   # Didn't add any dependencies because sources of this target
   # will compiled together with //extensions/renderer target and these files
   # doesn't add additional dependencies.
+
+  deps = [
+    "//extensions/buildflags"
+  ]
 }
@simonhong simonhong self-assigned this Sep 29, 2018
@bbondy bbondy added this to the Releasable builds 0.55.x milestone Sep 30, 2018
@bbondy bbondy removed the 0.55.x label Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants