LD: (null): Assertion failed: ("dylib not assigned ordinal"), function compressedOrdinalForAtom, file OutputFile.cpp,

StackOverflow https://stackoverflow.com/questions/22878485

Question

After some editing my Xcode 5.1.0 source files I suddenly get this linker error:

0  0x1059b5f93  __assert_rtn + 144
1  0x105a1d7f5  ld::tool::OutputFile::compressedOrdinalForAtom(ld::Atom const*) + 281
2  0x105a1e469  ld::tool::OutputFile::addDyldInfo(ld::Internal&, ld::Internal::FinalSection*, ld::Atom const*, ld::Fixup*, ld::Fixup*, ld::Fixup*, ld::Atom const*, ld::Atom const*, unsigned long long, unsigned long long) + 2261
3  0x105a14496  ld::tool::OutputFile::generateLinkEditInfo(ld::Internal&) + 1322
4  0x105a0f952  ld::tool::OutputFile::write(ld::Internal&) + 116
5  0x1059b6c40  main + 1012
A linker snapshot was created at:
    /tmp/keytech PLM-2014-03-05-101905.ld-snapshot
ld: Assertion failed: (0 && "dylib not assigned ordinal"), function compressedOrdinalForAtom, file /SourceCache/ld64/ld64-236.3/src/ld/OutputFile.cpp, line 3454.
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have absolute no idea what this means?

I already tried to:

  • Delete the derived data folder
  • Clean Files and build files
  • Cosed and reopen Xcode
  • Made sure no Linker Optimizer are active: No dead Code Stripping, No Link Time Optimization.

I also have excluded some of my latest changed code. With no result. Googleing the error did not find any useful information.

Does anybody have an idea?

Was it helpful?

Solution

In my case the linker error was gone after I switched in the Build Settings "OSX Deployment Target" from "10.7" to "10.8".

OTHER TIPS

This looks like an open bug at llvm, which has been passed to Apple (and is therefore in a black hole).

No other information appears to be available so you need to step back in your development (via git) to figure out what triggered it, and then contribute any information you glean to llvm (via the bug reporter).

Not an answer, but I don't believe there is an answer to this issue...

I had this bug for a while. The way I eventually fixed it was by trying to compile in Xcode 4.6 Once I tweaked my project to compile there, I got the much more helpful error:

Undefined symbols for architecture x86_64:

"_Gestalt", referenced from: _GetOS in main.o

that led me to adding the coreservices framework (which was required by a third party framework I was adding), and from there, my project compiled just fine on xcode 5 & 6

so - that may not be the framework you need, but the approach may help you.

I ran into this too, but only for release builds. By process of elimination, I was able to get the release builds working by setting the Link-Time Optimization build setting to NO (LLVM_LTO = NO) under Apple LLVM – Code Generation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top