Сборка libunwind для Mac

Я пытаюсь собрать libunwind на Mac как для iOS, так и для Mac, мне удалось решить несколько проблем компиляции.

Сборка на Mac

Я настроил проект используя

./configure CC="cc -Ae -D_XOPEN_SOURCE=500"

И скопировал elf.h из проекта Google Breakpad.

https://google-breakpad.googlecode.com/svn-history/r1017/trunk/src/common/android/include/elf.h

Теперь я получаю следующую ошибку:

/usr/include/elf.h:58:15: fatal error: 'elf.h' file not found
#include_next <elf.h>

Кто-нибудь может мне помочь в решении этой проблемы Или есть какая-то другая процедура для сборки libunwind?

Я также хотел бы знать, нужно ли что-то еще сделать для сборки libunwind для iOS.

1 ответ

Решение

Я получил ответ на форуме разработчиков libunwind.

I don't think it will work. There's no OS X support in libunwind at the moment, 
and the platform is quite different.

There is a sort of a libunwind (which has little or nothing to do with this one) in the  
OS itself though. See http://opensource.apple.com/source/libunwind/

There's also some sort of symbolization library for post-processing. IIRC 
you more or less want to use the tools that ship with base OS or at least Xcode, 
otherwise you are up against writing quite a lot of tooling yourself.

Короче говоря, libunwind не поддерживается в Mac OS X.

Libunwind включен в clang и поддерживается в MacOS 10.6.

https://github.com/llvm/llvm-project/blob/368c02e3ec44e5418626f46abebcc22a69c7f66d/libunwind/include/libunwind.h

Другие вопросы по тегам