Skip to content
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

Fixes for Xcode 16 and gcc/gfortran, boost_cropped #38855

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

jhpalmieri
Copy link
Member

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

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • 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

@jhpalmieri
Copy link
Member Author

All of the work was done at #38783. Marc Culler is the author, I am the reviewer.

Copy link

Documentation preview for this PR (built with commit 82cea4d; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@vbraun vbraun merged commit 9a5d35a into sagemath:develop Oct 26, 2024
27 of 43 checks passed
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 14, 2024
…cc-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants