[llvm-bugs] [Bug 43748] Cannot link to Open MPI with ld.lld

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 30 15:57:53 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=43748

Fangrui Song <i at maskray.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #9 from Fangrui Song <i at maskray.me> ---
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
>>> defined in /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_usempif08.so
...


I believe lld's rigorous behavior regarding VER_NDX_LOCAL is correct.

Both openmpi and GNU ld have bugs. See
https://sourceware.org/bugzilla/show_bug.cgi?id=25236 (common symbol: don't
consider definitions in shared objects) and
https://github.com/open-mpi/ompi/issues/7209 (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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191130/a7bd8d59/attachment.html>


More information about the llvm-bugs mailing list