koying / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

NDK r10c / Android arm64-v8a support #616

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to build the Android sample_app project, it fails with the latest 
NDK r10c on OSX for all ABIs that I've tried (armeabi, arm64-v8a).

The following error is produced:

android/breakpad/android/sample_app $ ndk-build
[armeabi] Compile++ thumb: test_google_breakpad <= test_breakpad.cpp
[armeabi] Compile++ arm  : breakpad_client <= crash_generation_client.cc
[armeabi] Compile++ arm  : breakpad_client <= exception_handler.cc
[armeabi] Compile++ arm  : breakpad_client <= minidump_descriptor.cc
[armeabi] Compile++ arm  : breakpad_client <= log.cc
[armeabi] Compile++ arm  : breakpad_client <= linux_dumper.cc
[armeabi] Compile++ arm  : breakpad_client <= linux_ptrace_dumper.cc
[armeabi] Compile++ arm  : breakpad_client <= minidump_writer.cc
[armeabi] Compile++ arm  : breakpad_client <= minidump_file_writer.cc
[armeabi] Compile arm    : breakpad_client <= breakpad_getcontext.S
[armeabi] Compile arm    : breakpad_client <= convert_UTF.c
[armeabi] Compile++ arm  : breakpad_client <= md5.cc
[armeabi] Compile++ arm  : breakpad_client <= string_conversion.cc
[armeabi] Compile++ arm  : breakpad_client <= elfutils.cc
[armeabi] Compile++ arm  : breakpad_client <= file_id.cc
[armeabi] Compile++ arm  : breakpad_client <= guid_creator.cc
[armeabi] Compile++ arm  : breakpad_client <= linux_libc_support.cc
[armeabi] Compile++ arm  : breakpad_client <= memory_mapped_file.cc
[armeabi] Compile++ arm  : breakpad_client <= safe_readlink.cc
[armeabi] StaticLibrary  : libbreakpad_client.a
[armeabi] Executable     : test_google_breakpad
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(exception_handler.o): in 
function google_breakpad::ExceptionHandler::DoDump(int, void const*, unsigned 
int):jni/../../google_breakpad/../../src/client/linux/handler/exception_handler.
cc:557: error: undefined reference to 'google_breakpad::WriteMicrodump(int, 
void const*, unsigned int, std::list<google_breakpad::MappingEntry, 
std::allocator<google_breakpad::MappingEntry> > const&)'
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(minidump_writer.o): in 
function (anonymous 
namespace)::MinidumpWriter::WriteThreadListStream(MDRawDirectory*) [clone 
.constprop.86]:jni/../../google_breakpad/../../src/client/linux/minidump_writer/
minidump_writer.cc:403: error: undefined reference to 
'google_breakpad::ThreadInfo::FillCPUContext(MDRawContextARM*) const'
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(minidump_writer.o): in 
function (anonymous 
namespace)::MinidumpWriter::WriteThreadListStream(MDRawDirectory*) [clone 
.constprop.86]:jni/../../google_breakpad/../../src/client/linux/minidump_writer/
minidump_writer.cc:405: error: undefined reference to 
'google_breakpad::SeccompUnwinder::PopSeccompStackFrame(MDRawContextARM*, 
MDRawThread const&, unsigned char*)'
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(minidump_writer.o): in 
function (anonymous 
namespace)::MinidumpWriter::WriteThreadListStream(MDRawDirectory*) [clone 
.constprop.86]:jni/../../google_breakpad/../../src/client/linux/minidump_writer/
minidump_writer.cc:326: error: undefined reference to 
'google_breakpad::UContextReader::GetStackPointer(ucontext const*)'
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(minidump_writer.o): in 
function (anonymous 
namespace)::MinidumpWriter::WriteThreadListStream(MDRawDirectory*) [clone 
.constprop.86]:jni/../../google_breakpad/../../src/client/linux/minidump_writer/
minidump_writer.cc:332: error: undefined reference to 
'google_breakpad::UContextReader::GetInstructionPointer(ucontext const*)'
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(minidump_writer.o): in 
function (anonymous 
namespace)::MinidumpWriter::WriteThreadListStream(MDRawDirectory*) [clone 
.constprop.86]:jni/../../google_breakpad/../../src/client/linux/minidump_writer/
minidump_writer.cc:380: error: undefined reference to 
'google_breakpad::UContextReader::FillCPUContext(MDRawContextARM*, ucontext 
const*)'
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(minidump_writer.o): in 
function (anonymous 
namespace)::MinidumpWriter::WriteThreadListStream(MDRawDirectory*) [clone 
.constprop.86]:jni/../../google_breakpad/../../src/client/linux/minidump_writer/
minidump_writer.cc:383: error: undefined reference to 
'google_breakpad::SeccompUnwinder::PopSeccompStackFrame(MDRawContextARM*, 
MDRawThread const&, unsigned char*)'
/Applications/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x
86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi
/bin/ld: ./obj/local/armeabi/libbreakpad_client.a(minidump_writer.o): in 
function (anonymous 
namespace)::MinidumpWriter::WriteThreadListStream(MDRawDirectory*) [clone 
.constprop.86]:jni/../../google_breakpad/../../src/client/linux/minidump_writer/
minidump_writer.cc:413: error: undefined reference to 
'google_breakpad::ThreadInfo::GetInstructionPointer() const'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/test_google_breakpad] Error 1

Original issue reported on code.google.com by vol...@limbic.com on 6 Nov 2014 at 9:47

GoogleCodeExporter commented 9 years ago
Same here, was trying to build Hockey App sample app

Original comment by imor...@gmail.com on 7 Nov 2014 at 2:09

GoogleCodeExporter commented 9 years ago
I was able to get it compiling. Turned out a couple of files were missing from 
the make file. Here is the patch (PS: mips is still not working, but I don't 
target that):

Index: android/google_breakpad/Android.mk
===================================================================
--- android/google_breakpad/Android.mk  (revision 1401)
+++ android/google_breakpad/Android.mk  (working copy)
@@ -74,6 +74,10 @@
     src/client/linux/handler/exception_handler.cc \
     src/client/linux/handler/minidump_descriptor.cc \
     src/client/linux/log/log.cc \
+    src/client/linux/dump_writer_common/thread_info.cc \
+    src/client/linux/dump_writer_common/seccomp_unwinder.cc \
+    src/client/linux/dump_writer_common/ucontext_reader.cc \
+    src/client/linux/microdump_writer/microdump_writer.cc \
     src/client/linux/minidump_writer/linux_dumper.cc \
     src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
     src/client/linux/minidump_writer/minidump_writer.cc \
@@ -97,4 +101,4 @@

 include $(BUILD_STATIC_LIBRARY)

Original comment by vol...@limbic.com on 12 Nov 2014 at 2:14