[MacPorts] #69130: openmpi-gcc12 @4.1.6_0+fortran: problem linking MPI-2 memory routines from c++

MacPorts noreply at macports.org
Thu Jan 18 23:14:24 UTC 2024


#69130: openmpi-gcc12 @4.1.6_0+fortran: problem linking MPI-2 memory routines from
c++
-------------------------+---------------------
 Reporter:  floquet-cxx  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.8.1
 Keywords:               |       Port:  openmpi
-------------------------+---------------------
 The application uses C++, C & F77, and has used MPI-1 routines (and
 openmpi) for many years.

 When I started using some MPI-2 routines to do parallel I/O, some linkages
 failed, I believe associated with MPI_File_set_view (and perhaps with
 MPI_File_write_all, MPI_File_read_all - these 3 routines were the only new
 ones introduced).  The routines (in fact the whole code) linked and worked
 fine with mpich (though I currently have a separate issue with mpich and
 cmake, for which I plan a separate ticket), so I think the problem relates
 to openmpi.  The top-level source is C++.

 Mac Studio, Sonoma/14.2.1 and Xcode15.2, but had the same problems earlier
 (with Ventura and Xcode14.3.1).  I did a clean reinstall of macports and
 required ports for Sonoma.  Also had same problem using gcc13 variant of
 openmpi.

 Here is a cut-down summary of the linkage errors issued by cmake:

 {{{

 [50%] Linking CXX executable elliptic_mp
 Undefined symbols for architecture arm64:
   "__ZN3MPI3Win4FreeEv", referenced from:
 ...
  "__ZN3MPI4CommC2Ev", referenced from:
 ...
 "__ZN3MPI8Datatype4FreeEv", referenced from:
 ...
 "_ompi_mpi_cxx_op_intercept", referenced from:

 ...
 ld: symbol(s) not found for architecture arm64


 }}}

 Perhaps this is just associated with C++ mangling of the names, and a
 missing "extern" in a header file?

-- 
Ticket URL: <https://trac.macports.org/ticket/69130>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list