-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
Updates to linbox-1.7.0, givaro-4.2.0, fflas-ffpack-2.5.0 #35148
Conversation
In this case, we'll have to tighten the Singular requirements in |
The problem here is that configure decided to use givaro and fflas-ffpack from system, and rebuilding linbox to 1.7.0 failed. I guess this is related to #34359. I don't know what is the way forward. Also, there seems to be other issues: |
What versions of packages do we want to accept from the system? #34359 is relevant |
Even debian (testing) has already moved to linbox 1.7.0. Maybe we can just require givaro 4.2.0, fflas 2.5.0, and linbox 1.7.0? The important bit is that linbox 1.7.0 cannot be built with older givaro & fflas so either you force everything to the new versions or you have to add logic in givaro and fflas to accept old versions only if system linbox is available. |
Sounds reasonable. |
I don't see an easy way to support both 1.6.3 and 1.7.0. Three lines have to be changed: $ git diff
diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd
index dcc482960cc..6db69735abc 100644
--- a/src/sage/libs/linbox/linbox.pxd
+++ b/src/sage/libs/linbox/linbox.pxd
@@ -32,7 +32,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
ctypedef Modular_double Field
ctypedef double Element
DenseMatrix_Modular_double(Field F, size_t m, size_t n)
- DenseMatrix_Modular_double(Field F, size_t m, size_t n, Element*)
+ DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n)
void setEntry(size_t i, size_t j, Element& a)
Element &getEntry(size_t i, size_t j)
@@ -42,7 +42,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
ctypedef Modular_float Field
ctypedef float Element
DenseMatrix_Modular_float(Field F, size_t m, size_t n)
- DenseMatrix_Modular_float(Field F, size_t m, size_t n, Element*)
+ DenseMatrix_Modular_float(Field F, Element*, size_t m, size_t n)
void setEntry(size_t i, size_t j, Element& a)
Element &getEntry(size_t i, size_t j)
diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
index e45e05f3641..abf29badce6 100644
--- a/src/sage/matrix/matrix_modn_dense_template.pxi
+++ b/src/sage/matrix/matrix_modn_dense_template.pxi
@@ -221,7 +221,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
return 0,[]
cdef ModField *F = new ModField(<long>modulus)
- cdef DenseMatrix *A = new DenseMatrix(F[0], <Py_ssize_t>nrows, <Py_ssize_t>ncols, <ModField.Element*>entries)
+ cdef DenseMatrix *A = new DenseMatrix(F[0], <ModField.Element*>entries,<Py_ssize_t>nrows, <Py_ssize_t>ncols)
cdef Py_ssize_t r = reducedRowEchelonize(A[0])
cdef Py_ssize_t i,j
for i in range(nrows): The Of course, the easiest way is to just migrate to 1.7.0 altogether. |
In #35612 I removed the use of the changed api, that was only in a single place and easy to replace. Now sagelib uses only part of the API that is unchanged between 1.6.3 and 1.7.0. I rebased this PR on top of #35612. If possible, that one should be merged quickly for 10.0, and this one can be worked out together with #34359. I would say sagemath should update linbox et al soon after 10.0, and in terms of system support: accept any version of linbox starting with 1.6.3. As for givaro and fflas-ffpack, accept them from system only if either linbox is installed, or if they are at least 4.2.0 and 2.5.0. It should not be allowed to use older givaro and/or fflas-ffpack when linbox will be built by sage. |
Rebased to 10.0.rc2 without any change (removes spurious "fix the linter commits") |
### 📚 Description The constructor `DenseMatrix(field, entries, m, n)` in 1.6.3 was changed to `DenseMatrix(field, m, n, entries)` in 1.7.0. We replace use of this constructor by a different way to initialize a matrix from entries using part of the API that works both in 1.6.3 and in 1.7.0. NOTE: the two versions of the library are ABI-incompatible so changing linbox requires recompiling sagelib. To complicate matters, linbox doesn't change soname so the dynamic linker will let this go and sagemath will eventually crash. See: #35148 for the actual update of linbox -- this PR should make that one easier as well as system support of linbox, since both linbox 1.6.3 and 1.7.0 wil be supported. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. URL: #35612 Reported by: Gonzalo Tornaría Reviewer(s): Dima Pasechnik
I've just rebased this PR to 10.2.rc0. We've been shipping these updates for a while in void linux without any issue that I know of. There are some patches we use that I added here (IIRC they are all from upstream), and this is regularly tested on x86_64 (glibc and musl) and on i686 (glibc only). I think it's been tested on aarch64 as well. I'm no longer interested in this PR since I'm unable to test. If someone else wants to take over, feel free... |
Rebased to 10.2.rc1 |
On debian-bullseye-i386-standard (https://github.com/sagemath/sage/actions/runs/6836592787/job/18591708478?pr=35148#step:14:397):
|
No idea, I'm building on i686 without trouble (needs Does it work now? |
It seems all tests passed here (I only looked in debian-bullseye-i386-standard, but the failure seems to be something else). |
Same "incomplete type" errors are still present |
I give up. How should I know this is a 32 bit problem if ALL builders fail, etc. There's something very weird going on here. The lines that use Simd128<uint64_t> are all guarded by
so it makes sense that they shouldn't be compiled, but for some reason are. |
Also in fact
so all these flags (even the two that I removed) are actually unused. I'm looking back at my templates and I see I'm using |
Summary: removing all these unused flags and adding But I don't have time to follow up on this, so I'll just orphan this PR (is there such a thing?) |
By looking at the Summary page of the "CI Linux incremental" workflow - https://github.com/sagemath/sage/actions/runs/6841299882?pr=35148 |
Note sse2 is always available on x86_64, and on i686 starting with pentium 4 almost a quarter of a century ago.
Documentation preview for this PR (built with commit 66e9d15; changes) is ready! 🎉 |
i'll try with https://sources.debian.org/patches/linbox/1.7.0-3/ |
It looks like more work with upstream is needed. (that's a very good, on-topic PR number;) |
Also needs this patch linbox-team/givaro#226 (comment) to build givaro on Fedora 40 |
And part of the commit referenced in linbox-team/linbox#310 ... |
I've rebased the branch at https://github.com/vbraun/sage/tree/linbox-flas-givaro-4.2.0 and added the two additional upstream patches, now at least the linbox-flas-givaro builds on gcc-14 |
I've created a new PR at #37938 |
…-2.5.0 ### 📚 Description Draft PR taken from sagemath#35148. I rebased on top of 10.4 and added two more patches taken from upstream @ClementPernet closes sagemath#32959 closes sagemath#35148 URL: sagemath#37938 Reported by: Volker Braun Reviewer(s):
…-2.5.0 ### 📚 Description Draft PR taken from sagemath#35148. I rebased on top of 10.4 and added two more patches taken from upstream @ClementPernet closes sagemath#32959 closes sagemath#35148 URL: sagemath#37938 Reported by: Volker Braun Reviewer(s):
…-2.5.0 ### 📚 Description Draft PR taken from sagemath#35148. I rebased on top of 10.4 and added two more patches taken from upstream @ClementPernet closes sagemath#32959 closes sagemath#35148 URL: sagemath#37938 Reported by: Volker Braun Reviewer(s):
…-2.5.0 ### 📚 Description Draft PR taken from sagemath#35148. I rebased on top of 10.4 and added two more patches taken from upstream @ClementPernet closes sagemath#32959 closes sagemath#35148 URL: sagemath#37938 Reported by: Volker Braun Reviewer(s):
…-2.5.0 ### 📚 Description Draft PR taken from sagemath#35148. I rebased on top of 10.4 and added two more patches taken from upstream @ClementPernet closes sagemath#32959 closes sagemath#35148 URL: sagemath#37938 Reported by: Volker Braun Reviewer(s):
…-2.5.0 ### 📚 Description Draft PR taken from sagemath#35148. I rebased on top of 10.4 and added two more patches taken from upstream @ClementPernet closes sagemath#32959 closes sagemath#35148 URL: sagemath#37938 Reported by: Volker Braun Reviewer(s):
📚 Description
Draft PR taken from #32959. I rebased on top of 9.8 and squashed together so there's one commit per update, plus the two commits that adapt sage to changes in linbox api. I left out sagemath/sagetrac-mirror@4006e10 since I understand it's not needed with singular 4.3+.
I'm testing on void, but note I needed to include a few patches for this to work on i686:
I'm making this draft PR to get the ball rolling...
@ClementPernet
Resolves #32959
📝 Checklist
⌛ Dependencies
build/pkgs/{givaro,fflas_ffpack,linbox}
: Accept matching set of new versions #36997