Intel-based Mac - MPICH - linking fails for libgmsh.dylib, missing _ompi_mpi_* symbols
I've successfully compiled/configured Gmsh for a number of platforms. I updated today from version 4.10.5 to 4.12.2. I am compiling on an Intel-based Mac running the latest version of macOS, using MPICH as provided by PETSc. Everything compiles, but at linktime I get,
[ 94%] Linking CXX shared library libgmsh.dylib
ld: warning: -commons use_dylibs is no longer supported, using error treatment instead
Undefined symbols for architecture x86_64:
"_ompi_mpi_char", referenced from:
GmshRemote() in GmshRemote.cpp.o
GmshRemote() in GmshRemote.cpp.o
GmshRemote() in GmshRemote.cpp.o
GmshRemote() in GmshRemote.cpp.o
GmshRemote() in GmshRemote.cpp.o
GmshRemote() in GmshRemote.cpp.o
GmshRemote() in GmshRemote.cpp.o
GmshRemote() in GmshRemote.cpp.o
...
and so on for many _opmi
symbols. At configure time, MPICH libs and binaries were found, OpenMPI was not (which is expected, and good). I assume there's some section in the configuration that's broken, causing a conditional that makes GmshRemote.cpp use the OpenMPI implementation in every case or by mistake (given that MPICH was detected). I haven't started digging yet, but thought it was worth a bug report anyhow.