无法在macosx上构建binutils
问题描述:
我需要在OSX 10.12.3(16D32)上从源代码构建ld。我从混帐克隆的最后一个版本://sourceware.org/git/binutils-gdb.git并试图构建它:无法在macosx上构建binutils
./configure --prefix=/usr --disable-werror (there are a lot of warnings, so I disable them)
make
,但我得到了
In file included from dwarf2read.c:72:
./common/gdb_unlinker.h:35:35: error: '__nonnull__' attribute
is invalid for the implicit this argument
unlinker (const char *filename) ATTRIBUTE_NONNULL (1)
曾有人看到它,知道如何解决它? 我只需要LD检查为什么会出现
ld: warning: can't parse dwarf compilation unit info in
在OSX
,当Ubuntu的正常工作和objdump的不显示任何小精灵的符号。
感谢您的帮助。
答
我试图构建错误的ld。 ld -v @(#)程序:ld项目:ld64-274.2 表明我不得不从苹果源构建ld64。 感谢bdash指出。
我对这个问题有点困惑。作为Apple开发工具一部分的链接器是Apple自己的'ld64',而不是来自GNU binutils的'ld'。你可以在[Apple's source for'ld64']中看到你引用的错误信息(https://opensource.apple.com/source/ld64/ld64-274.2/src/ld/parsers/macho_relocatable_file.cpp.auto.html) (在'Parser :: parseDebugInfo'内)。 – bdash
明白了。你是对的,我被ld的名字弄糊涂了。 ld -v显示它可以构建为ld64。 –