Skip to content

Commit

Permalink
sagemathgh-37203: build/pkgs/flint 3.1.3
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
For this upgrade we tighten the check for GMP so that 6.2.1 is accepted
but 6.2.0 is rejected. For example `ubuntu-focal-standard` brings 6.2.0,
we accept it, and then FLINT complains:
https://github.com/mkoeppe/flint2/actions/runs/7718792281/job/2104079370
6#step:11:5395

We also change the upper bound on system `flint` accepted by
`configure`. Closes sagemath#37838.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] 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 accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#37484
- Depends on sagemath#37495 (merged and reverted here)
- Depends on sagemath#37570 (merged here)
- Depends on sagemath#37351 (merged here)
- Depends on sagemath#37726 (merged here to resolve merge conflict)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37203
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
  • Loading branch information
Release Manager committed May 23, 2024
2 parents 83a7fac + e2d2df4 commit 4a6edc3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 112 deletions.
4 changes: 2 additions & 2 deletions build/pkgs/flint/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=flint-VERSION.tar.gz
sha1=65be9297c06edd7e24f20874b7bd6130cee56723
sha256=7b311a00503a863881eb8177dbeb84322f29399f3d7d72f3b1a4c9ba1d5794b4
sha1=35af6e2de8765a841952438f3c915d0505b983b6
sha256=3259e5ecbb07ea3bebeff025f846a494087be92b0aaf0636d6e36128963cadda
upstream_url=https://github.com/flintlib/flint/releases/download/vVERSION/flint-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/flint/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
3.1.3

This file was deleted.

26 changes: 23 additions & 3 deletions build/pkgs/gmp/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
SAGE_SPKG_CONFIGURE([gmp], [
sage_spkg_install_gmp=no
SAGE_SPKG_CONFIGURE([gmp], [dnl
sage_spkg_install_gmp=no
AC_CHECK_HEADER(gmp.h, [], [sage_spkg_install_gmp=yes])
AC_CHECK_HEADER(gmpxx.h, [], [sage_spkg_install_gmp=yes])
# Check that GMP >= 6.2.1; this test is copied from FLINT.
AC_MSG_CHECKING([if version of GMP is greater than 6.2.1])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM(
[[#include <gmp.h>
]],
[[#if (__GNU_MP_VERSION < 6) \
|| (__GNU_MP_VERSION == 6 && __GNU_MP_VERSION_MINOR < 2) \
|| (__GNU_MP_VERSION == 6 && __GNU_MP_VERSION_MINOR == 2 && __GNU_MP_VERSION_PATCHLEVEL < 1)
# error GMP version 6.2.1 or later is required
#endif
]]
)], [dnl
AC_MSG_RESULT([yes])
], [dnl
AC_MSG_RESULT([no])
sage_spkg_install_gmp=yes
])
dnl The test above uses the headers only. To protect against header/library
dnl mismatches, we now check for a function.
dnl mpn_gcd_11 appeared in GMP 6.2.1
dnl It is undocumented but is used by Flint when built with default
dnl flags.
AC_SEARCH_LIBS([__gmpn_gcd_11], [gmp], [],
[sage_spkg_install_gmp=yes])
], [], [], [
], [], [], [dnl
if test x$sage_spkg_install_gmp = xyes; then
AC_SUBST(SAGE_GMP_PREFIX, ['$SAGE_LOCAL'])
AC_SUBST(SAGE_GMP_INCLUDE, ['$SAGE_LOCAL/include'])
Expand Down

0 comments on commit 4a6edc3

Please sign in to comment.