Android GN compilation failure, maybe related to V8

81 views
Skip to first unread message

Tima Vaisburd

unread,
Nov 24, 2015, 5:33:43 PM11/24/15
to Chromium-dev
Hi,

After the recent sync I cannot compile Android with GN any more.
It looks like V8 compilation does not see the standard c++ headers.

Does anybody have an idea what can be wrong?
The bots are green.

Thanks much in advance.

I got

In file included from ../../v8/src/libplatform/task-queue.cc:5:
../../v8/src/libplatform/task-queue.h:8:10: fatal error: 'queue' file not found
#include <queue>
         ^
1 error generated.

and similar stuff.

The command line:

[651/11751] CXX clang_x86/obj/v8/v8_libplatform/task-queue.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF clang_x86/obj/v8/v8_libplatform/task-queue.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DDONT_EMBED_BUILD_METADATA -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_OPENSSL=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_CONFIGURATION_POLICY -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_HIDPI=1 -DENABLE_TOPCHROME_MD=1 -DENABLE_BACKGROUND=1 -DENABLE_PRE_SYNC_BACKUP -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=247874-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DV8_I18N_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_TARGET_ARCH_ARM -DCAN_USE_ARMV7_INSTRUCTIONS -DCAN_USE_VFP3_INSTRUCTIONS -DCAN_USE_VFP32DREGS -DUSE_EABI_HARDFLOAT=0 -DENABLE_DISASSEMBLER -DV8_ENABLE_CHECKS -DOBJECT_PRINT -DVERIFY_HEAP -DDEBUG -DOPTIMIZED_DEBUG -I../.. -Iclang_x86/gen -I../../v8 -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -fcolor-diagnostics -pthread -m32 -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -O0 -g2 --sysroot=/usr/local/google/code/clankium/src/build/linux/debian_wheezy_i386-sysroot -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 check-templates -Wheader-hygiene -Wstring-conversion -Wno-unused-result -Wno-unused-variable -Wno-format -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-reserved-user-defined-literal -Wno-shift-negative-value -Wno-bitfield-width -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11 -fno-rtti -fno-exceptions -Wno-deprecated -c ../../v8/src/libplatform/task-queue.cc -o clang_x86/obj/v8/v8_libplatform/task-queue.o
In file included from ../../v8/src/libplatform/task-queue.cc:5:
../../v8/src/libplatform/task-queue.h:8:10: fatal error: 'queue' file not found
#include <queue>
         ^
1 error generated.

Tima Vaisburd

unread,
Nov 24, 2015, 5:37:42 PM11/24/15
to Chromium-dev, Dirk Pranke, Andrew Grieve, Xiaohan Wang
The GN configuation was

target_os = "android"
target_arch = "arm"
is_debug = true

--Tima

Tima Vaisburd

unread,
Nov 24, 2015, 6:43:41 PM11/24/15
to Chromium-dev, Dirk Pranke, Andrew Grieve, Xiaohan Wang
Removing "--sysroot=/usr/local/google/code/clankium/src/build/linux/debian_wheezy_i386-sysroot"
 when I repeating this command on command line prompt makes it compile.

I took a look at some .ninja files in content/ and media/ and there it looks like
--sysroot=/usr/local/google/code/clankium/src/third_party/android_tools/ndk/platforms/android-16/arch-arm

which looks like the right one.

Can it be the problem with sysroot path generation in GN in v8?

Dirk Pranke

unread,
Nov 24, 2015, 6:46:30 PM11/24/15
to Tima Vaisburd, Chromium-dev, Andrew Grieve, Xiaohan Wang
It sounds like you're missing the 32-bit x86 sysroot (which is used to build the v8 snapshot). 

Maybe re-run `gclient runhooks` with GYP_DEFINES='OS=android' and it should be automatically installed?

This is kind of a subtle point: you need to still have appropriate GYP_DEFINES set even if you are only doing GN builds. The gclient hooks rely on reading the environment variable to customize their behavior in some cases, and we don't yet have an equivalent solution for GN-only builds.

-- Dirk

Tima Vaisburd

unread,
Nov 24, 2015, 7:37:21 PM11/24/15
to Dirk Pranke, Chromium-dev, Andrew Grieve, Xiaohan Wang
Indeed, it helped, thank you so much!

I think the situation was aggravated by the fact that for GYP builds I use the cr tool. Then my chromium.gyp_env was "{}"

After I modified it to be "{ 'GYP_DEFINES': 'OS=android' }" I got a new file debian_wheezy_i386_sysroot.tgz and after that everything compiled.

This provokes a question though. At the first glance GN seems to be able to support parallel configurations, like cr: an output dirtectory can be configured and seems self-contained. But should they all be compatible with one GYP_DEFINES, on other words, parallel linux and android configurations won't work?

--Tima

Dirk Pranke

unread,
Nov 24, 2015, 7:42:02 PM11/24/15
to Tima Vaisburd, Chromium-dev, Andrew Grieve, Xiaohan Wang
On Tue, Nov 24, 2015 at 4:36 PM, Tima Vaisburd <ti...@google.com> wrote:
Indeed, it helped, thank you so much!

I think the situation was aggravated by the fact that for GYP builds I use the cr tool. Then my chromium.gyp_env was "{}"

After I modified it to be "{ 'GYP_DEFINES': 'OS=android' }" I got a new file debian_wheezy_i386_sysroot.tgz and after that everything compiled.

This provokes a question though. At the first glance GN seems to be able to support parallel configurations, like cr: an output dirtectory can be configured and seems self-contained. But should they all be compatible with one GYP_DEFINES, on other words, parallel linux and android configurations won't work?

In the few cases I am aware of where hooks and deps are os- or configuration-specific, we can usually be happy with one being a subset of another, e.g., if you use GYP_DEFINES=OS=android and deps_os="android", you can then build either android or desktop builds. There are probably cases where this won't work automatically and you need something more complicated (e.g., if you wanted to build for both arm and mips); the files can co-exist in the checkout, but a single `gclient sync` won't get you everything you need.

When I said "we don't yet have an equivalent solution for GN-only builds" that's the sort of challenge I had in mind.

If someone wanted to take a stab at solving these problems that would be most welcome.

-- Dirk

Andrew Grieve

unread,
Nov 25, 2015, 10:16:04 PM11/25/15
to Dirk Pranke, Tima Vaisburd, Chromium-dev, Xiaohan Wang
Maybe we should just always have the hook download the x86 and x64 sysroots?

Dirk Pranke

unread,
Nov 29, 2015, 1:50:21 PM11/29/15
to Andrew Grieve, Tima Vaisburd, Chromium-dev, Xiaohan Wang
maybe ...

Ngố Quyết

unread,
Nov 29, 2015, 4:47:09 PM11/29/15
to Chromium-dev


Vào 05:33:43 UTC + 7 Thứ Tư, ngày 25 tháng 11 năm 2015, Tima Vaisburd was viết:
Chào,

Sau khi đồng bộ gần đây tôi không thể biên dịch Android với GN nữa.
Nó trông giống như V8 biên soạn không thấy c ++ header chuẩn.

Không ai có một ý tưởng những gì có thể là sai?
Các chương trình có màu xanh.

Cảm ơn nhiều trước.

tôi đã nhận

Trong tập tin bao gồm từ ../../v8/src/libplatform/task- queue.cc:5:
../../v8/src/libplatform/task- queue.h: 8: 10: Lỗi chết người: 'xếp hàng' không tìm thấy tệp
#include <queue>
         ^
1 lỗi được tạo ra.

và các công cụ tương tự.

Các dòng lệnh:

[651/11751] CXX clang_x86 / obj / v8 / v8_ libplatform / nhiệm vụ queue.o
FAILED: ../../third_party/llvm-build/ phát hành + Khẳng định / bin / clang ++ -MMD -MF clang_x86 / obj / v8 / v8_ libplatform / nhiệm vụ queue.od -DV8_DEPRECATION_WARNINGS -DCLD_VERSION = 2 -DENABLE_MDNS = 1 - DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS = 1 -DENABLE_PDF = 1 -DENABLE_PRINTING = 1 -DENABLE_BASIC_PRINTING = 1 -DENABLE_PRINT_PREVIEW = 1 -DENABLE_SPELLCHECK = 1 -DDONT_EMBED_BUILD_METADATA -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_ VẬN TẢI -DUSE_ASH = 1 -DUSE_AURA = 1 -DUSE_PANGO = 1 -DUSE_CAIRO = 1 -DUSE_CLIPBOARD_AURAX11 = 1 -DUSE_DEFAULT_RENDER_THEME = 1 -DUSE_GLIB = 1 -DUSE_OPENSSL = 1 -DUSE_NSS_CERTS = 1 -DUSE_X11 = 1 -DENABLE_WEBRTC = 1 -DENABLE_EXTENSIONS = 1 -DENABLE_CONFIGURATION_POLICY -DENABLE_TASK_MANAGER = 1 -DENABLE_THEMES = 1 -DENABLE_CAPTIVE_PORTAL_ PHÁT HIỆN = 1 -DENABLE_SESSION_SERVICE = 1 -DENABLE_APP_LIST = 1 -DENABLE_SETTINGS_APP = 1 -DENABLE_SUPERVISED_USERS = 1 -DENABLE_SERVICE_DISCOVERY = 1 -DENABLE_AUTOFILL_DIALOG = 1 -DENABLE_GOOGLE_NOW = 1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_HIDPI = 1 -DENABLE_TOPCHROME_MD = 1 -DENABLE_BACKGROUND = 1 -DENABLE_PRE_SYNC_BACKUP -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD - DENABLE_MEDIA_ROUTER = 1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION = 247.874-1 -D_FILE_OFFSET_BITS = 64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED = 1 -DWTF_USE_DYNAMIC_ANNOTATIONS = 1 -DV8_I18N_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_TARGET_ARCH_ARM -DCAN_USE_ARMV7_INSTRUCTIONS -DCAN_USE_VFP3_INSTRUCTIONS -DCAN_USE_VFP32DREGS -DUSE_EABI_HARDFLOAT = 0 -DENABLE_DISASSEMBLER - DV8_ENABLE_CHECKS -DOBJECT_PRINT -DVERIFY_HEAP -DDEBUG -DOPTIMIZED_DEBUG -Tôi ../ .. -Iclang_x86 / gen -Tôi ../../ v8 -fno-nghiêm-aliasing --param = ssp-đệm-size = 4 -fstack-bảo vệ -funwind Bàn -fPIC -pipe -fcolor chẩn đoán -pthread -m32 -momit-lá-frame-pointer -mstack-alignment = 16 -mstackrealign -O0 -g2 --sysroot = / usr / local / google / code / clankium / src / build / linux / debian_wheezy_i386-sysroot -fvisibility = ẩn -Xclang -Load -Xclang ../../third_party/llvm-build/ phát hành + Khẳng định / lib / libFindBadConstructs.so -Xclang -Thêm-plugin -Xclang tìm -bad-cấu trúc -Xclang -plugin-arg-tìm-bad- xây dựng -Xclang kiểm tra-templates -Wheader-vệ sinh -Wstring chuyển đổi -Wno-chưa sử dụng kết quả -Wno-chưa sử dụng biến -Wno định dạng -Wendif-nhãn - Wno-thiếu-điền dã initializers -Wno-chưa sử dụng tham số -Werror -Wno-c ++ 11-thu hẹp -Wno phủ-switch-default -Wno-phản-đăng ký -Wno-không cần thiết-internal- khai -Wno không phù hợp -missing- ghi đè -Wno-dành-user-xác định trước chữ -Wno-shift-âm-giá trị -Wno-bitfield-width -fno-threadsafe-tĩnh -fvisibility-inlines-ẩn -Wno-undefined-bool chuyển đổi -Wno -tautological-undefined- so sánh -std = gnu ++ 11 -fno-rtti -fno-ngoại lệ -Wno-phản -c ../../v8/src/libplatform/task- queue.cc -o clang_x86 / obj / v8 / v8_ libplatform / nhiệm vụ queue.o
Trong tập tin bao gồm từ ../../v8/src/libplatform/task- queue.cc:5:
../../v8/src/libplatform/task- queue.h: 8: 10: Lỗi chết người: 'xếp hàng' không tìm thấy tệp
#include <queue>
         ^
1 lỗi được tạo ra.

Mikhail Fomitchev

unread,
Dec 1, 2015, 3:51:38 PM12/1/15
to Chromium-dev
I've just hit this as well. My GYP_DEFINES is empty - I import all the settings from .gypi files. If it wasn't for Andrew's help, it would probably take me forever to figure this out.

Andrew Grieve

unread,
Dec 2, 2015, 4:10:28 PM12/2/15
to Mikhail Fomitchev, Chromium-dev

I think we should:
1. Create a gn assert to catch this, and
2. Always install x86 & x64 sysroots

Please discuss on the bug if you disagree or have additional thoughts.

On Tue, Dec 1, 2015 at 3:51 PM, Mikhail Fomitchev <mfomi...@google.com> wrote:
I've just hit this as well. My GYP_DEFINES is empty - I import all the settings from .gypi files. If it wasn't for Andrew's help, it would probably take me forever to figure this out.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Biao She

unread,
Dec 3, 2015, 11:29:56 AM12/3/15
to Chromium-dev
I did GYP_DEFINES='OS=android' and gclient runhooks. But somehow I still didn't get debian_wheezy_i386-sysroot.
Andrew told me a quick way to walkaround the issue. You can run
"build/linux/sysroot_scripts/install-sysroot.py --arch i386" from your chromium's src directory to manually download the sysroot if the above command didn't work for you
Reply all
Reply to author
Forward
0 new messages