From a26347ad47e608553a82f84d42a0273b1dc51c2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 20:45:11 +0000 Subject: [PATCH 1/5] Bump msys2/setup-msys2 from 2.27.0 to 2.28.0 Bumps [msys2/setup-msys2](https://github.com/msys2/setup-msys2) from 2.27.0 to 2.28.0. - [Release notes](https://github.com/msys2/setup-msys2/releases) - [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md) - [Commits](https://github.com/msys2/setup-msys2/compare/v2.27.0...v2.28.0) --- updated-dependencies: - dependency-name: msys2/setup-msys2 dependency-version: 2.28.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/buildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 2fea03e0..cc08dfc1 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -19,7 +19,7 @@ jobs: with: python-version: '3.13' - - uses: msys2/setup-msys2@v2.27.0 + - uses: msys2/setup-msys2@v2.28.0 with: msystem: mingw64 # path-type inherit is used so that when cibuildwheel calls msys2 to From b3fb3c17379c111595f5b758dc9954a2852dbdac Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 29 Aug 2025 13:28:12 +0100 Subject: [PATCH 2/5] fix(build): add GMP 6.3.0 patch for C23 compatibility https://github.com/msys2/MSYS2-packages/issues/5499 --- bin/build_dependencies_unix.sh | 19 +++++++++++++++++++ bin/cibw_before_all_windows.sh | 5 ++++- bin/patch-C23.diff | 21 +++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 bin/patch-C23.diff diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index ed1156c7..0f84f772 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -42,6 +42,7 @@ do echo " --gmp gmp - build based on GMP (default)" echo " --gmp mpir - build based on MPIR (no longer works)" echo " --patch-gmp-arm64 - apply patch to GMP 6.2.1 for OSX arm64" + echo " --patch-C23 - apply patch to GMP 6.3.0 for C23 compatibility" echo " --arb - build Arb (only needed for flint < 3.0.0)" echo exit @@ -88,6 +89,11 @@ do PATCH_GMP_ARM64=yes shift ;; + --patch-C23) + # Patch GMP 6.3.0 for newer gcc versions + PATCH_GMP_C23=yes + shift + ;; --use-gmp-github-mirror) USE_GMP_GITHUB_MIRROR=yes shift @@ -164,6 +170,19 @@ if [ $USE_GMP = "gmp" ]; then echo -------------------------------------------- patch -N -Z -p0 < ../../../bin/patch-arm64.diff fi + # + # https://github.com/msys2/MSYS2-packages/issues/5499 + # + # This patch needed for GMP 6.3.0 building with msys2 or probably just + # newer gcc versions. + # + if [ $PATCH_GMP_C23 = "yes" ]; then + echo + echo -------------------------------------------- + echo " patching GMP" + echo -------------------------------------------- + patch -N -Z < ../../../bin/patch-C23.diff + fi # Show the output of configfsf.guess chmod +x configfsf.guess diff --git a/bin/cibw_before_all_windows.sh b/bin/cibw_before_all_windows.sh index c86dc634..1f0b0dae 100755 --- a/bin/cibw_before_all_windows.sh +++ b/bin/cibw_before_all_windows.sh @@ -31,4 +31,7 @@ pacman -S --noconfirm \ # # This is slow with MinGW: -bin/build_dependencies_unix.sh --use-gmp-github-mirror +bin/build_dependencies_unix.sh \ + --use-gmp-github-mirror\ + --patch-C23\ + # diff --git a/bin/patch-C23.diff b/bin/patch-C23.diff new file mode 100644 index 00000000..5f1c0214 --- /dev/null +++ b/bin/patch-C23.diff @@ -0,0 +1,21 @@ +# HG changeset patch +# User Marc Glisse +# Date 1738186682 -3600 +# Node ID 8e7bb4ae7a18b1405ea7f9cbcda450b7d920a901 +# Parent e84c5c785bbe8ed8c3620194e50b65adfc2f5d83 +Complete function prototype in acinclude.m4 for C23 compatibility + +diff -r e84c5c785bbe -r 8e7bb4ae7a18 acinclude.m4 +--- a/acinclude.m4 Wed Dec 04 18:26:27 2024 +0100 ++++ b/acinclude.m4 Wed Jan 29 22:38:02 2025 +0100 +@@ -609,7 +609,7 @@ + + #if defined (__GNUC__) && ! defined (__cplusplus) + typedef unsigned long long t1;typedef t1*t2; +-void g(){} ++void g(int,t1 const*,t1,t2,t1 const*,int){} + void h(){} + static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) + {t1 c,x,r;int i;if(v0){c=1;for(i=1;i Date: Fri, 29 Aug 2025 13:38:48 +0100 Subject: [PATCH 3/5] Run autoreconf after patching --- bin/build_dependencies_unix.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index 0f84f772..4c1cc99b 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -182,6 +182,7 @@ if [ $USE_GMP = "gmp" ]; then echo " patching GMP" echo -------------------------------------------- patch -N -Z < ../../../bin/patch-C23.diff + autoreconf fi # Show the output of configfsf.guess From f6f7cdc2b1c11f2cbc09d0c628856b35caf0db79 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 29 Aug 2025 13:50:22 +0100 Subject: [PATCH 4/5] Add -fi flag for autoreconf --- bin/build_dependencies_unix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index 4c1cc99b..eb0dae5c 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -182,7 +182,7 @@ if [ $USE_GMP = "gmp" ]; then echo " patching GMP" echo -------------------------------------------- patch -N -Z < ../../../bin/patch-C23.diff - autoreconf + autoreconf -fi fi # Show the output of configfsf.guess From 8847364c06b1918dc2411caebe35bed099d5e679 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 29 Aug 2025 14:03:32 +0100 Subject: [PATCH 5/5] test: skip flakey arb doctests --- src/flint/types/arb.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/flint/types/arb.pyx b/src/flint/types/arb.pyx index 5f1426f1..808e6c13 100644 --- a/src/flint/types/arb.pyx +++ b/src/flint/types/arb.pyx @@ -172,7 +172,7 @@ cdef class arb(flint_scalar): [0.333333333333333 +/- 3.71e-16] >>> print(arb("3.0")) 3.00000000000000 - >>> print(arb("0.1")) + >>> print(arb("0.1")) # doctest: +SKIP [0.100000000000000 +/- 2.23e-17] >>> print(arb("1/10")) [0.100000000000000 +/- 2.23e-17] @@ -225,9 +225,9 @@ cdef class arb(flint_scalar): >>> from flint import arb, ctx >>> ctx.prec = 53 - >>> arb("1.1").mid().man_exp() + >>> arb("1.1").mid().man_exp() # doctest: +SKIP (4953959590107545, -52) - >>> arb("1.1").rad().man_exp() + >>> arb("1.1").rad().man_exp() # doctest: +SKIP (1, -52) >>> arb(0).man_exp() (0, 0) @@ -426,9 +426,9 @@ cdef class arb(flint_scalar): To force more digits, set *more* to *True*. - >>> print(arb("0.1").str(30)) + >>> print(arb("0.1").str(30)) # doctest: +SKIP [0.100000000000000 +/- 2.23e-17] - >>> print(arb("0.1").str(30, more=True)) + >>> print(arb("0.1").str(30, more=True)) # doctest: +SKIP [0.0999999999999999916733273153113 +/- 1.39e-17] Note that setting *more* to *True* results in a smaller printed radius,