Issues with mpich and latest xcode #4797
Replies: 6 comments 8 replies
-
Not an answer, just commenting that the same problem occurs with open-mpi on macOS using the Fortran wrappers (which use GCC). ld: unknown options: -commons The clang based mpicc/mpiCC work just fine. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm the mpi4py author and maintainer here, experiencing the same issue. |
Beta Was this translation helpful? Give feedback.
-
The following fixes this mpich link problem for me:
This command will result in the warning
However, once the mpich compilation is done, homebrew |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@hauntsaninja what file and what line are to be edited in mpicc? Could you be more specific please? |
Beta Was this translation helpful? Give feedback.
-
Not sure why no one mentions it, but deactivating that flag also causes subtle bugs, i.e. certain parts of mpich stop working. Please see the attached source for an example that works (on versions of XCode that still support searching libmpifort.dylib for common symbols) but fails without the
Test the build with
|
Beta Was this translation helpful? Give feedback.
-
Output of
brew config
Output of
brew doctor
Description of issue
I posted details here pmodels/mpich#6684 , mpich maintainer suggested that the bottle Homebrew provides might be out of date.
I'm using macOS 13.5.2 (22G91)
I installed mpich using brew:
I have the standard Xcode command line tools installed:
This is the version of my linker:
I'm trying to build mpi4py. It's failing with:
Full build log collapsed below:
This is where the linker flag appears to get set:
Editing out
-commons,use_dylibs
in mpicc appears to make compilation succeed.There's a long comment about the use of this option over here: https://github.com/pmodels/mpich/blob/d1a428ecdaaff6ad672708ecd3effc45bc200939/configure.ac#L4055
I couldn't find a changelog for the ld that Apple ships
Beta Was this translation helpful? Give feedback.
All reactions