ld:断言失败:(symbolIndex!= INDIRECT_SYMBOL_LOCAL)

时间:2015-12-16 12:31:18

标签: xcode macos linker-errors gcc4

我正在尝试构建使用MacOS SDK 10.4的项目。在Yosemite和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::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

我使用gcc 4.0,我没有任何可能使用任何其他编译器。可能有人对此有一些想法吗?

谢谢。

0 个答案:

没有答案