android8.1 source code build failed

-3

google android oreo source code build failed

many people has same problem

#

java -version openjdk version "1.8.0_45-internal" OpenJDK Runtime Environment (build 1.8.0_45-internal-b14) OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

computer:

i7 and 16G

operating system:

ubuntu 14.04

#

build failed and log print:

native: __libc_start_main native: /build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:287 native: #11 pc 000000000000b4d8 /home/xinsi/code/go_edition/out/host/linux-x86/bin/dex2oatd (???) (no managed stack frames)


Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) OS: Linux 3.13.0-24-generic (x86_64) Cmdline: out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx64m --compiled-classes=frameworks/base/config/compiled-classes-phone --image-classes=frameworks/base/config/preloaded-classes --dirty-image-objects=frameworks/base/config/dirty-image-objects --dex-file=out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/legacy-test_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.boot_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/android.hidl.base-V1.0-java_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/android.hidl.manager-V1.0-java_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-framework_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-telephony-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-telephony-base_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-ims-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-telecom-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-cta_intermediates/javalib.jar --dex-location=/system/framework/core-oj.jar --dex-location=/system/framework/core-libart.jar --dex-location=/system/framework/conscrypt.jar --dex-location=/system/framework/okhttp.jar --dex-location=/system/framework/bouncycastle.jar --dex-location=/system/framework/apache-xml.jar --dex-location=/system/framework/legacy-test.jar --dex-location=/system/framework/ext.jar --dex-location=/system/framework/framework.jar --dex-location=/system/framework/telephony-common.jar --dex-location=/system/framework/voip-common.jar --dex-location=/system/framework/ims-common.jar --dex-location=/system/framework/org.apache.http.legacy.boot.jar --dex-location=/system/framework/android.hidl.base-V1.0-java.jar --dex-location=/system/framework/android.hidl.manager-V1.0-java.jar --dex-location=/system/framework/mediatek-common.jar --dex-location=/system/framework/mediatek-framework.jar --dex-location=/system/framework/mediatek-telephony-common.jar --dex-location=/system/framework/mediatek-telephony-base.jar --dex-location=/system/framework/mediatek-ims-common.jar --dex-location=/system/framework/mediatek-telecom-common.jar --dex-location=/system/framework/mediatek-cta.jar --oat-symbols=out/target/product/k39tv1_bsp/symbols/system/framework/arm/boot.oat --oat-file=out/target/product/k39tv1_bsp/dex_bootjars/system/framework/arm/boot.oat --oat-location=/system/framework/arm/boot.oat --image=out/target/product/k39tv1_bsp/dex_bootjars/system/framework/arm/boot.art --base=0x70000000 --instruction-set=arm --instruction-set-variant=cortex-a53 --instruction-set-features=default --android-root=out/target/product/k39tv1_bsp/system --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --multi-image --no-inline-from=core-oj.jar --generate-mini-debug-info Thread: 4741 "dex2oatd" Registers: rax: 0x0000000000000000 rbx: 0x0000000000001285 rcx: 0xffffffffffffffff rdx: 0x0000000000000006 rdi: 0x0000000000001285 rsi: 0x0000000000001285 rbp: 0x00007fff2b1acce0 rsp: 0x00007fff2b1acc98 r8 : 0x00007f4c18f3d491 r9 : 0x00007f4c18f3d491 r10: 0x00007f4c1708a871 r11: 0x0000000000000246 r12: 0x00007f4c1911daf0 r13: 0x00007f4c1911daf0 r14: 0x00007f4c18f3d3e0 r15: 0x00007fff2b1acd50 rip: 0x00007f4c153ba389 eflags: 0x00000246 [ PF ZF IF ] cs: 0x00000033 gs: 0x00000000 fs: 0x00000000

