-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
upgrade to flint3 #35848
upgrade to flint3 #35848
Conversation
fc03812
to
b7ca9e4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
a7afb3b
to
320dff1
Compare
Things look pretty good :-). Mostly a few benign output changes. I've reported the only dubious one at flintlib/flint#1410; let's wait for Fredrik's answer and the next alpha to decide how to update the tests. Hopefully it will also be possible to drop the patches at that point. We should also move the contents of |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
See also #35993. |
(I can not push to your branch) diff --git a/src/sage/libs/flint/fmpz_poly.pyx b/src/sage/libs/flint/fmpz_poly.pyx
index cfcbea9090..0034494247 100644
--- a/src/sage/libs/flint/fmpz_poly.pyx
+++ b/src/sage/libs/flint/fmpz_poly.pyx
@@ -23,12 +23,15 @@ from cpython.sequence cimport *
from cysignals.memory cimport sig_free
+from .fmpz cimport fmpz_init_set_readonly, fmpz_clear_readonly, fmpz_init, fmpz_clear, fmpz_set_mpz, fmpz_get_mpz
+
from sage.arith.long cimport pyobject_to_long
from sage.cpython.string cimport char_to_str, str_to_bytes
from sage.libs.flint.fmpz cimport *
from sage.structure.sage_object cimport SageObject
from sage.rings.integer cimport Integer
cdef class Fmpz_poly(SageObject):
def __cinit__(self): |
At 6ef8bd2 flint fails to build on my machine (linking problem with NTL) gcc -g -g -O2 -shared -Wl,-soname,libflint.so.18 build/generic_files_merged.lo build/thread_pool_merged.lo [...] build/ca_mat_merged.lo build/interfaces/NTL-interface.lo -o libflint.so.18.0.0 -Wl,-rpath-link,/home/doctorant/sage/local/lib -L/home/doctorant/sage/local/lib -Wl,-rpath,/home/doctorant/sage/local/lib -Wl,-rpath-link,/home/doctorant/sage/local/lib -L/home/doctorant/sage/local/lib -Wl,-rpath,/home/doctorant/sage/local/lib -pthread -lmpfr -lgmp -lm -lstdc++ -lntl
/usr/bin/ld: _ZN3NTL9zz_pEInfoE: TLS reference in build/interfaces/NTL-interface.lo mismatches non-TLS definition in /home/doctorant/sage/local/lib/libntl.so section .bss
/usr/bin/ld: /home/doctorant/sage/local/lib/libntl.so: error adding symbols: bad value
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:377: libflint.so.18.0.0] Error 1 |
This is with the version from yesterday afternoon, where I forgot the line
isn't it? |
Did you build sage from scratch or incrementally? Could it be that there are somehow two different versions of NTL at play here? |
I obtained that after a |
Can you post the full build logs somewhere? |
This comment was marked as outdated.
This comment was marked as outdated.
Ok, I can reproduce the issue... (edit:) ...but with an incremental build. I see this error if I (1) first build sage with system NTL, (2) run (edit:) ok, actually I see the issue when building from scratch too when I use |
Flint standalone compiled. Configured with $ ./configure --with-ntl --with-gmp --with-mpfr --with-blas --disable-static |
@videlec could you test again with this commit? |
I encouter the same kind of linking error against ntl but now with giac instead of flint. Probably unrelated to the PR.
|
you can build a native aarch64 SoC builder for under $100 - won't be fast, but will do the job. |
@dimpase Once again, I can of course build natively on my aarch64 machine; the point is, their build infrastructure is cross-build for that arch, so it won't be in the repositories.. |
On Tuesday, 21 November 2023 17:57:43 CET dkwo wrote:
Could anyone clarify whether `ntl` is still required in sage after
this patch, either for building or running flint, eclib or sage
itself?
It is no longer required for building flint, but still required for
building sage itself.
|
@mezzarobba Thanks a lot, this is what I thought.
|
The functionality in eclib which Sage uses does need NTL. Flint is optional. I'll look more carefully to see how vital for Sage the NTL dependency is. |
maxima/ecl are not going to get optional any time soon. So trying to remove NTL seems to be a bit in vain. |
@JohnCremona Got it, thanks.
Well, it would shorten the time needed to build sage in the above mentioned case. |
Are there further work issues here? |
None that I am aware of (at least if we are okay with temporarily breaking the e-antic and symengine optional packages). |
I've been testing and using this for a while, and I will be shipping 10.2 in void linux with this patch, because I cannot hold back flintlib any longer. I'm giving this positive review so it can be merged at the start of the 10.3 cycle. |
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
There is a buildbot that tests the e-antic optional package, do you have a plan for that? Or is it just going to be silently broken? Note that normaliz depends on it |
I think the plan is to break it and fix it soon. |
We - write down a script to auto-generate flint header files (currently at https://github.com/videlec/flint-header-sage-autogen) - replace most of the files in `src/sage/libs/flint` by auto-generated files. Doing so, the custom sage code in `src/sage/libs/flint` is always contained in files suffixed by `_sage.pxd`/`_sage.pyx`. - deprecate the files in `src/sage/libs/arb/` ### 📝 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. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies sagemath#35848 #### Upstream issues and patches - flintlib/flint#1523 - flintlib/flint#1529 - flintlib/flint#1532 - flintlib/flint#1535 - flintlib/flint#1536 - cython/cython#5779 - flintlib/flint#1653 - flintlib/flint#1655 URL: sagemath#36449 Reported by: Vincent Delecroix Reviewer(s): Marc Mezzarobba, Matthias Köppe, Vincent Delecroix
We - write down a script to auto-generate flint header files (currently at https://github.com/videlec/flint-header-sage-autogen) - replace most of the files in `src/sage/libs/flint` by auto-generated files. Doing so, the custom sage code in `src/sage/libs/flint` is always contained in files suffixed by `_sage.pxd`/`_sage.pyx`. - deprecate the files in `src/sage/libs/arb/` ### 📝 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. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies sagemath#35848 #### Upstream issues and patches - flintlib/flint#1523 - flintlib/flint#1529 - flintlib/flint#1532 - flintlib/flint#1535 - flintlib/flint#1536 - cython/cython#5779 - flintlib/flint#1653 - flintlib/flint#1655 URL: sagemath#36449 Reported by: Vincent Delecroix Reviewer(s): Marc Mezzarobba, Matthias Köppe, Vincent Delecroix
We - write down a script to auto-generate flint header files (currently at https://github.com/videlec/flint-header-sage-autogen) - replace most of the files in `src/sage/libs/flint` by auto-generated files. Doing so, the custom sage code in `src/sage/libs/flint` is always contained in files suffixed by `_sage.pxd`/`_sage.pyx`. - deprecate the files in `src/sage/libs/arb/` ### 📝 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. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies sagemath#35848 #### Upstream issues and patches - flintlib/flint#1523 - flintlib/flint#1529 - flintlib/flint#1532 - flintlib/flint#1535 - flintlib/flint#1536 - cython/cython#5779 - flintlib/flint#1653 - flintlib/flint#1655 URL: sagemath#36449 Reported by: Vincent Delecroix Reviewer(s): Marc Mezzarobba, Matthias Köppe, Vincent Delecroix
We - write down a script to auto-generate flint header files (currently at https://github.com/videlec/flint-header-sage-autogen) - replace most of the files in `src/sage/libs/flint` by auto-generated files. Doing so, the custom sage code in `src/sage/libs/flint` is always contained in files suffixed by `_sage.pxd`/`_sage.pyx`. - deprecate the files in `src/sage/libs/arb/` ### 📝 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. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies sagemath#35848 #### Upstream issues and patches - flintlib/flint#1523 - flintlib/flint#1529 - flintlib/flint#1532 - flintlib/flint#1535 - flintlib/flint#1536 - cython/cython#5779 - flintlib/flint#1653 - flintlib/flint#1655 URL: sagemath#36449 Reported by: Vincent Delecroix Reviewer(s): Marc Mezzarobba, Matthias Köppe, Vincent Delecroix
We - write down a script to auto-generate flint header files (currently at https://github.com/videlec/flint-header-sage-autogen) - replace most of the files in `src/sage/libs/flint` by auto-generated files. Doing so, the custom sage code in `src/sage/libs/flint` is always contained in files suffixed by `_sage.pxd`/`_sage.pyx`. - deprecate the files in `src/sage/libs/arb/` ### 📝 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. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies sagemath#35848 #### Upstream issues and patches - flintlib/flint#1523 - flintlib/flint#1529 - flintlib/flint#1532 - flintlib/flint#1535 - flintlib/flint#1536 - cython/cython#5779 - flintlib/flint#1653 - flintlib/flint#1655 URL: sagemath#36449 Reported by: Vincent Delecroix Reviewer(s): Marc Mezzarobba, Matthias Köppe, Vincent Delecroix
We - write down a script to auto-generate flint header files (currently at https://github.com/videlec/flint-header-sage-autogen) - replace most of the files in `src/sage/libs/flint` by auto-generated files. Doing so, the custom sage code in `src/sage/libs/flint` is always contained in files suffixed by `_sage.pxd`/`_sage.pyx`. - deprecate the files in `src/sage/libs/arb/` ### 📝 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. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies sagemath#35848 #### Upstream issues and patches - flintlib/flint#1523 - flintlib/flint#1529 - flintlib/flint#1532 - flintlib/flint#1535 - flintlib/flint#1536 - cython/cython#5779 - flintlib/flint#1653 - flintlib/flint#1655 URL: sagemath#36449 Reported by: Vincent Delecroix Reviewer(s): Marc Mezzarobba, Matthias Köppe, Vincent Delecroix
Change the definition of $BINDIR & co so that, in the case of staged installations, they contain the final (binary) installation directory, not the packaging directory. The only tangible effect should be that, on MacOS, install_name_tool is passed the correct library path. See sagemath/sage#35848 (comment)
Change the definition of $BINDIR & co so that, in the case of staged installations, they contain the final (binary) installation directory, not the packaging directory. The only tangible effect should be that, on MacOS, install_name_tool is passed the correct library path. See sagemath/sage#35848 (comment)
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 #20003.
Closes #35993 as no longer relevant.
Related PRs in upstream projects:
Additional changes still needed for optional packages to work:
Planned follow-ups: