I followed all the steps on the wiki to configure and build Chromium on Android. I'm on Ubuntu 12.04. I ran the following commands after all the setup and gclient syncing etc:
. build/android/envsetup.sh --target-arch=x86
android_gyp
ninja -C out/Release -j10 content_shell_apk
Chrome was compiling fine until this error:
[376/9607] CXX obj/v8/src/v8_base.ia32.hydrogen.o
FAILED: /mnt/chromebuild/src/third_party/android_tools/ndk//toolchains/x86-4.6/prebuilt/linux-x86_64/bin/i686-linux-android-g++ -MMD -MF obj/v8/src/v8_base.ia32.hydrogen.o.d -DANGLE_DX11 -D_FILE_OFFSET_BITS=64 -DUSE_LINUX_BREAKPAD -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_GPU=1 -DUSE_OPENSSL=1 -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_LANGUAGE_DETECTION=1 -DV8_TARGET_ARCH_IA32 -DENABLE_DEBUGGER_SUPPORT -DCAN_USE_VFP_INSTRUCTIONS -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../v8/src --param=ssp-buffer-size=4 -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-format -m32 -mmmx -march=pentium4 -msse2 -mfpmath=sse -fuse-ld=gold -ffunction-sections -funwind-tables -g -fno-short-enums -finline-limit=64 -Wa,--noexecstack --sysroot=/mnt/chromebuild/src/third_party/android_tools/ndk//platforms/android-14/arch-x86 -I/mnt/chromebuild/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -fno-stack-protector -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -O2 -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated -c ../../v8/src/hydrogen.cc -o obj/v8/src/v8_base.ia32.hydrogen.o
{standard input}: Assembler messages:
{standard input}:80537: Warning: end of file not at end of a line; newline inserted
{standard input}:81120: Error: unknown pseudo-op: `.cfi_d'
{standard input}:81120: Error: open CFI at the end of file; missing .cfi_endproc directive
i686-linux-android-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
I'm not sure how to attach the preprocessed source.--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
/mnt/chromebuild/src/third_party/android_tools/ndk//toolchains/x86-4.6/prebuilt/linux-x86_64/bin/i686-linux-android-g++ -MMD -MF obj/v8/src/v8_base.ia32.hydrogen.o.d -DANGLE_DX11 -D_FILE_OFFSET_BITS=64 -DUSE_LINUX_BREAKPAD -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_GPU=1 -DUSE_OPENSSL=1 -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_LANGUAGE_DETECTION=1 -DV8_TARGET_ARCH_IA32 -DENABLE_DEBUGGER_SUPPORT -DCAN_USE_VFP_INSTRUCTIONS -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../v8/src --param=ssp-buffer-size=4 -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-format -m32 -mmmx -march=pentium4 -msse2 -mfpmath=sse -fuse-ld=gold -ffunction-sections -funwind-tables -g -fno-short-enums -finline-limit=64 -Wa,--noexecstack --sysroot=/mnt/chromebuild/src/third_party/android_tools/ndk//platforms/android-14/arch-x86 -I/mnt/chromebuild/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -fno-stack-protector -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -O2 -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated -S ../../v8/src/hydrogen.cc -o obj/v8/src/v8_base.ia32.hydrogen.s
Then look at the content of obj/v8/src/v8_base.ia32.hydrogen.s
(for the record, this is your original command, with '-c' changed to '-S' and '..../hydrogen.o' changed to '...../hydrogen.s')
By the way, are you sure you have enough disk space to build Chromium? There are plenty of weird errors that pop up when trying to build on a full disk.
.LVL6101:.LBE70620:.LBE70619:.loc 3 332 0addl $44, %esp <--- 80537.cfi_remember_state.LCFI3260:.cfi_def_cfa_offset 20popl %ebx.LCFI3261:.cfi_def_cfa_offset 16.cfi_restore 3popl %esi
.LCFI3294:.cfi_def_cfa_offset 16 <---- 81120.cfi_restore 3popl %esi
chromebuild@mantis:/mnt/chromebuild/src/v8$ as --versionGNU assembler (GNU Binutils for Ubuntu) 2.22Copyright 2011 Free Software Foundation, Inc.This program is free software; you may redistribute it under the terms ofthe GNU General Public License version 3 or later.This program has absolutely no warranty.This assembler was configured for a target of `x86_64-linux-gnu'.
Actually I can think of a difference. Initially, when I got the error, I was running under a byobu session. Without it, things go OK. I tried again under a byobu session and get random failures at different points in the compile process. Can you think of any reason running under byobu would cause this? I made sure to set my android env using the provided script…
Things remain weird. I've made it quite a bit further. I keep getting errors, but then I'm usually able to re-run the command by hand without failure, then restart the build process.
That makes sense.
I resolved some of the earlier issues by installing ia32-libs and libc6-dev-i386.
However I'm still failing, I think because of 32-bit vs 64-bit issues, with errors like this:
[12/5685] LINK mksnapshot.ia32
FAILED: /usr/bin/g++ -Wl,-z,now -Wl,-z,relro -pthread -fPIC -m32 -Wl,--fatal-warnings -Wl,--warn-shared-textrel -o mksnapshot.ia32 -Wl,--start-group obj.host/v8/src/mksnapshot.ia32.mksnapshot.o obj.host/v8/tools/gyp/libv8_base.ia32.a obj.host/v8/tools/gyp/libv8_nosnapshot.ia32.a -Wl,--end-group
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
This is :80537 and context:.LVL6101:.LBE70620:.LBE70619:.loc 3 332 0addl $44, %esp <--- 80537.cfi_remember_state.LCFI3260:.cfi_def_cfa_offset 20popl %ebx.LCFI3261:.cfi_def_cfa_offset 16.cfi_restore 3popl %esiI'm not an assembler so I have no clue what's going on here :-)This is :81120 (where previously it complained about proc .cfi_d:.LCFI3294:.cfi_def_cfa_offset 16 <---- 81120.cfi_restore 3popl %esiClearly this is what it was complaining about, but not sure why.
{standard input}: Assembler messages:
{standard input}:80537: Warning: end of file not at end of a line; newline inserted
{standard input}:81120: Error: unknown pseudo-op: `.cfi_d'
{standard input}:81120: Error: open CFI at the end of file; missing .cfi_endproc directive
i686-linux-android-g++: internal compiler error: Killed (program cc1plus)Seem to suggest that the assembler didn't see the same input. It's as if some parts of the generated were truncated. This is not the kind of issue that appears when you don't have g++multilibs installed :)If you still experience similar build issues, please consider checking your hardware as suggested by Viktor. There may be something with your CPU / memory / disk which creates these spurious errors.
By the way, to follow up on this issue, I think I've narrowed it down to it being a parallel execution issue. After a while it would start failing reliably every X times, where X was what I passed to ninja with -j. I'm running it now without any parallelization at all and it seems to be going ok.Is it possible -j10 was just too much for my EC2 box? Seems like a bunch of weird errors even so.
That's not a shell script, that's the linker. Do you have enough memory? Is there a message in your kernel log about the kernel OOM killer sending the process a signal?
On 17 July 2013 14:58, Jonathan Lipps <jli...@gmail.com> wrote: