[sagemath] 01/01: Make Sage able to detect Debian's GSL CBLAS, and add some notes about the latest errors
Ximin Luo
infinity0 at debian.org
Wed Jul 6 23:24:58 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 ccd10d2af59cfa5ecc29cf091e593c5dc17a861e
Author: Ximin Luo <infinity0 at debian.org>
Date: Thu Jul 7 01:24:35 2016 +0200
Make Sage able to detect Debian's GSL CBLAS, and add some notes about the latest errors
---
debian/README.Debian | 58 ++++++++++++++++++++++++++++++++++----
debian/patches/series | 1 +
debian/patches/use-gsl-cblas.patch | 47 ++++++++++++++++++++++++++++++
3 files changed, 101 insertions(+), 5 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index add9371..dd4156d 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -3,19 +3,67 @@
See https://wiki.debian.org/DebianScience/Sage
for instructions on using this repository.
-## TODO
+## TODO (required for the build to work)
-1. patch lrcalc:
+1. Patch lrcalc:
schublib.h, symfcn.h need to #include "hashtab.h" (etc) instead of <hashtab.h>
-2. patch flint-arb:
+2. Patch flint-arb:
see https://github.com/fredrik-johansson/arb/pull/55
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)
+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. package all the stuff not yet available in Debian
+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...
+
+## TODO (required to get into Debian archives)
+
+1. package all the stuff not yet available in Debian
i.e. for which pruner.py says "X will not come from debian!"
+
+2. other stuff on wiki page https://wiki.debian.org/DebianScience/Sage
diff --git a/debian/patches/series b/debian/patches/series
index 4442701..8684980 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ pari.patch
nauty-bin-rename.patch
planarity-update.patch
python_installs_in_userdir.patch
+use-gsl-cblas.patch
diff --git a/debian/patches/use-gsl-cblas.patch b/debian/patches/use-gsl-cblas.patch
new file mode 100644
index 0000000..89f849a
--- /dev/null
+++ b/debian/patches/use-gsl-cblas.patch
@@ -0,0 +1,47 @@
+Description: Hard-code GSL CBLAS paths
+ Debian does not provide a pkg-config file for libgslcblas,
+ so just hard-code the paths here for Sage
+Author: Ximin Luo <infinity0 at debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/module_list.py
++++ b/sage/src/module_list.py
+@@ -12,10 +12,9 @@
+ import pkgconfig
+
+ # CBLAS can be one of multiple implementations
+-cblas_pc = pkgconfig.parse('cblas')
+-cblas_libs = list(cblas_pc['libraries'])
+-cblas_library_dirs = list(cblas_pc['library_dirs'])
+-cblas_include_dirs = list(cblas_pc['include_dirs'])
++cblas_libs = [u'gslcblas', u'm']
++cblas_library_dirs = []
++cblas_include_dirs = []
+
+ # TODO: Remove Cygwin hack by installing a suitable cblas.pc
+ if os.path.exists('/usr/lib/libblas.dll.a'):
+--- a/sage/src/sage/misc/cython.py
++++ b/sage/src/sage/misc/cython.py
+@@ -26,17 +26,16 @@
+
+
+ # CBLAS can be one of multiple implementations
+-cblas_pc = pkgconfig.parse('cblas')
+-cblas_libs = list(cblas_pc['libraries'])
+-cblas_library_dirs = list(cblas_pc['library_dirs'])
+-cblas_include_dirs = list(cblas_pc['include_dirs'])
++cblas_libs = [u'gslcblas', u'm']
++cblas_library_dirs = []
++cblas_include_dirs = []
+
+ # TODO: Remove Cygwin hack by installing a suitable cblas.pc
+ if os.path.exists('/usr/lib/libblas.dll.a'):
+ cblas_libs = 'gslcblas'
+
+ standard_libs = [
+- 'mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm',
++ 'mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm',
+ 'ec', 'gsl',
+ ] + cblas_libs + [
+ 'ntl']
--
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