-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mpich: fix build #150225
mpich: fix build #150225
Conversation
It doesn't work because we have GCC use ld-classic, and it runs Not really sure how to fix that on our side without hacking There's also an important question about |
--enable-fast=all,O3 | ||
--enable-g=dbg | ||
--enable-romio | ||
--enable-shared | ||
--with-hwloc=#{Formula["hwloc"].opt_prefix} | ||
--with-pm=hydra | ||
F77=gfortran | ||
FC=gfortran | ||
FCFLAGS=-fallow-argument-mismatch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: is this, and the FFLAGS=-fallow-argument-mismatch
below that says "Flag for compatibility with GCC 10" still necessary? Sounds temporary with how the comment is written
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try removing it. I don't think it is no longer required (at least to be passed explicitly). Worst case, configure/make would fail and we would notice.
We could fix the issue by forcing |
Forcing GCC to use ld-classic everywhere for Sonoma/Xcode 15 is creating side effects. This is one of them. I wonder if the best strategy would be to NOT force ld-classic, generally accept the new Xcode 15 linker, and fix linker problems more surgically as they arise. For example (Macports): I am not in a good position to personally test this. I do not have access to Sonoma or Ventura/Xcode 15. |
AFAIK it's a complete incompatibility so the newer linker never works with GCC. So "where problems arise" is everything that uses GCC. Forcing ld-classic fixes that for everyone except this edge case where mpich incorrectly assumes the flags gfortran accepts is the same flags every other language compiler accepts. In particular when mixing GCC based gfortran with LLVM based clang. We will however be removing the ld-classic use in GCC when Xcode 15.1 is released (and sufficiently deployed to GitHub Actions etc) as Xcode 15.1 fixes the underlying linker incompatibility bug. |
Thanks for the correction. I am not well researched on this, so I must take your word on it. However, I am quite surprised that Apple could get all the way to Xcode 15.0 with a total GCC incompatibility. Is there a reasonable summary discussion about this incompatibility, so that I may educate myself? |
#145991 summarises a simple program that will cause the linker to crash when using GCC. @fxcoudert may be able to give further technical details. It's not the first time an Xcode update has broken GCC and won't be the last. Apple just don't test GCC and rely on people to report issues they face. Apple work with their own compiler team which make changes their build of Clang and then they contribute this changes to the LLVM project. GCC doesn't get the same level of support and funding on macOS (example: arm64 support, which is the CPU architecture for most Macs sold since 2020, is still a WIP fork of GCC). Those who do do a great job, but ultimately can only react to what Apple release and Apple released a buggy linker here. On macOS, we largely only use GCC for the cases that really need it, such as anything Fortran. We always use Clang otherwise where possible. |
The reason we avoid the new linker in GCC is because it triggers a crash (in the linker, not in GCC). That crash is fixed in Xcode 15.1 beta, so hopefully we'll soon be able to remove the workaround. There are still minor linker regressions here and there, but Apple will over time fix them. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Xcode 15.1 is now released https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes and that was one of the holdups for this issue before it got automatically closed. Any chance this Issue might now be quick to resolve? |
Quote |
mpich has been rebuilt for Sonoma with the new Xcode. |
Like we did for open-mpi