Fixes for Xcode 16 and gcc/gfortran, boost_cropped#38855
Merged
Conversation
… build with XCode 16 on Intel.
Member
Author
|
All of the work was done at #38783. Marc Culler is the author, I am the reviewer. |
|
Documentation preview for this PR (built with commit 82cea4d; changes) is ready! 🎉 |
5 tasks
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Nov 14, 2024
sagemathgh-38905: Update the gcc spkg to version 14.2.0 using iains/gcc-14-branch <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> This PR updates the gcc spkg (and hence the gfortran spkg) to version 14.2.0. I tested that the spkg builds cleanly on macOS 15.1 (Sequoia) using XCode 16.1 with both Intel and M1 CPUs. I also tested that it builds cleanly on Ubuntu 22.04 using the system gmp and gcc. The openblas spkg also builds on all three of those systems, although I could not determine whether Sage was using the system gfortran or its own gfortran for building openblas on Ubuntu. There is a caveat. The gcc project does not currently have official support for Apple Silicon. However, the gcc maintainer for darwin, Iain Sandoe , maintains a [github site](https://github.com/iains/) containing gcc source code with "experimental" support for Apple silicon, in addition to Intel. This PR uses the [gcc-14-branch](https://github.com/iains/gcc-14-branch) repository from that site. The spkg fetches the tag [gcc-14.2-darwin- r2](https://github.com/iains/gcc-14-branch/releases/tag/gcc-14.2-darwin- r2) as a tarball and names the tarball as gfortran-14.2.0.tar.gz. The github api does not support publishing hashes of tag downloads. So I downloaded the tag tarball twice and verified that the files were the same for both downloads. I used hashes of that file in checksums.ini. <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> No patches are needed for building on macOS with either CPU or on Ubuntu. (cf PR sagemath#38855) ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38905 Reported by: Marc Culler Reviewer(s): John H. Palmieri
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix gfortran and boost_cropped builds for Xcode 16
I am reopening the PR at #38783. The patches there work well and should be merged. (The original PR could not be reopened because the repo upon which it was based has been removed.) From that PR's description:
This PR modifies the patches in the gfortran spkg and adds a patch to the boost_cropped spkg. It addresses some issues caused by changes added in XCode 16, which is the XCode version compatible with macOS 15 Sequoia.
The gfortran spkg failed to build on macOS 15 Sequoia with XCode 16 because of this bug which is specific to clang 16. The bug report contains a patch, which is what this PR adds. However, that patch changed files which were also being patched by the existing gcc-13.3.0-arm.patch. Rather than have patches which must be applied in a certain order, this PR replaces the gcc-13.3.0-arm patch with a new patch file named gcc-13_3_0.patch which incorporates the new changes (no longer just for arm) with the older ones.
The e-antic spkg failed to build on macOS 15 Sequoia. The reason turned out to be that XCode 16, unlike earlier versions, now generates an error for code which used to generate a warning about assigning an out-of-range value to an enum. The code that triggers the error is in a boost header file. There is a patch for the header file in this macports ticket. The patch modifies a line in the header file which controls how this warning / error is handled by certain compilers. The change adds clang 16 to the list of those compilers.
See https://groups.google.com/g/sage-devel/c/sv3jCczVa40 and https://groups.google.com/g/sage-devel/c/yYRBm-hc918
📝 Checklist
⌛ Dependencies