Skip to content

Commit a7b9ebc

Browse files
author
Release Manager
committed
sagemathgh-35848: upgrade to flint3 Upgrade to flint3. Current Sage versions are not compatible with flint ≥ 3, and, though the diff is not huge, there are enough changes that versions including this PR will be incompatible with flint < 3. Fixes sagemath#20003. Closes sagemath#35993 as no longer relevant. Related PRs in upstream projects: * Singular/Singular#1177 * flintlib/flint#1408 * flintlib/flint#1489 * flintlib/flint#1492 * flintlib/flint#1611 * algebraic-solving/msolve#76 * flatsurf/e-antic#264 Additional changes still needed for optional packages to work: * sagemath#36677 * upgrade e-antic * possibly more Planned follow-ups: * sagemath#36449 * sagemath#36433 URL: sagemath#35848 Reported by: Marc Mezzarobba Reviewer(s): Vincent Delecroix
2 parents 9c4fc77 + 27351b5 commit a7b9ebc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+423
-439
lines changed

build/pkgs/antic/SPKG.rst

-18
This file was deleted.

build/pkgs/antic/checksums.ini

-5
This file was deleted.

build/pkgs/antic/dependencies

-4
This file was deleted.

build/pkgs/antic/distros/arch.txt

-1
This file was deleted.

build/pkgs/antic/distros/conda.txt

-1
This file was deleted.

build/pkgs/antic/distros/debian.txt

-1
This file was deleted.

build/pkgs/antic/distros/fedora.txt

-1
This file was deleted.

build/pkgs/antic/distros/freebsd.txt

-1
This file was deleted.

build/pkgs/antic/distros/opensuse.txt

-1
This file was deleted.

build/pkgs/antic/distros/repology.txt

-1
This file was deleted.

build/pkgs/antic/package-version.txt

-1
This file was deleted.

build/pkgs/antic/spkg-install.in

-19
This file was deleted.

build/pkgs/antic/type

-1
This file was deleted.

build/pkgs/arb/SPKG.rst

-27
This file was deleted.

build/pkgs/arb/checksums.ini

-5
This file was deleted.

build/pkgs/arb/dependencies

-4
This file was deleted.

build/pkgs/arb/distros/arch.txt

-1
This file was deleted.

build/pkgs/arb/distros/conda.txt

-1
This file was deleted.

build/pkgs/arb/distros/debian.txt

-1
This file was deleted.

build/pkgs/arb/distros/fedora.txt

-1
This file was deleted.

build/pkgs/arb/distros/freebsd.txt

-1
This file was deleted.

build/pkgs/arb/distros/gentoo.txt

-1
This file was deleted.

build/pkgs/arb/distros/homebrew.txt

-1
This file was deleted.

build/pkgs/arb/distros/nix.txt

-1
This file was deleted.

build/pkgs/arb/distros/opensuse.txt

-1
This file was deleted.

build/pkgs/arb/distros/repology.txt

-1
This file was deleted.

build/pkgs/arb/distros/void.txt

-1
This file was deleted.

build/pkgs/arb/package-version.txt

-1
This file was deleted.

build/pkgs/arb/spkg-check.in

-2
This file was deleted.

build/pkgs/arb/spkg-configure.m4

-23
This file was deleted.

build/pkgs/arb/spkg-install.in

-17
This file was deleted.

build/pkgs/arb/type

-1
This file was deleted.

build/pkgs/e_antic/dependencies

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(MP_LIBRARY) flint arb antic boost_cropped
1+
$(MP_LIBRARY) flint boost_cropped
22

33
----------
44
All lines of this file are ignored except the first.

build/pkgs/flint/SPKG.rst

+3-3

build/pkgs/flint/checksums.ini

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tarball=flint-VERSION.tar.gz
2-
sha1=63d90f8242c8f8ab4011fbcfb44b86c154f43abd
3-
md5=c2d3cec326438f159a530c66eb07fafe
4-
cksum=4244948341
5-
upstream_url=http://flintlib.org/flint-VERSION.tar.gz
2+
sha1=65be9297c06edd7e24f20874b7bd6130cee56723
3+
md5=5189f67b0ec12e4a54d6782851642b81
4+
cksum=172350473
5+
upstream_url=https://github.com/flintlib/flint/releases/download/vVERSION/flint-VERSION.tar.gz

build/pkgs/flint/dependencies

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(MP_LIBRARY) mpfr ntl
1+
$(MP_LIBRARY) mpfr
22

33
----------
44
All lines of this file are ignored except the first.

