gpt4 book ai didi

android - 构建 google breakpad android 示例错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:37:02 26 4
gpt4 key购买 nike

ubuntu 14.04 x64; ndk-r10c

当我在“android/sample_app”上运行 ndk-build 时,它可以生成 libbreakpad_client.a,但在链接时抛出错误:

[arm64-v8a] Compile++      : test_google_breakpad <= test_breakpad.cpp
[arm64-v8a] Compile++ : breakpad_client <= crash_generation_client.cc
[arm64-v8a] Compile++ : breakpad_client <= exception_handler.cc
[arm64-v8a] Compile++ : breakpad_client <= minidump_descriptor.cc
[arm64-v8a] Compile++ : breakpad_client <= log.cc
[arm64-v8a] Compile++ : breakpad_client <= linux_dumper.cc
[arm64-v8a] Compile++ : breakpad_client <= linux_ptrace_dumper.cc
[arm64-v8a] Compile++ : breakpad_client <= minidump_writer.cc
[arm64-v8a] Compile++ : breakpad_client <= minidump_file_writer.cc
[arm64-v8a] Compile : breakpad_client <= breakpad_getcontext.S
[arm64-v8a] Compile : breakpad_client <= convert_UTF.c
[arm64-v8a] Compile++ : breakpad_client <= md5.cc
[arm64-v8a] Compile++ : breakpad_client <= string_conversion.cc
[arm64-v8a] Compile++ : breakpad_client <= elfutils.cc
[arm64-v8a] Compile++ : breakpad_client <= file_id.cc
[arm64-v8a] Compile++ : breakpad_client <= guid_creator.cc
[arm64-v8a] Compile++ : breakpad_client <= linux_libc_support.cc
[arm64-v8a] Compile++ : breakpad_client <= memory_mapped_file.cc
[arm64-v8a] Compile++ : breakpad_client <= safe_readlink.cc
[arm64-v8a] StaticLibrary : libbreakpad_client.a
[arm64-v8a] Executable : test_google_breakpad
./obj/local/arm64-v8a/libbreakpad_client.a(minidump_writer.o): In function `WriteThreadListStream':
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer.cc:326: undefined reference to `google_breakpad::UContextReader::GetStackPointer(ucontext const*)'
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer.cc:332: undefined reference to `google_breakpad::UContextReader::GetInstructionPointer(ucontext const*)'
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer.cc:378: undefined reference to `google_breakpad::UContextReader::FillCPUContext(MDRawContextARM64*, ucontext const*, fpsimd_context const*)'
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer.cc:383: undefined reference to `google_breakpad::SeccompUnwinder::PopSeccompStackFrame(MDRawContextARM64*, MDRawThread const&, unsigned char*)'
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer.cc:403: undefined reference to `google_breakpad::ThreadInfo::FillCPUContext(MDRawContextARM64*) const'
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer.cc:405: undefined reference to `google_breakpad::SeccompUnwinder::PopSeccompStackFrame(MDRawContextARM64*, MDRawThread const&, unsigned char*)'
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/minidump_writer/minidump_writer.cc:413: undefined reference to `google_breakpad::ThreadInfo::GetInstructionPointer() const'
./obj/local/arm64-v8a/libbreakpad_client.a(exception_handler.o): In function `google_breakpad::ExceptionHandler::DoDump(int, void const*, unsigned long)':
/home/freeloop/workspace/androidstudio/trunk/android/sample_app/jni/../../google_breakpad/../../src/client/linux/handler/exception_handler.cc:557: undefined reference to `google_breakpad::WriteMicrodump(int, void const*, unsigned long, std::list<google_breakpad::MappingEntry, std::allocator<google_breakpad::MappingEntry> > const&)'
collect2: error: ld returned 1 exit status
make: *** [obj/local/arm64-v8a/test_google_breakpad] Error 1

我该如何修复这个错误?

最佳答案

我必须更改 android/google_breakpad/Android.mk 中的 Android makefile 并将 LOCAL_SRC_FILES 修改为:

# List of client source files, directly taken from Makefile.am
LOCAL_SRC_FILES := \
src/client/linux/crash_generation/crash_generation_client.cc \
src/client/linux/handler/exception_handler.cc \
src/client/linux/handler/minidump_descriptor.cc \
src/client/linux/log/log.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 \
src/client/linux/microdump_writer/microdump_writer.cc \
src/client/linux/dump_writer_common/ucontext_reader.cc \
src/client/linux/dump_writer_common/seccomp_unwinder.cc \
src/client/linux/dump_writer_common/thread_info.cc \
src/client/minidump_file_writer.cc \
src/common/android/breakpad_getcontext.S \
src/common/convert_UTF.c \
src/common/md5.cc \
src/common/string_conversion.cc \
src/common/linux/elfutils.cc \
src/common/linux/file_id.cc \
src/common/linux/guid_creator.cc \
src/common/linux/linux_libc_support.cc \
src/common/linux/memory_mapped_file.cc \
src/common/linux/safe_readlink.cc

现在正在为我链接。

关于android - 构建 google breakpad android 示例错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27041649/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com