Skip to content

Upgrade to flint-3.3.0 #40259

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions build/pkgs/eclib/patches/flint-3.3.0-compatibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/libsrc/eclib/flinterface.h b/libsrc/eclib/flinterface.h
index a74049d..b9a582e 100644
--- a/libsrc/eclib/flinterface.h
+++ b/libsrc/eclib/flinterface.h
@@ -58,14 +58,22 @@ typedef struct
hlimb_t * entries;
slong r;
slong c;
+#if (__FLINT_VERSION==3)&&(__FLINT_VERSION_MINOR<3)
hlimb_t ** rows;
+#else
+ slong stride;
+#endif
nmod_t mod;
}
hmod_mat_struct;

typedef hmod_mat_struct hmod_mat_t[1];

+#if (__FLINT_VERSION==3)&&(__FLINT_VERSION_MINOR<3)
#define hmod_mat_entry(mat,i,j) ((mat)->rows[(i)][(j)])
+#else
+#define hmod_mat_entry nmod_mat_entry
+#endif
#define hmod_mat_nrows(mat) ((mat)->r)
#define hmod_mat_ncols(mat) ((mat)->c)

diff --git a/libsrc/mat.cc b/libsrc/mat.cc
index b0c6c08..948fc24 100644
--- a/libsrc/mat.cc
+++ b/libsrc/mat.cc
@@ -1602,7 +1602,9 @@ hmod_mat_clear(hmod_mat_t mat)
if (mat->entries)
{
flint_free(mat->entries);
+#if (__FLINT_VERSION==3)&&(__FLINT_VERSION_MINOR<3)
flint_free(mat->rows);
+#endif
}
}

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=ebca3a55e48373c2eeee6c172051f3177845e121
sha256=577d7729e4c2e79ca1e894ad2ce34bc73516a92f623d42562694817f888a17eb
sha1=1e60a03c108b3240cb3341c0d9f462ad0760e697
sha256=d9ae0f1318253727068270dbfa3c4b55155e3f4b7be6ca9c056e58f2838f15b3
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.2.2
3.3.0
4 changes: 4 additions & 0 deletions build/pkgs/flint/spkg-build.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
cd src

# See https://github.com/flintlib/flint/issues/2340
export CFLAGS="$CFLAGS -fno-strict-aliasing"

sdh_configure
sdh_make
26 changes: 26 additions & 0 deletions build/pkgs/singular/patches/flint-3.3.0-compatibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/factory/FLINTconvert.cc b/factory/FLINTconvert.cc
index c36f6022d..67c271c5a 100644
--- a/factory/FLINTconvert.cc
+++ b/factory/FLINTconvert.cc
@@ -652,7 +652,7 @@ convertFacCFMatrix2Fq_nmod_mat_t (fq_nmod_mat_t M,
{
for(j=m.columns();j>0;j--)
{
- convertFacCF2nmod_poly_t (M->rows[i-1]+j-1, m (i,j));
+ convertFacCF2nmod_poly_t (fq_nmod_mat_entry (M, i-1, j-1), m (i,j));
}
}
}
diff --git a/libpolys/polys/flintconv.cc b/libpolys/polys/flintconv.cc
index 89152f5e4..56d527c16 100644
--- a/libpolys/polys/flintconv.cc
+++ b/libpolys/polys/flintconv.cc
@@ -331,7 +331,7 @@ void convSingMFlintFq_nmod_mat(matrix m, fq_nmod_mat_t M, const fq_nmod_ctx_t fq
{
for(j=MATCOLS(m);j>0;j--)
{
- convSingPFlintnmod_poly_t (M->rows[i-1]+j-1, MATELEM(m,i,j),r);
+ convSingPFlintnmod_poly_t (fq_nmod_mat_entry (M, i-1, j-1), MATELEM(m,i,j),r);
}
}
}
Loading