sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.4k stars 474 forks source link

Upgrade FLINT to 2.8.4, arb to 2.22.1 #32211

Closed mkoeppe closed 2 years ago

mkoeppe commented 3 years ago

FLINT 2.8.1 and FLINT 2.8.2 announced, then FLINT 2.8.3, then FLINT 2.8.4:

Arb release history:

Depends on #33189

CC: @slel

Component: packages: standard

Keywords: upgrade, arb, flint

Author: Jonathan Kliem, Matthias Koeppe

Branch/Commit: 45f4984

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/32211

mkoeppe commented 3 years ago

Branch: u/mkoeppe/test_ticket__upgrade_flint_to_2_8_0

mkoeppe commented 3 years ago

New commits:

6d14c45build/pkgs/flint: Use 2.8.0-rc2
mkoeppe commented 3 years ago

Reviewer: https://github.com/mkoeppe/sage/actions/runs/1038241361

mkoeppe commented 3 years ago

Commit: 6d14c45

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

ac46936build/pkgs/flint/spkg-install.in: Use cmake
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 6d14c45 to ac46936

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from ac46936 to 9ea2e5c

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

9ea2e5cbuild/pkgs/arb/patches: Add https://github.com/fredrik-johansson/arb/commit/b6c8032e2da1b19eb7c5a5f5c2f3372643e3d170
mkoeppe commented 3 years ago

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/1038241361 to https://github.com/mkoeppe/sage/actions/runs/1039613405

mkoeppe commented 3 years ago
comment:6

After switching to the cmake build system:

Failure on ubuntu-trusty-standard (where Sage rejects system ntl), likely because FLINT accepts system NTL:

