Skip to content

Commit

Permalink
sagemathgh-38855: Fixes for Xcode 16 and gcc/gfortran, boost_cropped
Browse files Browse the repository at this point in the history
Fix gfortran and boost_cropped builds for Xcode 16

<!-- ^ 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? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

I am reopening the PR at sagemath#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

<!-- 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#38855
Reported by: John H. Palmieri
Reviewer(s):
  • Loading branch information
Release Manager committed Oct 26, 2024
2 parents ce4a78d + 82cea4d commit 9a5d35a
Show file tree
Hide file tree
Showing 4 changed files with 836 additions and 779 deletions.
13 changes: 13 additions & 0 deletions build/pkgs/boost_cropped/patches/integral_wrapper.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/boost/mpl/aux_/integral_wrapper.hpp b/boost/mpl/aux_/integral_wrapper.hpp
index 6bc05f7..4f3f696 100644
--- a/boost/mpl/aux_/integral_wrapper.hpp
+++ b/boost/mpl/aux_/integral_wrapper.hpp
@@ -56,7 +56,7 @@ struct AUX_WRAPPER_NAME
// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
// while some other don't like 'value + 1' (Borland), and some don't like
// either
-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
+#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) || __clang_major__ >= 16
private:
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=978eb775a20fea3ed9b88f0d67ecd84a3d9cd6ea
sha256=c3987bb0f8aca81e112a17d8904ef2353a706159d43250305dc2bcac4ca2e33a
sha1=d5bf289a1207ceabd951ee35f5ab39341b1ac7c8
sha256=812bbb5852b509f0b58ec4d776e81ed99441cef54ab98d2f320281383938dfe5
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4326d0d9422011034a230ab3c1445fafeb2ac444
9645305c544a762548a1c9c927074029d196f7e0
Loading

0 comments on commit 9a5d35a

Please sign in to comment.