[LLVMdev] ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember

David Garsha davidg at telestream.net
Mon Oct 28 11:38:35 PDT 2013


Thanks to all of you for your help, and thanks for the explanation, Nick. This will save me a lot of time, as now I know where to focus my efforts.

Regards,
David

--
David Garsha
Engineering Program Manager
Macintosh Desktop Products
Telestream, Inc.
www.flip4mac.com<http://www.flip4mac.com/>
www.telestream.net<http://www.telestream.net/>
davidg at telestream.net<mailto:davidg at telestream.net>

On Oct 23, 2013, at 2:24 PM, Nick Kledzik <kledzik at apple.com<mailto:kledzik at apple.com>> wrote:

David,

This usually means a static library is corrupt.  The table of contents said a symbol was in an object file at some offset in the archive, but the linker later found there was no member at that offset.

-Nick

On Oct 22, 2013, at 3:24 PM, David Garsha <davidg at telestream.net<mailto:davidg at telestream.net>> wrote:
I'm encountering the following assertion when linking an Xcode project with Xcode 4.6.3 (4H1503). The project has dependencies on, and links against, an Objective-C static library Xcode project, and a C++ static library Xcode project. All are using using LLVM 4.2.

ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /SourceCache/ld64/ld64-136/src/ld/parsers/archive_file.cpp, line 354.

0  0x10fa41098  __assert_rtn + 144
1  0x10fa678af  archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 1149
2  0x10fa670fd  archive::File<x86_64>::forEachAtom(ld::File::AtomHandler&) const + 645
3  0x10fa7776c  ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&) + 420
4  0x10fa80884  ld::tool::Resolver::resolve() + 44
5  0x10fa41380  main + 370
6  0x10fa32cd4  start + 52
A linker snapshot was created at:
/tmp/<Name Removed>-2013-09-22-135411.ld-snapshot
ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /SourceCache/ld64/ld64-136/src/ld/parsers/archive_file.cpp, line 354.
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The problem does not occur in Xcode 5.0 (5A1413) with LLVM 5, but unfortunately I must continue to use Xcode 4 for a while.

Any suggestions for how to work around this assertion, or hints as to what is going wrong would be greatly appreciated.

Thanks for reading.

Regards,
David

--
David Garsha
Engineering Program Manager
Macintosh Desktop Products
Telestream, Inc.
www.flip4mac.com<http://www.flip4mac.com>
www.telestream.net
davidg at telestream.net


_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev






More information about the llvm-dev mailing list