[sagemath] 01/02: Fix Sage not to use private MPFI functions, update python-userdir patch
Ximin Luo
infinity0 at debian.org
Thu Jul 7 12:35:09 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository sagemath.
commit 53e81977cc9dc603d30a1d52283bebe03565fbe4
Author: Ximin Luo <infinity0 at debian.org>
Date: Thu Jul 7 14:12:43 2016 +0200
Fix Sage not to use private MPFI functions, update python-userdir patch
---
debian/README.Debian | 44 +-------------
debian/patches/mpfi-fix-api.patch | 77 +++++++++++++++++++++++++
debian/patches/python_installs_in_userdir.patch | 10 ++++
debian/patches/series | 3 +-
4 files changed, 91 insertions(+), 43 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index dd4156d..233eb93 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -17,48 +17,8 @@ also need sage to -lflint-arb instead of -larb (or perhaps Debian needs to
install it as libarb.so; check upstream to see what they prefer). as a temp
workaround you can `ln -s libflint-arb.so /usr/lib/libarb.so`.
-3. Figure out this error:
-
-Sage compiles, but doesn't run (and fails the docbuild part of the overall build):
-
-$ debian/rules clean prune build
-[..]
-cd ../.. && sage-logger './sage --docbuild --no-pdf-links all html ' logs/dochtml.log
-Traceback (most recent call last):
- File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
- mod_name, _Error)
- File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details
- __import__(mod_name) # Do not catch exceptions initializing package
- File "/home/anonymous/.sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 22, in <module>
- import sage.all
- File "/home/anonymous/.sage/local/lib/python2.7/site-packages/sage/all.py", line 79, in <module>
- from sage.rings.all import *
- File "/home/anonymous/.sage/local/lib/python2.7/site-packages/sage/rings/all.py", line 50, in <module>
- from finite_rings.all import *
- File "/home/anonymous/.sage/local/lib/python2.7/site-packages/sage/rings/finite_rings/all.py", line 21, in <module>
- from finite_field_constructor import FiniteField
- File "/home/anonymous/.sage/local/lib/python2.7/site-packages/sage/rings/finite_rings/finite_field_constructor.py", line 176, in <module>
- import sage.rings.polynomial.polynomial_element as polynomial_element
- File "sage/rings/polynomial/polynomial_element.pyx", line 53, in init sage.rings.polynomial.polynomial_element (/home/anonymous/tmp/sage/sagemath/sage/src/build/cythonized/sage/rings/polynomial/polynomial_element.c:78933)
- File "/home/anonymous/.sage/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring.py", line 148, in <module>
- import sage.rings.polynomial.polynomial_element_generic as polynomial_element_generic
- File "/home/anonymous/.sage/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element_generic.py", line 1057, in <module>
- from sage.rings.polynomial.polynomial_rational_flint import Polynomial_rational_flint
- File "sage/rings/polynomial/polynomial_integer_dense_flint.pxd", line 7, in init sage.rings.polynomial.polynomial_rational_flint (/home/anonymous/tmp/sage/sagemath/sage/src/build/cythonized/sage/rings/polynomial/polynomial_rational_flint.cpp:21576)
- File "sage/rings/real_mpfi.pxd", line 11, in init sage.rings.polynomial.polynomial_integer_dense_flint (/home/anonymous/tmp/sage/sagemath/sage/src/build/cythonized/sage/rings/polynomial/polynomial_integer_dense_flint.cpp:19473)
-ImportError: /home/anonymous/.sage/local/lib/python2.7/site-packages/sage/rings/real_mpfi.so: undefined symbol: mpfi_is_strictly_neg_default
-Makefile:818: recipe for target 'doc-html' failed
-make[4]: *** [doc-html] Error 1
-make[4]: Leaving directory '/home/anonymous/tmp/sage/sagemath/sage/build/make'
-Makefile:642: recipe for target 'all' failed
-make[3]: *** [all] Error 2
-make[3]: Leaving directory '/home/anonymous/tmp/sage/sagemath/sage/build/make'
-[..]
-Error building Sage.
-[..]
-
-I checked, this symbol apparently is not in /usr/lib/x86_64-linux-gnu/libmpfi.so
-but Sage aren't patching their mpfi either...
+3. Post-compilation docbuild segfaults due to bad LD paths;
+figure out how to fix this
## TODO (required to get into Debian archives)
diff --git a/debian/patches/mpfi-fix-api.patch b/debian/patches/mpfi-fix-api.patch
new file mode 100644
index 0000000..e477b5f
--- /dev/null
+++ b/debian/patches/mpfi-fix-api.patch
@@ -0,0 +1,77 @@
+Description: Remove private MPFI functions
+ Don't try to link against private MPFI functions. MPFI upstream very clearly
+ mark these as private in src/mpfi-impl.h, and Sage should not be attempting
+ to link to or use them in its Cython modules.
+Author: Ximin Luo <infinity0 at debian.org>
+Bug: TBD
+Forwarded: TBD
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/sage/libs/mpfi.pxd
++++ b/sage/src/sage/libs/mpfi.pxd
+@@ -193,24 +193,6 @@
+ bint (*mpfi_is_strictly_pos) (mpfi_srcptr)
+ bint (*mpfi_is_strictly_neg) (mpfi_srcptr)
+
+- # default comparison functions
+- bint mpfi_is_pos_default(mpfi_srcptr)
+- bint mpfi_is_nonneg_default(mpfi_srcptr)
+- bint mpfi_is_neg_default(mpfi_srcptr)
+- bint mpfi_is_nonpos_default(mpfi_srcptr)
+- bint mpfi_is_zero_default(mpfi_srcptr)
+- bint mpfi_is_strictly_neg_default(mpfi_srcptr a)
+- bint mpfi_is_strictly_pos_default(mpfi_srcptr a)
+-
+- int mpfi_cmp_default(mpfi_srcptr, mpfi_srcptr)
+- int mpfi_cmp_d_default(mpfi_srcptr, double)
+- int mpfi_cmp_ui_default(mpfi_srcptr, unsigned long)
+- int mpfi_cmp_si_default(mpfi_srcptr, long)
+- int mpfi_cmp_z_default(mpfi_srcptr, mpz_srcptr)
+- int mpfi_cmp_q_default(mpfi_srcptr, mpq_srcptr)
+- int mpfi_cmp_fr_default(mpfi_srcptr, mpfr_srcptr)
+-
+-
+ bint mpfi_has_zero(mpfi_srcptr)
+
+ bint mpfi_nan_p(mpfi_srcptr)
+--- a/sage/src/sage/rings/real_mpfi.pyx
++++ b/sage/src/sage/rings/real_mpfi.pyx
+@@ -3136,9 +3136,9 @@
+ elif field.rnd == MPFR_RNDU:
+ mpfi_get_right(x.value, self.value)
+ elif field.rnd == MPFR_RNDZ:
+- if mpfi_is_strictly_pos_default(self.value): # interval is > 0
++ if mpfi_is_strictly_pos(self.value): # interval is > 0
+ mpfi_get_left(x.value, self.value)
+- elif mpfi_is_strictly_neg_default(self.value): # interval is < 0
++ elif mpfi_is_strictly_neg(self.value): # interval is < 0
+ mpfi_get_right(x.value, self.value)
+ else:
+ mpfr_set_zero(x.value, 1) # interval contains 0
+@@ -3195,13 +3195,13 @@
+ r"""
+ The argument of this interval, if it is well-defined, in the
+ complex sense. Otherwise raises a ``ValueError``.
+-
++
+ OUTPUT:
+-
++
+ - an element of the parent of this interval (0 or pi)
+-
++
+ EXAMPLES::
+-
++
+ sage: RIF(1).argument()
+ 0
+ sage: RIF(-1).argument()
+@@ -3229,7 +3229,7 @@
+ return k.pi()
+ else:
+ raise ValueError("Can't take the argument of interval strictly containing zero")
+-
++
+ def unique_floor(self):
+ """
+ Returns the unique floor of this interval, if it is well defined,
diff --git a/debian/patches/python_installs_in_userdir.patch b/debian/patches/python_installs_in_userdir.patch
index ae785a8..200c019 100644
--- a/debian/patches/python_installs_in_userdir.patch
+++ b/debian/patches/python_installs_in_userdir.patch
@@ -103,3 +103,13 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
class SageKernelSpec(object):
+--- a/sage/sage
++++ b/sage/sage
+@@ -22,6 +22,7 @@
+ # automatically.
+ #SAGE_ROOT=/path/to/sage-version
+
++export PATH="$PATH:$HOME/.sage/local/bin"
+
+
+ # Resolve all symbolic links in a filename. This more or less behaves
diff --git a/debian/patches/series b/debian/patches/series
index 8684980..27141da 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,5 +10,6 @@ rubiks_executables_renames.patch
pari.patch
nauty-bin-rename.patch
planarity-update.patch
-python_installs_in_userdir.patch
use-gsl-cblas.patch
+mpfi-fix-api.patch
+python_installs_in_userdir.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list