xcodebuild linker assertion failure
<p>I run into this ld assertion error while building an iOS dynamic framework in command line using xcodebuild.  </p>

<hr>

<pre><code>0  0x10163b342  __assert_rtn + 144
1  0x101678a3a  archive::File&lt;arm64&gt;::makeObjectFileForMember(archive::File&lt;arm64&gt;::Entry const*) const + 1138
2  0x1016783e8  archive::File&lt;arm64&gt;::justInTimeforEachAtom(char const*, ld::File::AtomHandler&amp;) const + 122
3  0x10168ea75  ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&amp;) const + 265
4  0x101697db8  ld::tool::Resolver::resolveUndefines() + 160
5  0x10169a117  ld::tool::Resolver::resolve() + 79
6  0x10163c060  main + 812
7  0x7fff9dd4c5ad  start + 1
A linker snapshot was created at:
/tmp/MyKit-2016-02-31-154836.ld-snapshot
ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-253.9/src/ld/parsers/archive_file.cpp, line 355.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</code></pre>

<hr>

<p>According to archive_file.cpp source code (<a href="http://www.opensource.apple.com/source/ld64/ld64-253.3/src/ld/parsers/archive_file.cpp" rel="nofollow noreferrer">http://www.opensource.apple.com/source/ld64/ld64-253.3/src/ld/parsers/archive_file.cpp</a>) it seems there are some kind of symbol corruption while ld is loading a library. But other than that I have no clue how this issue might be fixed.  </p>

<p>This issue shows up only when I try to build my framework with bitcode enabled by adding "-fembed-bitcode" compiler flag. </p>

<p>Also, in my ld command, I am trying to link against a few static libraries, one of them is > 4.25 GB (with bitcode built-in), and this size exceeds an unsigned 32-bit integer's max value (~ 3.99 GB). I previously run into a few issue with libtool related to not being able to handle large binary libs, so this is one of my suspicion.    </p>

<p>I wonder if anyone has seen similar problems or figure out how to fix it ? Thanks</p>

<p>a few related questions</p>

<p><a href="https://stackoverflow.com/questions/26579615/weird-xcode-linker-error-ive-never-seen-before-saying-assertion-failed">Weird xCode linker error I&#39;ve never seen before saying &quot;Assertion failed&quot;</a></p>

<p><a href="https://github.com/SciRuby/nmatrix/issues/69" rel="nofollow noreferrer">https://github.com/SciRuby/nmatrix/issues/69</a></p>

<p><a href="http://lists.llvm.org/pipermail/llvm-dev/2013-October/066722.html" rel="nofollow noreferrer">http://lists.llvm.org/pipermail/llvm-dev/2013-October/066722.html</a></p>

<p><a href="https://github.com/TrinityCore/TrinityCore/issues/14689" rel="nofollow noreferrer">https://github.com/TrinityCore/TrinityCore/issues/14689</a></p>

<p><a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438" rel="nofollow noreferrer">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438</a></p>