[Nexus 5 Developer Discussion [Developers Only]] 95A31:
Recently my free time is low so I abandon manual meld of AOSP and CAF kernel, and use as base the CAF kernel by CyanogenMod. For the same reason I used CAF device tree by CyanogenMod. This chooses force me to use some CAF by CyanogenMod repos .

After some fixes related to:

QCOM makefiles (1 , 2 ),

kernel toolchain (1, 2),

SEPolicy,

minor build issues (1, 2, 3).

I managed to have a complete build but it bootloop with the following logcat:

F/dex2oat (23926): art/compiler/oat_writer.cc:561] Check failed: method != NULL void com.android.okhttp.TcmIdleTimerMonitor.<clinit>()
F/dex2oat (23926): art/runtime/runtime.cc:289] Runtime aborting...
F/dex2oat (23926): art/runtime/runtime.cc:289] Aborting thread:
F/dex2oat (23926): art/runtime/runtime.cc:289] "main" prio=5 tid=1 Runnable (still starting up)
F/dex2oat (23926): art/runtime/runtime.cc:289] | group="" sCount=0 dsCount=0 obj=0x0 self=0xb5cdb400
F/dex2oat (23926): art/runtime/runtime.cc:289] | sysTid=23926 nice=0 cgrp=default sched=0/0 handle=0xb6f1ebec
F/dex2oat (23926): art/runtime/runtime.cc:289] | state=R schedstat=( 0 0 0 ) utm=2173 stm=100 core=3 HZ=100
F/dex2oat (23926): art/runtime/runtime.cc:289] | stack=0xbe4c3000-0xbe4c5000 stackSize=8MB
F/dex2oat (23926): art/runtime/runtime.cc:289] | held mutexes= "abort lock" "mutator lock"(shared held)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #00 pc 000045b4 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #01 pc 0025b99d /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #02 pc 0023e14d /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+152)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #03 pc 002305a7 /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, art::Thread*)+22)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #04 pc 00230873 /system/lib/libart.so (art::Runtime::Abort()+470)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #05 pc 0009e713 /system/lib/libart.so (art::LogMessage::~LogMessage()+2046)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #06 pc 001dc345 /system/lib/libart-compiler.so (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #07 pc 001decdd /system/lib/libart-compiler.so (art::eek:atWriter::InitOatCodeDexFiles(unsigned int)+424)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #08 pc 001df9bb /system/lib/libart-compiler.so (art::eek:atWriter::eek:atWriter(std::__1::vector<art::DexFile const*, std::__1::allocator<art::DexFile const*> > const&, unsigned int, unsigned int, int, art::CompilerDriver const*, art::TimingLogger*, art::SafeMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, art::TrackingAllocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, (art::AllocatorTag)6> >*)+454)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #09 pc 0000b0bb /system/bin/dex2oat (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #10 pc 0000d24d /system/bin/dex2oat (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #11 pc 0000fddd /system/lib/libc.so (__libc_init+44)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #12 pc 00004528 /system/bin/dex2oat (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] (no managed stack frames)
F/dex2oat (23926): art/runtime/runtime.cc:289] Pending exception java.lang.NoClassDefFoundError thrown by 'unknown throw location'
F/dex2oat (23926): art/runtime/runtime.cc:289] java.lang.NoClassDefFoundError: com.android.okhttp.TcmIdleTimerMonitor
F/dex2oat (23926): art/runtime/runtime.cc:289] (Throwable with empty stack trace)Dumping all threads without appropriate locks held: thread list lock
F/dex2oat (23926): art/runtime/runtime.cc:289] All threads:
F/dex2oat (23926): art/runtime/runtime.cc:289] DALVIK THREADS (1):
F/dex2oat (23926): art/runtime/runtime.cc:289] "main" prio=5 tid=1 Runnable (still starting up)
F/dex2oat (23926): art/runtime/runtime.cc:289] | group="" sCount=0 dsCount=0 obj=0x0 self=0xb5cdb400
F/dex2oat (23926): art/runtime/runtime.cc:289] | sysTid=23926 nice=0 cgrp=default sched=0/0 handle=0xb6f1ebec
F/dex2oat (23926): art/runtime/runtime.cc:289] | state=R schedstat=( 0 0 0 ) utm=2173 stm=100 core=3 HZ=100
F/dex2oat (23926): art/runtime/runtime.cc:289] | stack=0xbe4c3000-0xbe4c5000 stackSize=8MB
F/dex2oat (23926): art/runtime/runtime.cc:289] | held mutexes= "abort lock" "mutator lock"(shared held)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #00 pc 000045b4 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #01 pc 0025b99d /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #02 pc 0023e14d /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+152)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #03 pc 002467fd /system/lib/libart.so (art::ThreadList::DumpLocked(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+60)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #04 pc 00230817 /system/lib/libart.so (art::Runtime::Abort()+378)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #05 pc 0009e713 /system/lib/libart.so (art::LogMessage::~LogMessage()+2046)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #06 pc 001dc345 /system/lib/libart-compiler.so (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #07 pc 001decdd /system/lib/libart-compiler.so (art::eek:atWriter::InitOatCodeDexFiles(unsigned int)+424)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #08 pc 001df9bb /system/lib/libart-compiler.so (art::eek:atWriter::eek:atWriter(std::__1::vector<art::DexFile const*, std::__1::allocator<art::DexFile const*> > const&, unsigned int, unsigned int, int, art::CompilerDriver const*, art::TimingLogger*, art::SafeMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, art::TrackingAllocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, (art::AllocatorTag)6> >*)+454)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #09 pc 0000b0bb /system/bin/dex2oat (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #10 pc 0000d24d /system/bin/dex2oat (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #11 pc 0000fddd /system/lib/libc.so (__libc_init+44)
F/dex2oat (23926): art/runtime/runtime.cc:289] native: #12 pc 00004528 /system/bin/dex2oat (???)
F/dex2oat (23926): art/runtime/runtime.cc:289] (no managed stack frames)
F/dex2oat (23926): art/runtime/runtime.cc:289]
F/dex2oat (23926): art/runtime/runtime.cc:289]
F/libc (23926): Fatal signal 6 (SIGABRT), code -6 in tid 23926 (main)
I/DEBUG ( 240): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 240): Build fingerprint: 'google/caosp_hammerhead/hammerhead:5.1/LMY47D/259:userdebug/test-keys'
I/DEBUG ( 240): Revision: '11'
I/DEBUG ( 240): ABI: 'arm'
I/DEBUG ( 240): pid: 23926, tid: 23926, name: main >>> /system/bin/dex2oat <<<
I/DEBUG ( 240): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG ( 240): Abort message: 'art/compiler/oat_writer.cc:561] Check failed: method != NULL void com.android.okhttp.TcmIdleTimerMonitor.<clinit>()'
I/DEBUG ( 240): r0 00000000 r1 00005d76 r2 00000006 r3 00000000
I/DEBUG ( 240): r4 00005d76 r5 b6f1ee38 r6 00000002 r7 0000010c
I/DEBUG ( 240): r8 fffffadc r9 b5c73000 sl 00000000 fp 00000000
I/DEBUG ( 240): ip 00000006 sp becc18c8 lr b69765e7 pc b69988b8 cpsr 60030010
I/DEBUG ( 240):
I/DEBUG ( 240): backtrace:
I/DEBUG ( 240): #00 pc 000368b8 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 240): #01 pc 000145e3 /system/lib/libc.so (pthread_kill+66)
I/DEBUG ( 240): #02 pc 0001520b /system/lib/libc.so (raise+10)
I/DEBUG ( 240): #03 pc 00011a3b /system/lib/libc.so (__libc_android_abort+34)
I/DEBUG ( 240): #04 pc 0000ff14 /system/lib/libc.so (abort+4)
I/DEBUG ( 240): #05 pc 00230755 /system/lib/libart.so (art::Runtime::Abort()+184)
I/DEBUG ( 240): #06 pc 0009e713 /system/lib/libart.so (art::LogMessage::~LogMessage()+2046)
I/DEBUG ( 240): #07 pc 001dc345 /system/lib/libart-compiler.so
I/DEBUG ( 240): #08 pc 001decdd /system/lib/libart-compiler.so (art::eek:atWriter::InitOatCodeDexFiles(unsigned int)+424)
I/DEBUG ( 240): #09 pc 001df9bb /system/lib/libart-compiler.so (art::eek:atWriter::eek:atWriter(std::__1::vector<art::DexFile const*, std::__1::allocator<art::DexFile const*> > const&, unsigned int, unsigned int, int, art::CompilerDriver const*, art::TimingLogger*, art::SafeMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, st
I/DEBUG ( 240): #10 pc 0000b0bb /system/bin/dex2oat
I/DEBUG ( 240): #11 pc 0000d24d /system/bin/dex2oat
I/DEBUG ( 240): #12 pc 0000fddd /system/lib/libc.so (__libc_init+44)
I/DEBUG ( 240): #13 pc 00004528 /system/bin/dex2oat
I/DEBUG ( 240):
I/DEBUG ( 240): Tombstone written to: /data/tombstones/tombstone_05
W/art (23902): Could not create image space with image file '/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: Failed to generate image '/data/dalvik-cache/arm/system@framework@boot.art': Failed execv(/system/bin/dex2oat --image=/data/dalvik-cache/arm/system@framework@boot.art --dex-file=/system/framework/core-libart.jar --dex-file=/system/framework/conscrypt.jar --dex-file=/system/framework/okhttp.jar --dex-file=/system/framework/core-junit.jar --dex-file=/system/framework/bouncycastle.jar --dex-file=/system/framework/ext.jar --dex-file=/system/framework/framework.jar --dex-file=/system/framework/telephony-common.jar --dex-file=/system/framework/voip-common.jar --dex-file=/system/framework/ims-common.jar --dex-file=/system/framework/mms-common.jar --dex-file=/system/framework/android.policy.jar --dex-file=/system/framework/apache-xml.jar --dex-file=/system/framework/qcmediaplayer.jar --oat-file=/data/dalvik-cache/arm/system@framework@boot.oat --instruction-set=arm --instruction-set-feat
I/SamplingProfilerIntegration(23902): Profiling disabled.
D/Zygote (23902): begin preload
I/Zygote (23902): Preloading classes...

I can not find the issue root (any suggestion is appreciated :D), so I am recompiling in eng buildtype instead of userdebug. I hope that in this way I can have mode debug information.