build/pkgs/flint/package-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.0
1+
3.0.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
From 54277f054f13254898c9a57c2c7eb869877e1252 Mon Sep 17 00:00:00 2001
2+
From: Marc Mezzarobba <[email protected]>
3+
Date: Mon, 13 Nov 2023 10:23:54 +0100
4+
Subject: [PATCH] Makefile.in: fix handling of $DESTDIR
5+
6+
---
7+
Makefile.in | 54 ++++++++++++++++++++++++++---------------------------
8+
1 file changed, 27 insertions(+), 27 deletions(-)
9+
10+
diff --git a/Makefile.in b/Makefile.in
11+
index 08db6837c..2827b9da1 100644
12+
--- a/Makefile.in
13+
+++ b/Makefile.in
14+
@@ -34,9 +34,9 @@ FLINT_SOLIB:=@FLINT_SOLIB@
15+
prefix:=@prefix@
16+
exec_prefix:=@exec_prefix@
17+
18+
-INCLUDEDIR:=$(DESTDIR)@includedir@
19+
-LIBDIR:=$(DESTDIR)@libdir@
20+
-BINDIR:=$(DESTDIR)@bindir@
21+
+INCLUDEDIR:=@includedir@
22+
+LIBDIR:=@libdir@
23+
+BINDIR:=@bindir@
24+
PKGCONFIGDIR:=$(LIBDIR)/pkgconfig
25+
26+
HOST_OS:=@host_os@
27+
@@ -202,10 +202,10 @@ BUILD_DIRS += \
28+
endif
29+
30+
INSTALL_DIRS := \
31+
- $(LIBDIR) $(INCLUDEDIR)/flint \
32+
- $(PKGCONFIGDIR)
33+
+ $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)/flint \
34+
+ $(DESTDIR)$(PKGCONFIGDIR)
35+
ifneq ($(FLINT_DLLLIB),0)
36+
-INSTALL_DIRS += $(BINDIR)
37+
+INSTALL_DIRS += $(DESTDIR)$(BINDIR)
38+
endif
39+
40+
################################################################################
41+
@@ -722,41 +722,41 @@ distclean: clean
42+
################################################################################
43+
44+
install: library | $(INSTALL_DIRS)
45+
- $(CP) flint.pc $(PKGCONFIGDIR)/flint.pc
46+
+ $(CP) flint.pc $(DESTDIR)$(PKGCONFIGDIR)/flint.pc
47+
ifneq ($(SHARED), 0)
48+
ifneq ($(FLINT_DLLLIB),0)
49+
- $(CP_A) $(FLINT_DIR)/$(FLINT_LIB) $(BINDIR)
50+
- $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_MAJOR) $(BINDIR)
51+
- $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_FULL) $(BINDIR)
52+
- $(CP) $(FLINT_DIR)/$(FLINT_IMPLIB) $(LIBDIR)
53+
+ $(CP_A) $(FLINT_DIR)/$(FLINT_LIB) $(DESTDIR)$(BINDIR)
54+
+ $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_MAJOR) $(DESTDIR)$(BINDIR)
55+
+ $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_FULL) $(DESTDIR)$(BINDIR)
56+
+ $(CP) $(FLINT_DIR)/$(FLINT_IMPLIB) $(DESTDIR)$(LIBDIR)
57+
else
58+
- $(CP_A) $(FLINT_DIR)/$(FLINT_LIB) $(LIBDIR)
59+
- $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_MAJOR) $(LIBDIR)
60+
- $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_FULL) $(LIBDIR)
61+
+ $(CP_A) $(FLINT_DIR)/$(FLINT_LIB) $(DESTDIR)$(LIBDIR)
62+
+ $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_MAJOR) $(DESTDIR)$(LIBDIR)
63+
+ $(CP_A) $(FLINT_DIR)/$(FLINT_LIB_FULL) $(DESTDIR)$(LIBDIR)
64+
endif
65+
ifneq ($(FLINT_DYLIB),0)
66+
- install_name_tool -id $(LIBDIR)/$(FLINT_LIB_FULL) $(LIBDIR)/$(FLINT_LIB)
67+
+ install_name_tool -id $(LIBDIR)/$(FLINT_LIB_FULL) $(DESTDIR)$(LIBDIR)/$(FLINT_LIB)
68+
endif
69+
endif
70+
ifneq ($(STATIC), 0)
71+
- $(CP) $(FLINT_DIR)/$(FLINT_LIB_STATIC) $(LIBDIR)
72+
+ $(CP) $(FLINT_DIR)/$(FLINT_LIB_STATIC) $(DESTDIR)$(LIBDIR)
73+
endif
74+
- $(CP) $(HEADERS) $(INCLUDEDIR)/flint
75+
+ $(CP) $(HEADERS) $(DESTDIR)$(INCLUDEDIR)/flint
76+
77+
uninstall:
78+
- $(RM_F) $(PKGCONFIGDIR)/flint.pc
79+
+ $(RM_F) $(DESTDIR)$(PKGCONFIGDIR)/flint.pc
80+
ifneq ($(FLINT_DLLLIB),0)
81+
- $(RM_F) $(BINDIR)/$(FLINT_LIB)
82+
- $(RM_F) $(BINDIR)/$(FLINT_LIB_MAJOR)
83+
- $(RM_F) $(BINDIR)/$(FLINT_LIB_FULL)
84+
- $(RM_F) $(LIBDIR)/$(FLINT_IMPLIB)
85+
+ $(RM_F) $(DESTDIR)$(BINDIR)/$(FLINT_LIB)
86+
+ $(RM_F) $(DESTDIR)$(BINDIR)/$(FLINT_LIB_MAJOR)
87+
+ $(RM_F) $(DESTDIR)$(BINDIR)/$(FLINT_LIB_FULL)
88+
+ $(RM_F) $(DESTDIR)$(LIBDIR)/$(FLINT_IMPLIB)
89+
else
90+
- $(RM_F) $(LIBDIR)/$(FLINT_LIB)
91+
- $(RM_F) $(LIBDIR)/$(FLINT_LIB_MAJOR)
92+
- $(RM_F) $(LIBDIR)/$(FLINT_LIB_FULL)
93+
+ $(RM_F) $(DESTDIR)$(LIBDIR)/$(FLINT_LIB)
94+
+ $(RM_F) $(DESTDIR)$(LIBDIR)/$(FLINT_LIB_MAJOR)
95+
+ $(RM_F) $(DESTDIR)$(LIBDIR)/$(FLINT_LIB_FULL)
96+
endif
97+
- $(RM_F) $(LIBDIR)/$(FLINT_LIB_STATIC)
98+
- $(RM_RF) $(INCLUDEDIR)/flint
99+
+ $(RM_F) $(DESTDIR)$(LIBDIR)/$(FLINT_LIB_STATIC)
100+
+ $(RM_RF) $(DESTDIR)$(INCLUDEDIR)/flint
101+
102+
################################################################################
103+
# maintainer stuff
104+
--
105+
2.42.0
106+