-- Detecting CXX compile features - done
-- Found GMP: /usr/include/x86_64-linux-gnu (Required is at least version "6.0.0") 
-- Found MPFR: /usr/include (Required is at least version "1.0.0") 
-- Found NTL: /usr/lib/libntl.so  
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Found CBLAS: /usr/include  
...
lib/libflint.so.16.1.0: undefined reference to `_ntl_gscompare(_ntl_gbigint_body*, long)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gmod(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gfree(_ntl_gbigint_body*)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gsetlength(_ntl_gbigint_body**, long)'
lib/libflint.so.16.1.0: undefined reference to `mpfr_rootn_ui'
lib/libflint.so.16.1.0: undefined reference to `NTL::TerminalError(char const*)'
collect2: error: ld returned 1 exit status
make[5]: *** [bin/test-t-umul_ppmm] Error 1

(ubuntu-trusty-minimal, i.e., without installation of system ntl, is OK)

Likewise ubuntu-xenial, debian-jessie, debian-stretch, etc.

mkoeppe commented 3 years ago

Description changed:

--- 
+++ 
@@ -1 +1,4 @@

+
+https://arblib.org/history.html#version-2-20-0
+
mkoeppe commented 3 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@

-https://arblib.org/history.html#version-2-20-0
+https://arblib.org/history.html
antonio-rojas commented 3 years ago

Changed dependencies from #32175 to #32175 #32567

mkoeppe commented 3 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-
+https://groups.google.com/g/sage-devel/c/VdIl7NvcJbQ/m/JVJ3E9WrAAAJ

 https://arblib.org/history.html
mkoeppe commented 3 years ago

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/1039613405 to none

slel commented 3 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,8 @@
-https://groups.google.com/g/sage-devel/c/VdIl7NvcJbQ/m/JVJ3E9WrAAAJ
+FLINT 2.8.1 and FLINT 2.8.2 announced:

-https://arblib.org/history.html
+- https://groups.google.com/g/sage-devel/c/VdIl7NvcJbQ/m/JVJ3E9WrAAAJ

+Arb release history:
+
+- https://arblib.org/history.html
+
dimpase commented 2 years ago
comment:14

Flint 2.8.3 is out, please update.

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -6,3 +6,4 @@

 - https://arblib.org/history.html

+Upgrading FLINT will require using unreleased changes in Singular
slel commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,6 +1,7 @@
-FLINT 2.8.1 and FLINT 2.8.2 announced:
+FLINT 2.8.1 and FLINT 2.8.2 announced, then FLINT 2.8.3:

-- https://groups.google.com/g/sage-devel/c/VdIl7NvcJbQ/m/JVJ3E9WrAAAJ
+- https://groups.google.com/g/sage-devel/c/VdIl7NvcJbQ
+- https://groups.google.com/g/sage-devel/c/YAXRi9r13b0

 Arb release history:
slel commented 2 years ago

Changed keywords from none to upgrade, arb, flint

slel commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,10 +1,13 @@
-FLINT 2.8.1 and FLINT 2.8.2 announced, then FLINT 2.8.3:
+FLINT 2.8.1 and FLINT 2.8.2 announced, then FLINT 2.8.3,
+then FLINT 2.8.4:

 - https://groups.google.com/g/sage-devel/c/VdIl7NvcJbQ
 - https://groups.google.com/g/sage-devel/c/YAXRi9r13b0
+- https://groups.google.com/g/sage-devel/c/8UX7uniBb5E

 Arb release history:

 - https://arblib.org/history.html

-Upgrading FLINT will require using unreleased changes in Singular
+Upgrading FLINT will require using unreleased changes
+in Singular.
kliem commented 2 years ago
comment:18

Replying to @mkoeppe:

After switching to the cmake build system:

Failure on ubuntu-trusty-standard (where Sage rejects system ntl), likely because FLINT accepts system NTL:

-- Detecting CXX compile features - done
-- Found GMP: /usr/include/x86_64-linux-gnu (Required is at least version "6.0.0") 
-- Found MPFR: /usr/include (Required is at least version "1.0.0") 
-- Found NTL: /usr/lib/libntl.so  
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Found CBLAS: /usr/include  
...
lib/libflint.so.16.1.0: undefined reference to `_ntl_gscompare(_ntl_gbigint_body*, long)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gmod(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gfree(_ntl_gbigint_body*)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gsetlength(_ntl_gbigint_body**, long)'
lib/libflint.so.16.1.0: undefined reference to `mpfr_rootn_ui'
lib/libflint.so.16.1.0: undefined reference to `NTL::TerminalError(char const*)'
collect2: error: ld returned 1 exit status
make[5]: *** [bin/test-t-umul_ppmm] Error 1

(ubuntu-trusty-minimal, i.e., without installation of system ntl, is OK)

Likewise ubuntu-xenial, debian-jessie, debian-stretch, etc.

According to CMake/FindNTL.cmake it accepts hints, namely by setting $ENV{NTLDIR}. It seems the same holds for the other packages.

kliem commented 2 years ago

New commits:

f31c754update flint to 2.8.4
8fc559fmerge u/mkoeppe/test_ticket__upgrade_flint_to_2_8_0
012db33provide hints to find GMP libaries and NTL
kliem commented 2 years ago

Changed commit from 9ea2e5c to 012db33

kliem commented 2 years ago

Changed branch from u/mkoeppe/test_ticket__upgrade_flint_to_2_8_0 to u/gh-kliem/flint_2_8_4

dimpase commented 2 years ago
comment:20

What are these "unreleased changes in Singular"?

dimpase commented 2 years ago
comment:21

Either these should be a Singular patch, or this should be removed in the ticket description.

kliem commented 2 years ago

Reviewer: https://github.com/kliem/sage/pull/49/checks

kliem commented 2 years ago
comment:22

Works locally for me, however I had to distclean.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 012db33 to 1e16b3b

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

1e16b3bpush minimal cmake version
dimpase commented 2 years ago
comment:24

Are we upgrading arb here, too?

mkoeppe commented 2 years ago
comment:25

Replying to @dimpase:

Either these should be a Singular patch, or this should be removed in the ticket description.

They have just tagged Release-4-2-1p2. "update for using FLINT 2.8.x" is a News item there, I don't know the details. We should probably do this update

mkoeppe commented 2 years ago
comment:26

I've opened #32907 for the Singular upgrade

kliem commented 2 years ago
comment:27

Looks like we need to push the minimal version of NTL required, I'm not sure what is needed here:

   [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `_ntl_gscompare(_ntl_gbigint_body*, long)'
  [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `_ntl_gmod(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)'
  [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `_ntl_gfree(_ntl_gbigint_body*)'
  [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `_ntl_gsetlength(_ntl_gbigint_body**, long)'
  [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `mpfr_rootn_ui'
  [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `NTL::TerminalError(char const*)'

And similar other failures.

Centos complains about:

   [flint-2.8.4]   make[5]: *** [CMakeFiles/fq_nmod_poly_factor-test-t-iterated_frobenius_preinv.dir/build.make:103: bin/fq_nmod_poly_factor-test-t-iterated_frobenius_preinv] Error 1
  [flint-2.8.4]   make[5]: Target 'CMakeFiles/fq_nmod_poly_factor-test-t-iterated_frobenius_preinv.dir/build' not remade because of errors.
  [flint-2.8.4]   make[4]: *** [CMakeFiles/Makefile2:63248: CMakeFiles/fq_nmod_poly_factor-test-t-iterated_frobenius_preinv.dir/all] Error 2
  [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `mpfr_rootn_ui'
  [flint-2.8.4]   collect2: error: ld returned 1 exit status
  [flint-2.8.4]   make[5]: *** [CMakeFiles/fq_poly-test-t-powmod_fmpz_binexp_preinv.dir/build.make:103: bin/fq_poly-test-t-powmod_fmpz_binexp_preinv] Error 1
  [flint-2.8.4]   make[5]: Target 'CMakeFiles/fq_poly-test-t-powmod_fmpz_binexp_preinv.dir/build' not remade because of errors.
  [flint-2.8.4]   make[4]: *** [CMakeFiles/Makefile2:63221: CMakeFiles/fq_poly-test-t-powmod_fmpz_binexp_preinv.dir/all] Error 2
  [flint-2.8.4]   lib/libflint.so.16.1.4: undefined reference to `mpfr_rootn_ui'

Apparently centos has an old version of mpfr.

kliem commented 2 years ago
comment:28

Replying to @kliem:

Replying to @mkoeppe:

After switching to the cmake build system:

Failure on ubuntu-trusty-standard (where Sage rejects system ntl), likely because FLINT accepts system NTL:

-- Detecting CXX compile features - done
-- Found GMP: /usr/include/x86_64-linux-gnu (Required is at least version "6.0.0") 
-- Found MPFR: /usr/include (Required is at least version "1.0.0") 
-- Found NTL: /usr/lib/libntl.so  
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Found CBLAS: /usr/include  
...
lib/libflint.so.16.1.0: undefined reference to `_ntl_gscompare(_ntl_gbigint_body*, long)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gmod(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gfree(_ntl_gbigint_body*)'
lib/libflint.so.16.1.0: undefined reference to `_ntl_gsetlength(_ntl_gbigint_body**, long)'
lib/libflint.so.16.1.0: undefined reference to `mpfr_rootn_ui'
lib/libflint.so.16.1.0: undefined reference to `NTL::TerminalError(char const*)'
collect2: error: ld returned 1 exit status
make[5]: *** [bin/test-t-umul_ppmm] Error 1

(ubuntu-trusty-minimal, i.e., without installation of system ntl, is OK)

Likewise ubuntu-xenial, debian-jessie, debian-stretch, etc.

According to CMake/FindNTL.cmake it accepts hints, namely by setting $ENV{NTLDIR}. It seems the same holds for the other packages.

Ok, I really don't know how this works with cmake.

E.g. with mpfr flint does:

find_path(MPFR_INCLUDE_DIRS NAMES mpfr.h PATHS $ENV{GMPDIR} $ENV{MPFRDIR} ${INCLUDE_INSTALL_DIR})    
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 1e16b3b to da45eb1

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

da45eb1use autotools instead of cmake
mkoeppe commented 2 years ago

Changed dependencies from #32175 #32567 to #32175 #32567, #32907

kliem commented 2 years ago
comment:31

Somehow make build after upgrading or downgrading flint doesn't work:

  File "sage/rings/polynomial/polynomial_element.pyx", line 67, in init sage.rings.polynomial.polynomial_element (build/cythonized/sage/rings/polynomial/polynomial_element.c:107015)
  File "/srv/public/kliem/sage/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/rings/polynomial/polynomial_ring.py", line 154, in <module>
    import sage.rings.polynomial.polynomial_element_generic as polynomial_element_generic
  File "/srv/public/kliem/sage/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/rings/polynomial/polynomial_element_generic.py", line 1556, in <module>
    from sage.rings.polynomial.polynomial_rational_flint import Polynomial_rational_flint
ImportError: libflint.so.16: cannot open shared object file: No such file or directory

Running make build-clean helped.

kiwifb commented 2 years ago
comment:34

Needs rebasing.

slel commented 2 years ago
comment:35

Take the opportunity to upgrade to Arb 2.22.1?

mkoeppe commented 2 years ago
comment:36

Yes, that's probably a good idea

mkoeppe commented 2 years ago

Changed branch from u/gh-kliem/flint_2_8_4 to u/mkoeppe/flint_2_8_4

mkoeppe commented 2 years ago

Changed branch from u/mkoeppe/flint_2_8_4 to u/gh-kliem/flint_2_8_4

mkoeppe commented 2 years ago

Changed reviewer from https://github.com/kliem/sage/pull/49/checks to none

mkoeppe commented 2 years ago

Changed branch from u/gh-kliem/flint_2_8_4 to u/mkoeppe/flint_2_8_4

mkoeppe commented 2 years ago

Changed commit from da45eb1 to 45f4984

mkoeppe commented 2 years ago

New commits:

b6c8b76update flint to 2.8.4
f9357e9build/pkgs/arb: Update to 2.22.1
45f4984build/pkgs/arb/patches/arb-flint-2.8-compatibility-b6c8032e2da1b19eb7c5a5f5c2f3372643e3d170.patch: Remove
mkoeppe commented 2 years ago

Changed dependencies from #32175 #32567, #32907 to none