<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Crash when linking a G++-6 compiled project"
   href="https://llvm.org/bugs/show_bug.cgi?id=31467">31467</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when linking a G++-6 compiled project
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>MachO
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>akim.demaille@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17781" name="attach_17781" title="self-generated snapshots">attachment 17781</a> <a href="attachment.cgi?id=17781&action=edit" title="self-generated snapshots">[details]</a></span>
self-generated snapshots

Hi!

I'm not sure whether this is the appropriate place to report a bug from Apple's
linker:

$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-274.2
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h
armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 8.0.0, (clang-800.0.42.1)
TAPI support using: Apple TAPI version 1.30

Please, don't shoot if it's the wrong place.

My project uses heavily templates, and Boost.  For a long while, I was not able
to compile it with GCC on macOS because of incompatibility of the
implementation of the C++ library with which Boost.Python was compiled, but
finally, it works!  Well, sort-of: it compiles, but it fails when it links
either of the three monster shared object of my project.

  CXX      lib/ctx/lib_liblal_char_z_la-libctx.lo
  CXXLD    lib/liblal_char_z.la
0  0x1069ec608  __assert_rtn + 144
1  0x1069ffa1b 
mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions
const&) + 3195
2  0x1069f7572  mach_o::relocatable::Parser<x86_64>::parse(unsigned char
const*, unsigned long long, char const*, long, ld::File::Ordinal,
mach_o::relocatable::ParserOptions const&) + 342
3  0x106a38a9c  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool)
+ 824
4  0x106a3b2fb  ld::tool::InputFiles::parseWorkerThread() + 495
5  0x7fffb150baab  _pthread_body + 180
6  0x7fffb150b9f7  _pthread_body + 0
A linker snapshot was created at:
    /tmp/liblal_char_z.0.dylib-2016-11-25-141702.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function
parse, file
/Library/Caches/com.apple.xbs/Sources/ld64/ld64-274.2/src/ld/parsers/macho_relocatable_file.cpp,
line 1893.
collect2: error: ld returned 1 exit status
Makefile:2412 : la recette pour la cible « lib/liblal_char_z.la » a échouée

I'm attaching these directories.  Please, let me know what else you need.

Cheers!</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>