build/pkgs/flint/spkg-build.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd src
2+
sdh_configure
3+
sdh_make

build/pkgs/flint/spkg-configure.m4

+3-20
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
SAGE_SPKG_CONFIGURE([flint], [
2-
SAGE_SPKG_DEPCHECK([mpfr ntl], [
2+
SAGE_SPKG_DEPCHECK([mpfr], [
33
AC_CHECK_HEADER(flint/flint.h, [
4-
dnl flint_parallel_binary_splitting appears in Flint 2.9.0, needed by arb 2.23
5-
AC_SEARCH_LIBS([flint_parallel_binary_splitting], [flint], [
6-
dnl check that NTL is linked in
7-
AC_SEARCH_LIBS([fmpz_poly_get_ZZX], [flint], [
8-
9-
AC_MSG_CHECKING([that GC is not enabled in Flint... ])
10-
AC_RUN_IFELSE([
11-
AC_LANG_PROGRAM([[#include <flint/flint.h>]], [
12-
[#ifdef HAVE_GC]
13-
[return HAVE_GC;]
14-
[#else]
15-
[return 0;]
16-
[#endif]])],
17-
[AC_MSG_RESULT([GC not enabled. Good.])],
18-
[AC_MSG_RESULT([GC enabled. Incompatible with Sage.])
19-
sage_spkg_install_flint=yes],
20-
[AC_MSG_RESULT(["cross compiling. assuming GC is not enabled"])])
21-
], [sage_spkg_install_flint=yes])
22-
], [sage_spkg_install_flint=yes])
4+
dnl gr_get_fexpr appears in Flint 3.0
5+
AC_SEARCH_LIBS([gr_get_fexpr], [flint], [], [sage_spkg_install_flint=yes])
236
], [sage_spkg_install_flint=yes])
247
])
258
], [], [], [

build/pkgs/flint/spkg-install.in

-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,2 @@
1-
###############################################################################
2-
#
3-
# FLINT Sage install script
4-
#
5-
###############################################################################
6-
if [ "$SAGE_DEBUG" = "yes" ]; then
7-
echo "Building a debug version of FLINT."
8-
FLINT_TUNE=" $FLINT_TUNE"; export FLINT_TUNE
9-
FLINT_CONFIGURE="--enable-assert $FLINT_CONFIGURE"
10-
fi
11-
121
cd src
13-
14-
echo "Configuring FLINT."
15-
# Trac #29607: We must always supply --with-gmp, --with-mpfr,
16-
# --with-ntl because otherwise FLINT's configure script uses
17-
# /usr/local, which is always wrong.
18-
# This is why we do not use $SAGE_CONFIGURE_GMP etc. here.
19-
# The value $SAGE_LOCAL is always a safe choice even if the library
20-
# is coming from the system and is found using what is in
21-
# LIBRARY_PATH or LDFLAGS etc.
22-
./configure \
23-
--disable-static \
24-
--prefix="$SAGE_LOCAL" \
25-
--with-gmp="$SAGE_LOCAL" \
26-
--with-mpfr="$SAGE_LOCAL" \
27-
--with-ntl="$SAGE_LOCAL" \
28-
$FLINT_CONFIGURE || sdh_die "Error: Failed to configure FLINT."
29-
30-
sdh_make verbose
31-
32-
echo "Deleting old FLINT files."
33-
rm -f $SAGE_LOCAL/lib/libflint*
34-
rm -rf $SAGE_LOCAL/include/flint
35-
362
sdh_make_install

0 commit comments

Comments
 (0)