Hi,
I am trying to build the Android Lollipop images for Freescale imx6 sabre-sd board. The build gets successfully completed as mentioned in the Freescale documentation.
Now, I want to compile the user build with "make WITH_DEXPREOPT=true" so as to enable pre-optimization of system apps. Enabling this option builds the odex/oat files in /system/app folder , rather than the using the /data/dalvik-cache on first boot.
However, I am getting build errors after enabling the WITH_DEXPREOPT option.
The build gets completed successfully for a Lollipop Nexus device with the same option enabled.
Following is a snippet of the error logs on imx6 sabresd board:
===============================================================================
Copy: out/target/product/sabresd_6dq/root/fstab.freescale
dex2oatd I 9111 9111 art/dex2oat/dex2oat.cc:1239] out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --boot-image=out/target/product/sabresd_6dq/dex_bootjars/system/framework/boot.art --dex-file=out/target/product/sabresd_6dq/obj/APPS/A2dpSinkApp_intermediates/arm/package.odex.input --dex-location=/system/app/A2dpSinkApp/A2dpSinkApp.apk --oat-file=out/target/product/sabresd_6dq/obj/APPS/A2dpSinkApp_intermediates/arm/package.odex --android-root=out/target/product/sabresd_6dq/system --instruction-set=arm --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols
dex2oatd E 9111 9111 art/runtime/gc/heap.cc:421] 0x5742a778
dex2oatd F 9111 9111 art/runtime/gc/heap.cc:422] There's a gap between the image space and the main space
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] Runtime aborting...
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] (Aborting thread was not attached to runtime!)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #00 pc 00006a22 /home/hscuser/Lollipop/out/host/linux-x86/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+82)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #01 pc 00004141 /home/hscuser/Lollipop/out/host/linux-x86/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+33)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #02 pc 0036f699 /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+121)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #03 pc 0033a9ad /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+301)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #04 pc 0033a879 /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::Dumpable<art::AbortState>::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+41)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #05 pc 003394f8 /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (std::__1::basic_ostream<char, std::__1::char_traits<char> >& art::operator<<<art::AbortState>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, art::Dumpable<art::AbortState> const&)+40)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #06 pc 003329e8 /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::Runtime::Abort()+168)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #07 pc 000f6209 /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::LogMessage::~LogMessage()+393)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #08 pc 001eb8bb /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::gc::Heap::Heap(unsigned int, unsigned int, unsigned int, unsigned int, double, double, unsigned int, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, art::InstructionSet, art::gc::CollectorType, art::gc::CollectorType, unsigned int, unsigned int, bool, unsigned int, unsigned int, bool, bool, bool, bool, bool, bool, bool, bool, bool, unsigned long long)+5707)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #09 pc 00333202 /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::Runtime::Init(std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*> > > const&, bool)+1298)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #10 pc 00332cbd /home/hscuser/Lollipop/out/host/linux-x86/lib/libartd.so (art::Runtime::Create(std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*> > > const&, bool)+93)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #11 pc 0001ea1a /home/hscuser/Lollipop/out/host/linux-x86/bin/dex2oatd (art::Dex2Oat::CreateRuntime(std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*> > > const&, art::InstructionSet)+42)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #12 pc 0001655f /home/hscuser/Lollipop/out/host/linux-x86/bin/dex2oatd (art::Dex2Oat::Create(art::Dex2Oat**, std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void const*> > > const&, art::CompilerOptions const&, art::Compiler::Kind, art::InstructionSet, art::InstructionSetFeatures, art::VerificationResults*, art::DexFileToMethodInlinerMap*, unsigned int)+143)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #13 pc 00010290 /home/hscuser/Lollipop/out/host/linux-x86/bin/dex2oatd (art::dex2oat(int, char**)+11296)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #14 pc 0000d660 /home/hscuser/Lollipop/out/host/linux-x86/bin/dex2oatd (main+32)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #15 pc 000194d2 /lib/i386-linux-gnu/libc-2.15.so (__libc_start_main+242)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] native: #16 pc 0000ccc0 /home/hscuser/Lollipop/out/host/linux-x86/bin/dex2oatd (???)
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] Dumping all threads without appropriate locks held: thread list lock mutator lock
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] All threads:
dex2oatd F 9111 9111 art/runtime/runtime.cc:284] DALVIK THREADS (0):
dex2oatd F 9111 9111 art/runtime/runtime.cc:284]
make: *** [out/target/product/sabresd_6dq/obj/APPS/A2dpSinkApp_intermediates/arm/package.odex] Aborted (core dumped)
make: *** Deleting file `out/target/product/sabresd_6dq/obj/APPS/A2dpSinkApp_intermediates/arm/package.odex'
#### make failed to build some targets (02:24 (mm:ss)) ####
======================================================================================
Please suggest on how we can enable the WITH_DEXPREOPT option in Freescale imx sabresd board Lollipop release.
Thanks in advance!!
Deepika