<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Cannot link to Open MPI with ld.lld"
href="https://bugs.llvm.org/show_bug.cgi?id=43748">bug 43748</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Cannot link to Open MPI with ld.lld"
href="https://bugs.llvm.org/show_bug.cgi?id=43748#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Cannot link to Open MPI with ld.lld"
href="https://bugs.llvm.org/show_bug.cgi?id=43748">bug 43748</a>
from <span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span></b>
<pre>A minimal reproduce:
% touch a.f90
% mpifort -fuse-ld=lld a.f90
ld.lld: error: corrupt input file: version definition index 0 for symbol
mpi_fortran_argv_null_ is out of bounds
<span class="quote">>>> defined in /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_usempif08.so</span >
...
I believe lld's rigorous behavior regarding VER_NDX_LOCAL is correct.
Both openmpi and GNU ld have bugs. See
<a href="https://sourceware.org/bugzilla/show_bug.cgi?id=25236">https://sourceware.org/bugzilla/show_bug.cgi?id=25236</a> (common symbol: don't
consider definitions in shared objects) and
<a href="https://github.com/open-mpi/ompi/issues/7209">https://github.com/open-mpi/ompi/issues/7209</a> (mpi_fortran_argv_null_ has
incorrect st_size in ompi/mpi/fortran/base/gen-mpi-mangling.pl)
Fixing either bug can make the lld linking problem go away.</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>