Xcode ld:断言失败:(symbolIndex!=间接\u符号\u本地)
我正在尝试构建使用MacOS SDK 10.4的项目。在优胜美地和XCode 6.4上,一切正常。但是在El Capitan和XCode 7上我有一个奇怪的错误Xcode ld:断言失败:(symbolIndex!=间接\u符号\u本地),xcode,macos,linker-errors,gcc4,Xcode,Macos,Linker Errors,Gcc4,我正在尝试构建使用MacOS SDK 10.4的项目。在优胜美地和XCode 6.4上,一切正常。但是在El Capitan和XCode 7上我有一个奇怪的错误 0 0x10d7527e2 __assert_rtn + 144 1 0x10d75c8fb mach_o::relocatable::Parser<x86>::findTargetFromAddressAndSectionNum(unsigned int, unsigned int, mach_o::relocat
0 0x10d7527e2 __assert_rtn + 144
1 0x10d75c8fb mach_o::relocatable::Parser<x86>::findTargetFromAddressAndSectionNum(unsigned int, unsigned int, mach_o::relocatable::Parser<x86>::TargetDesc&) + 473
2 0x10d756ac4 mach_o::relocatable::Section<x86>::addRelocFixup(mach_o::relocatable::Parser<x86>&, macho_relocation_info<Pointer32<LittleEndian> > const*) + 416
3 0x10d772fc0 mach_o::relocatable::Section<x86>::makeFixups(mach_o::relocatable::Parser<x86>&, mach_o::relocatable::Parser<x86>::CFI_CU_InfoArrays const&) + 92
4 0x10d76fa6d mach_o::relocatable::Parser<x86>::parse(mach_o::relocatable::ParserOptions const&) + 2039
5 0x10d75df96 mach_o::relocatable::Parser<x86>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 388
6 0x10d78d5e1 archive::File<x86>::makeObjectFileForMember(archive::File<x86>::Entry const*) const + 761
7 0x10d78d108 archive::File<x86>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 122
8 0x10d7a5f09 ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 265
9 0x10d7af24c ld::tool::Resolver::resolveUndefines() + 160
10 0x10d7b15ab ld::tool::Resolver::resolve() + 79
11 0x10d753500 main + 812
12 0x7fff8be9c5ad start + 1
A linker snapshot was created at:
/tmp/libcommon.dylib-2015-11-15-175424.ld-snapshot
ld: Assertion failed: (symbolIndex != INDIRECT_SYMBOL_LOCAL), function findTargetFromAddressAndSectionNum, file /Library/Caches/com.apple.xbs/Sources/ld64_PONDEROSA/ld64-253.6/src/ld/parsers/macho_relocatable_file.cpp, line 2888.
collect2: ld returned 1 exit status
0 0x10d7527e2\u断言\u rtn+144
1 0x10d75c8fb mach_o::可重定位::解析器::findTargetFromAddressAndSectionNum(无符号整数,无符号整数,mach_o::可重定位::解析器::TargetDesc&)+473
2 0x10d756ac4马赫数o::可重定位::节::addRelocFixup(马赫数o::可重定位::解析器和,马赫数重定位信息常量*)+416
3 0x10d772fc0马赫数o::可重定位::节::makeFixups(马赫数o::可重定位::解析器&,马赫数o::可重定位::解析器::CFI_CU_信息数组常量&+92
4 0x10d76fa6d马赫数o::可重定位::解析器::解析(马赫数o::可重定位::解析常量&+2039
5 0x10d75df96马赫数o::可重定位::解析器::解析(无符号字符常量*,无符号长,字符常量*,长,ld::文件::序号,马赫数o::可重定位::解析常量&+388
6 0x10d78d5e1存档::文件::MakeObjectFileFormMember(存档::文件::条目常量*)常量+761
7 0x10d78d108存档::文件::justInTimeforEachAtom(char常量*,ld::文件::AtomHandler&)常量+122
8 0x10d7a5f09 ld::工具::输入文件::搜索库(字符常量*,布尔,布尔,布尔,ld::文件::AtomHandler&)常量+265
9 0x10d7af24c ld::工具::解析器::resolveUndefines()+160
10 0x10d7b15ab ld::工具::解析器::解析()+79
11 0x10d753500干管+812
12 0x7fff8be9c5ad启动+1
已在以下位置创建链接器快照:
/tmp/libcommon.dylib-2015-11-15-175424.ld-snapshot
ld:断言失败:(SYMBOLNDEX!=间接SYMBOL\U LOCAL),函数findTargetFromAddressAndSectionNum,file/Library/Caches/com.apple.xbs/Sources/ld64\u pounderosa/ld64-253.6/src/ld/parsers/macho\u relocate\u file.cpp,第2888行。
collect2:ld返回了1个退出状态
我使用GCC4.0,没有任何可能使用其他编译器。可能有人对此有一些想法吗
谢谢。您能找到这个问题的答案吗?我似乎也有类似的问题。你能找到这个问题的答案吗?我似乎也有类似的问题。