Backtrace: #00 pc 00000000000f8389 /lib/x86_64-linux-gnu/libc-2.19.so (syscall+25) syscall /build/eglibc-SvCtMH/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #01 pc 00000000005b7102 /home/xinsi/code/go_edition/out/host/linux-x86/lib64/libartd.so (art::Runtime::Abort(char const*)+498) art::Runtime::Abort(char const*) art/runtime/runtime.cc:548 #02 pc 00000000000095ba /home/xinsi/code/go_edition/out/host/linux-x86/lib64/libbase.so (android::base::LogMessage::~LogMessage()+858) std::__1::function::operator()(char const*) const external/libcxx/include/functional:1915 ~LogMessage system/core/base/logging.cpp:433 #03 pc 0000000000197eb0 /home/xinsi/code/go_edition/out/host/linux-x86/lib64/libartd.so (unix_file::FdFile::Destroy()+448) unix_file::FdFile::Destroy() art/runtime/base/unix_file/fd_file.cc:72 #04 pc 00000000001981b7 /home/xinsi/code/go_edition/out/host/linux-x86/lib64/libartd.so (unix_file::FdFile::~FdFile()+23) ~FdFile art/runtime/base/unix_file/fd_file.cc:101 ~FdFile art/runtime/base/unix_file/fd_file.cc:100 #05 pc 0000000000024bad /home/xinsi/code/go_edition/out/host/linux-x86/bin/dex2oatd (art::Dex2Oat::CopyStrippedToUnstripped()+941) std::__1::default_delete::operator()(unix_file::FdFile*) const external/libcxx/include/memory:2399 std::__1::unique_ptr >::reset(unix_file::FdFile*) external/libcxx/include/memory:2608 ~unique_ptr external/libcxx/include/memory:2576 art::Dex2Oat::CopyStrippedToUnstripped() art/dex2oat/dex2oat.cc:2220 #06 pc 000000000000bc1f /home/xinsi/code/go_edition/out/host/linux-x86/bin/dex2oatd (main+1567) art::CompileImage(art::Dex2Oat&) art/dex2oat/dex2oat.cc:3024 art::Dex2oat(int, char**) art/dex2oat/dex2oat.cc:3129 main art/dex2oat/dex2oat.cc:3139 #07 pc 0000000000021f44 /lib/x86_64-linux-gnu/libc-2.19.so (__libc_start_main+244) __libc_start_main /build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:287 #08 pc 000000000000b4d8 /home/xinsi/code/go_edition/out/host/linux-x86/bin/dex2oatd (???)

Fault message /bin/bash: 行 1: 4741 已放弃 (核心已转储) ( out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx64m --compiled-classes=frameworks/base/config/compiled-classes-phone --image-classes=frameworks/base/config/preloaded-classes --dirty-image-objects=frameworks/base/config/dirty-image-objects --dex-file=out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/legacy-test_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.boot_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/android.hidl.base-V1.0-java_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/android.hidl.manager-V1.0-java_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-framework_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-telephony-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-telephony-base_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-ims-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-telecom-common_intermediates/javalib.jar --dex-file=out/target/common/obj/JAVA_LIBRARIES/mediatek-cta_intermediates/javalib.jar --dex-location=/system/framework/core-oj.jar --dex-location=/system/framework/core-libart.jar --dex-location=/system/framework/conscrypt.jar --dex-location=/system/framework/okhttp.jar --dex-location=/system/framework/bouncycastle.jar --dex-location=/system/framework/apache-xml.jar --dex-location=/system/framework/legacy-test.jar --dex-location=/system/framework/ext.jar --dex-location=/system/framework/framework.jar --dex-location=/system/framework/telephony-common.jar --dex-location=/system/framework/voip-common.jar --dex-location=/system/framework/ims-common.jar --dex-location=/system/framework/org.apache.http.legacy.boot.jar --dex-location=/system/framework/android.hidl.base-V1.0-java.jar --dex-location=/system/framework/android.hidl.manager-V1.0-java.jar --dex-location=/system/framework/mediatek-common.jar --dex-location=/system/framework/mediatek-framework.jar --dex-location=/system/framework/mediatek-telephony-common.jar --dex-location=/system/framework/mediatek-telephony-base.jar --dex-location=/system/framework/mediatek-ims-common.jar --dex-location=/system/framework/mediatek-telecom-common.jar --dex-location=/system/framework/mediatek-cta.jar --oat-symbols=out/target/product/k39tv1_bsp/symbols/system/framework/arm/boot.oat --oat-file=out/target/product/k39tv1_bsp/dex_bootjars/system/framework/arm/boot.oat --oat-location=/system/framework/arm/boot.oat --image=out/target/product/k39tv1_bsp/dex_bootjars/system/framework/arm/boot.art --base=0x70000000 --instruction-set=arm --instruction-set-variant=cortex-a53 --instruction-set-features=default --android-root=out/target/product/k39tv1_bsp/system --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --multi-image --no-inline-from=core-oj.jar --generate-mini-debug-info ) [ 79% 64599/80927] //frameworks/av/media/libmedia:libmedia_omx header-abi-dumper omx/1.0/WOmxNode.cpp ninja: build stopped: subcommand failed. 17:26:34 ninja failed with: exit status 1

failed to build some targets (01:19:28 (hh:mm:ss))
android
asked on Stack Overflow Dec 29, 2017 by Jack Chen

2 Answers

0

from mtk, we mark the follow code /art/dex2oat/dex2oat.cc raw_options.push_back(std::make_pair("-Xnoimage-dex2oat", nullptr));

answered on Stack Overflow Jan 2, 2018 by Jack Chen
0

You can just build without dex2oat. like this:

export WITH_DEXPREOPT=false
source build/envsetup.sh
lunch 2
#export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
make -j4

or you can use your own jdk1.8 instead of that in the aosp tools like this:

#export WITH_DEXPREOPT=false
source build/envsetup.sh
lunch 2
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
make -j4
answered on Stack Overflow Aug 1, 2018 by DTS

User contributions licensed under CC BY-SA 3.0