Ninja/android build failure

220 views
Skip to first unread message

Justin

unread,
Nov 13, 2012, 9:33:08 PM11/13/12
to chromi...@chromium.org
I've switched back from Linux builds to Android, and now I'm getting this error:

[7571/7693] CXX obj/content/shell/content_shell.shell_main.o
FAILED: /home/justin/Projects/chromium/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin//arm-linux-androideabi-g++ -MMD -MF obj/content/shell/content_shell.shell_main.o.d -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_THREADING -DENABLE_GPU=1 -DUSE_OPENSSL=1 -DENABLE_EGLIMAGE=1 -DUSE_SKIA=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_SYMBOLS_ID=""' -DANDROID_UPSTREAM_BRINGUP=1 -DHAVE_SYS_UIO_H -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -I../.. -I../../third_party/khronos -Werror -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -mthumb -march=armv7-a -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-tree-sra -fuse-ld=gold -Wno-psabi -mthumb-interwork -ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums -finline-limit=64 -Wa,--noexecstack --sysroot=/home/justin/Projects/chromium/src/third_party/android_tools/ndk//platforms/android-9/arch-arm -I/home/justin/Projects/chromium/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -g -fomit-frame-pointer -fdata-sections -ffunction-sections -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -Wno-abi  -c ../../content/shell/shell_main.cc -o obj/content/shell/content_shell.shell_main.o
../../content/shell/shell_main.cc: In function 'int main(int, char const**)':
../../content/shell/shell_main.cc:36:10: error: 'ContentMain' is not a member of 'content'
[7571/7693] CXX obj/content/shell/content_shell_lib.webkit_test_runner_host.o
ninja: build stopped: subcommand failed.


It looks like I'm possibly building the wrong content_main - however I've performed all the steps here:
and built from clean (a couple of times to be sure).

Any ideas?

Nico Weber

unread,
Nov 13, 2012, 10:02:42 PM11/13/12
to jay...@gmail.com, chromi...@chromium.org
Try `ninja -C out/Debug content_shell_apk`. It's possible that the
chrome/android folks have a few broken projects in their build (if
that's the case: tsk, tsk) and building all targets doesn't work. Does
building a specific target work?

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

Justin

unread,
Nov 13, 2012, 10:47:15 PM11/13/12
to chromi...@chromium.org, jay...@gmail.com
Yep, my bad, that did it. Annoying, because ninja with no targets (all) didn't build it. Should that be logged or is it a quick fix?

Tommy Nyquist

unread,
Nov 13, 2012, 10:50:24 PM11/13/12
to jay...@gmail.com, chromium-dev
To build all available Chrome for Android targets, use the 'All' target (note the uppercase A).

Justin Saunders

unread,
Nov 14, 2012, 12:04:01 AM11/14/12
to Tommy Nyquist, chromium-dev
Is that the same as building with no target specified?

Sent from my iPhone

Tommy Nyquist

unread,
Nov 14, 2012, 12:06:35 AM11/14/12
to Justin Saunders, chromium-dev
Building with no target specified builds the 'all' target. That target is not supported on Android.

To achieve a similar result for Android, you need to specify the 'All' target.
For example:
$ ninja -C out/Debug All

Torne (Richard Coles)

unread,
Nov 14, 2012, 5:50:05 AM11/14/12
to nyq...@chromium.org, Justin Saunders, chromium-dev
Are we intending to fix the gyp files so that targets that can't be built on android are actually excluded, or is that going to require too much conditional logic all over the place?

David Turner

unread,
Nov 14, 2012, 7:05:01 AM11/14/12
to Torne (Richard Coles), nyq...@chromium.org, Justin Saunders, chromium-dev
I'd like to clarify a few things:

- Building with no target specified implies the "All" target. This is done through build/android/envsetup.sh so only impacts the Android build.

- The "all" target specifies additional stuff that is known to not build properly.

We know it's hideous, and we plan to fix this.

Jonathan Dixon

unread,
Nov 14, 2012, 12:43:01 PM11/14/12
to di...@chromium.org, Torne (Richard Coles), nyquist, Justin Saunders, chromium-dev
On 14 November 2012 04:05, David Turner <di...@chromium.org> wrote:
I'd like to clarify a few things:

- Building with no target specified implies the "All" target. This is done through build/android/envsetup.sh so only impacts the Android build.

- The "all" target specifies additional stuff that is known to not build properly.

We know it's hideous, and we plan to fix this.



Awesome! Several different times I've done a "make chrome" and then hated myself for then wasting several minutes trying to debug the obscure linker error it spits out. (I looked to remove the chrome target from android last time it bit me, but was dissuaded due to the "too much conditional logic all over the place" aspect.)
Reply all
Reply to author
Forward
0 new messages