cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

sci-mathematics/sage-data-conway_polynomials-0.4-r1 does not download #309

Closed rongcuid closed 10 years ago

rongcuid commented 10 years ago

When I install sage, this package gives the following error:

Downloading 'http://wstein.org/home/ohanar/spkgs/conway_polynomials-0.4.spkg' --2014-07-03 22:14:48-- http://wstein.org/home/ohanar/spkgs/conway_polynomials-0.4.spkg Resolving wstein.org... 128.208.160.197 Connecting to wstein.org|128.208.160.197|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2014-07-03 22:14:48 ERROR 404: Not Found.

!!! Couldn't download 'sage-data-conway_polynomials-0.4.tar.bz2'. Aborting.

It seems that the file is moved or does not exist?

kiwifb commented 10 years ago

Updating the ebuild to get closer to upstream. Hopefully it won't be long.

kiwifb commented 10 years ago

Done, as I said in the commit it is fairly hackish but it works, try it.

rongcuid commented 10 years ago

OK, though sage crashes, it emerged.

kiwifb commented 10 years ago

Crashes? Do you have a log?

rongcuid commented 10 years ago

IPython post-mortem report

{'codename': 'An Afternoon Hack', 'commit_hash': '9c4f59d', 'commit_source': 'installation', 'default_encoding': 'UTF-8', 'ipython_path': '/usr/lib64/python2.7/site-packages/IPython', 'ipython_version': '1.2.1', 'os_name': 'posix', 'platform': 'Linux-3.12.21-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-3520MCPU@_2.90GHz-with-gentoo-2.2.0', 'sys_executable': '/usr/bin/python2.7', 'sys_platform': 'linux2', 'sys_version': '2.7.7 (default, Jun 2 2014, 19:46:43) \n[GCC 4.8.2]'}



Crash traceback:


ImportError Python 2.7.7: /usr/bin/python2.7 Fri Jul 4 15:38:37 2014 A problem occured executing Python code. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call last. /usr/lib/python-exec/python2.7/sage-ipython in () 1 #!/usr/bin/env python2.7 2 # -- coding: utf-8 -- 3 """ 4 Sage IPython startup script. 5 """ 6 from sage.repl.interpreter import SageTerminalApp 7 8 # installs the extra readline commands before the IPython initialization begins. 9 from sage.repl.readline_extra_commands import * 10 11 app = SageTerminalApp.instance() ---> 12 app.initialize() global app.initialize = <bound method SageTerminalApp.initialize of <sage.repl.interpreter.SageTerminalApp object at 0x7f477c25da50>> 13 app.start()

/usr/lib64/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=, argv=None)

/usr/lib64/python2.7/site-packages/IPython/config/application.pyc in catch_config_error(method=, app=, _args=(None,), _kwargs={}) 74 75 #----------------------------------------------------------------------------- 76 # Application class 77 #----------------------------------------------------------------------------- 78 79 @decorator 80 def catch_config_error(method, app, _args, _kwargs): 81 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init. 82 83 On a TraitError (generally caused by bad config), this will print the trait's 84 message, and exit the app. 85
86 For use on init methods, to prevent invoking excepthook on invalid input. 87 """ 88 try: ---> 89 return method(app, _args, *_kwargs) method = <function initialize at 0x7f477c24d9b0> app = <sage.repl.interpreter.SageTerminalApp object at 0x7f477c25da50> args = (None,) kwargs = {} 90 except (TraitError, ArgumentError) as e: 91 app.print_help() 92 app.log.fatal("Bad config encountered during initialization:") 93 app.log.fatal(str(e)) 94 app.log.debug("Config at the time: %s", app.config) 95 app.exit(1) 96 97 98 class ApplicationError(Exception): 99 pass 100 101 class LevelFormatter(logging.Formatter): 102 """Formatter with additional highlevel record 103
104 This field is empty if log level is less than highlevel_limit,

/usr/lib64/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=, argv=None) 308
309 @catch_config_error 310 def initialize(self, argv=None): 311 """Do actions after construct, but before starting the app.""" 312 super(TerminalIPythonApp, self).initialize(argv) 313 if self.subapp is not None: 314 # don't bother initializing further, starting subapp 315 return 316 if not self.ignore_old_config: 317 check_for_old_config(self.ipython_dir) 318 # print self.extra_args 319 if self.extra_args and not self.something_to_run: 320 self.file_to_run = self.extra_args[0] 321 self.init_path() 322 # create the shell --> 323 self.init_shell() self.init_shell = <bound method SageTerminalApp.init_shell of <sage.repl.interpreter.SageTerminalApp object at 0x7f477c25da50>> 324 # and draw the banner 325 self.init_banner() 326 # Now a variety of things that happen after the banner is printed. 327 self.init_gui_pylab() 328 self.init_extensions() 329 self.init_code() 330 331 def init_shell(self): 332 """initialize the InteractiveShell instance""" 333 # Create an InteractiveShell instance. 334 # shell.display_banner should always be False for the terminal 335 # based app, because we call shell.show_banner() by hand below 336 # so the banner shows before all extension loading stuff. 337 self.shell = TerminalInteractiveShell.instance(parent=self, 338 display_banner=False, profile_dir=self.profile_dir,

/usr/lib64/python2.7/site-packages/sage/repl/interpreter.pyc in init_shell(self=) 520 sage: app.shell 521 <sage.repl.interpreter.SageInteractiveShell object at 0x...> 522 """ 523 # Shell initialization 524 self.shell = SageInteractiveShell.instance(config=self.config, 525 display_banner=False, profile_dir=self.profile_dir, 526 ipython_dir=self.ipython_dir) 527 self.shell.configurables.append(self) 528 self.shell.has_sage_extensions = SAGE_EXTENSION in self.extensions 529 530 if self.shell.has_sage_extensions: 531 self.extensions.remove(SAGE_EXTENSION) 532 533 # load sage extension here to get a crash if 534 # something is wrong with the sage library --> 535 self.shell.extension_manager.load_extension(SAGE_EXTENSION) self.shell.extension_manager.load_extension = <bound method ExtensionManager.load_extension of <IPython.core.extensions.ExtensionManager object at 0x7f477c25dc90>> global SAGE_EXTENSION = 'sage'

/usr/lib64/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self=, module_str='sage') 85 86 Returns the string "already loaded" if the extension is already loaded, 87 "no load function" if the module doesn't have a load_ipython_extension 88 function, or None if it succeeded. 89 """ 90 if module_str in self.loaded: 91 return "already loaded" 92
93 from IPython.utils.syspathcontext import prepended_to_syspath 94
95 with self.shell.builtin_trap: 96 if module_str not in sys.modules: 97 with prepended_to_syspath(self.ipython_extension_dir): 98 import(module_str) 99 mod = sys.modules[module_str] --> 100 if self._call_load_ipython_extension(mod): self._call_load_ipython_extension = <bound method ExtensionManager._call_load_ipython_extension of <IPython.core.extensions.ExtensionManager object at 0x7f477c25dc90>> mod = <module 'sage' from '/usr/lib64/python2.7/site-packages/sage/init.pyc'> 101 self.loaded.add(module_str) 102 else: 103 return "no load function" 104 105 def unload_extension(self, module_str): 106 """Unload an IPython extension by its module name. 107 108 This function looks up the extension's name in sys.modules and 109 simply calls mod.unload_ipython_extension(self). 110
111 Returns the string "no unload function" if the extension doesn't define 112 a function to unload itself, "not loaded" if the extension isn't loaded, 113 otherwise None. 114 """ 115 if module_str not in self.loaded:

/usr/lib64/python2.7/site-packages/IPython/core/extensions.pyc in _call_load_ipython_extension(self=, mod=<module 'sage' from '/usr/lib64/python2.7/site-packages/sage/init.pyc'>) 132 """ 133 from IPython.utils.syspathcontext import prepended_to_syspath 134 135 if (module_str in self.loaded) and (module_str in sys.modules): 136 self.unload_extension(module_str) 137 mod = sys.modules[module_str] 138 with prepended_to_syspath(self.ipython_extension_dir): 139 reload(mod) 140 if self._call_load_ipython_extension(mod): 141 self.loaded.add(module_str) 142 else: 143 self.load_extension(module_str) 144 145 def _call_load_ipython_extension(self, mod): 146 if hasattr(mod, 'load_ipython_extension'): --> 147 mod.load_ipython_extension(self.shell) mod.load_ipython_extension = <function load_ipython_extension at 0x7f477c2620c8> self.shell = <sage.repl.interpreter.SageInteractiveShell object at 0x7f477bfd7810> 148 return True 149 150 def _call_unload_ipython_extension(self, mod): 151 if hasattr(mod, 'unload_ipython_extension'): 152 mod.unload_ipython_extension(self.shell) 153 return True 154
155 def install_extension(self, url, filename=None): 156 """Download and install an IPython extension. 157
158 If filename is given, the file will be so named (inside the extension 159 directory). Otherwise, the name from the URL will be used. The file must 160 have a .py or .zip extension; otherwise, a ValueError will be raised. 161
162 Returns the full path to the installed file.

/usr/lib64/python2.7/site-packages/sage/repl/ipython_extension.pyc in wrapper(_args=(,), _kwargs={}) 396 ....: if work: 397 ....: return 'foo worked' 398 ....: raise RuntimeError("foo didn't work") 399 sage: foo(False) 400 Traceback (most recent call last): 401 ... 402 RuntimeError: foo didn't work 403 sage: foo(True) 404 'foo worked' 405 sage: foo(False) 406 sage: foo(True) 407 """ 408 @wraps(func) 409 def wrapper(_args, _kwargs): 410 if not wrapper.has_run: --> 411 result = func(_args, *_kwargs) result = undefined global func = undefined args = (<sage.repl.interpreter.SageInteractiveShell object at 0x7f477bfd7810>,) kwargs = {} 412 wrapper.has_run = True 413 return result 414 wrapper.has_run = False 415 return wrapper 416 417 418 @run_once 419 def load_ipython_extension(ip): 420 """ 421 Load the extension in IPython. 422 """ 423 # this modifies ip 424 SageCustomizations(shell=ip)

/usr/lib64/python2.7/site-packages/sage/repl/ipython_extension.pyc in load_ipython_extension(ip=) 409 def wrapper(_args, _kwargs): 410 if not wrapper.has_run: 411 result = func(_args, _kwargs) 412 wrapper.has_run = True 413 return result 414 wrapper.has_run = False 415 return wrapper 416 417 418 @run_once 419 def load_ipython_extension(ip): 420 """ 421 Load the extension in IPython. 422 """ 423 # this modifies ip --> 424 SageCustomizations(shell=ip) global SageCustomizations = <class 'sage.repl.ipython_extension.SageCustomizations'> global shell = undefined ip = <sage.repl.interpreter.SageInteractiveShell object at 0x7f477bfd7810>

/usr/lib64/python2.7/site-packages/sage/repl/ipython_extension.pyc in init(self=, shell=) 280 self.shell.register_magics(self.auto_magics) 281 282 import sage.misc.displayhook as displayhook 283 self.shell.display_formatter.formatters['text/plain'] = ( 284 displayhook.SagePlainTextFormatter(config=shell.config)) 285 286 import sage.misc.edit_module as edit_module 287 self.shell.set_hook('editor', edit_module.edit_devel) 288 289 self.init_inspector() 290 self.init_line_transforms() 291 292 import inputhook 293 inputhook.install() 294 --> 295 import sage.all # until sage's import hell is fixed sage.all = undefined 296 297 self.shell.verbose_quit = True 298 self.set_quit_hook() 299 300 self.register_interface_magics() 301 302 if SAGE_IMPORTALL == 'yes': 303 self.init_environment() 304 305 306 def register_interface_magics(self): 307 """ 308 Register magics for each of the Sage interfaces 309 """ 310 from sage.misc.superseded import deprecation

/usr/lib64/python2.7/site-packages/sage/all.py in () 84 from sage.ext.c_lib import AlarmInterrupt, SignalError 85 86 import sage.misc.lazy_import 87 from sage.misc.all import * # takes a while 88 from sage.repl.all import 89 90 from sage.misc.sh import sh 91 92 from sage.libs.all import 93 from sage.doctest.all import 94 try: 95 from sage.dev.all import 96 except ImportError: 97 pass # dev scripts are disabled 98 ---> 99 from sage.rings.all import global sage.rings.all = undefined 100 from sage.matrix.all import 101 102 # This must come before Calculus -- it initializes the Pynac library. 103 import sage.symbolic.pynac 104 105 from sage.modules.all import 106 from sage.monoids.all import 107 from sage.algebras.all import 108 from sage.modular.all import 109 from sage.schemes.all import 110 from sage.graphs.all import 111 from sage.groups.all import 112 from sage.databases.all import 113 from sage.structure.all import 114 from sage.categories.all import

/usr/lib64/python2.7/site-packages/sage/rings/all.py in () 50 # Rational integers. 51 from integer_ring import IntegerRing, ZZ, crt_basis 52 from integer import Integer 53 54 # Rational numbers 55 from rational_field import RationalField, QQ 56 from rational import Rational 57 Rationals = RationalField 58 59 # Integers modulo n. 60 from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod 61 from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod 62 Integers = IntegerModRing 63 64 # Finite fields ---> 65 from finite_rings.all import global finite_rings.all = undefined 66 67 # Number field 68 from number_field.all import 69 70 # Function field 71 from function_field.all import 72 73 # p-adic field 74 from padics.all import 75 from padics.padic_printing import _printer_defaults as padic_printing 76 77 # Semirings 78 from semirings.all import * 79 80 # Real numbers

/usr/lib64/python2.7/site-packages/sage/rings/finite_rings/all.py in () 6 # Copyright (C) 2010 David Roe roed@math.harvard.edu 7 # William Stein wstein@gmail.com 8 # 9 # Distributed under the terms of the GNU General Public License (GPL) 10 # 11 # This code is distributed in the hope that it will be useful, 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 # General Public License for more details. 15 # 16 # The full text of the GPL is available at: 17 # 18 # http://www.gnu.org/licenses/ 19 #***** 20 ---> 21 from constructor import FiniteField, is_FiniteField, is_PrimeFiniteField global constructor = undefined global FiniteField = undefined global is_FiniteField = undefined global is_PrimeFiniteField = undefined 22 from conway_polynomials import conway_polynomial, exists_conway_polynomial 23 GF = FiniteField 24 25 from element_base import FinitePolyExtElement as FiniteFieldElement # for backward compatibility; is this needed? 26 from element_base import is_FiniteFieldElement 27

/usr/lib64/python2.7/site-packages/sage/rings/finite_rings/constructor.py in () 147 # General Public License for more details. 148 # 149 # The full text of the GPL is available at: 150 # 151 # http://www.gnu.org/licenses/ 152 #***** 153 154 import random 155 156 from sage.rings.finite_rings.finite_field_base import is_FiniteField 157 from sage.structure.parent_gens import normalize_names 158 159 import sage.rings.arith as arith 160 import sage.rings.integer as integer 161 --> 162 import sage.rings.polynomial.polynomial_element as polynomial_element global sage.rings.polynomial.polynomial_element = undefined global polynomial_element = undefined 163 import sage.rings.polynomial.multi_polynomial_element as multi_polynomial_element 164 165 # We don't late import this because this means trouble with the Givaro library 166 # On a Macbook Pro OSX 10.5.8, this manifests as a Bus Error on exiting Sage. 167 # TODO: figure out why 168 from finite_field_givaro import FiniteField_givaro 169 170 import sage.interfaces.gap 171 172 from sage.structure.factory import UniqueFactory 173 174 class FiniteFieldFactory(UniqueFactory): 175 """ 176 Return the globally unique finite field of given order with 177 generator labeled by the given name and possibly with given

/home/carl/polynomial_element.pyx in init sage.rings.polynomial.polynomial_element (sage/rings/polynomial/polynomial_element.c:57362)()

/usr/lib64/python2.7/site-packages/sage/rings/polynomial/polynomial_ring.py in () 154 # Distributed under the terms of the GNU General Public License (GPL) 155 # 156 # http://www.gnu.org/licenses/ 157 #***** 158 159 from sage.structure.element import Element 160 from sage.structure.category_object import check_default_category 161 import sage.algebras.algebra 162 import sage.categories.basic as categories 163 import sage.rings.commutative_ring as commutative_ring 164 import sage.rings.commutative_algebra as commutative_algebra 165 import sage.rings.ring as ring 166 import sage.rings.ring_element as ring_element 167 import sage.rings.integral_domain as integral_domain 168 import sage.rings.principal_ideal_domain as principal_ideal_domain --> 169 import sage.rings.polynomial.polynomial_element_generic as polynomial_element_generic global sage.rings.polynomial.polynomial_element_generic = undefined global polynomial_element_generic = undefined 170 import sage.rings.rational_field as rational_field 171 from sage.rings.integer_ring import is_IntegerRing, IntegerRing 172 from sage.rings.integer import Integer 173 from sage.libs.pari.all import pari_gen 174 from sage.rings.polynomial.polynomial_ring_constructor import polynomial_default_category 175 176 import sage.misc.latex as latex 177 from sage.misc.prandom import randint 178 from sage.misc.cachefunc import cached_method 179 180 from sage.rings.real_mpfr import is_RealField 181 from polynomial_real_mpfr_dense import PolynomialRealDense 182 from sage.rings.polynomial.polynomial_singular_interface import PolynomialRing_singular_repr 183 from sage.rings.fraction_field_element import FractionFieldElement 184 from sage.rings.finite_rings.element_base import FiniteRingElement

/usr/lib64/python2.7/site-packages/sage/rings/polynomial/polynomial_element_generic.py in () 725 True 726 """ 727 def init(self, parent, x=None, check=True, is_gen = False, construct=False): 728 Polynomial_generic_sparse.init(self, parent, x, check, is_gen) 729 730 731 class Polynomial_generic_dense_field(Polynomial_generic_dense, Polynomial_generic_field): 732 def init(self, parent, x=None, check=True, is_gen = False, construct=False): 733 Polynomial_generic_dense.init(self, parent, x, check, is_gen) 734 735 ############################################################################ 736 # XXX: Ensures that the generic polynomials implemented in SAGE via PARI # 737 # until at least until 4.5.0 unpickle correctly as polynomials implemented # 738 # via FLINT. # 739 from sage.structure.sage_object import register_unpickle_override --> 740 from sage.rings.polynomial.polynomial_rational_flint import Polynomial_rational_flint global sage.rings.polynomial.polynomial_rational_flint = undefined global Polynomial_rational_flint = undefined 741 742 register_unpickle_override( \ 743 'sage.rings.polynomial.polynomial_element_generic', \ 744 'Polynomial_rational_dense', Polynomial_rational_flint)

/home/carl/polynomial_integer_dense_flint.pxd in init sage.rings.polynomial.polynomial_rational_flint (sage/rings/polynomial/polynomial_rational_flint.cpp:15624)()

ImportError: /usr/lib64/python2.7/site-packages/sage/rings/polynomial/polynomial_integer_dense_flint.so: undefined symbol: fmpz_set_ZZ


History of session input: *\ Last line of input (may not be in above history):

kiwifb commented 10 years ago

Looks to me like flint and then sage didn't install properly. What does

eix flint

says and

ldd -r /usr/lib64/python2.7/site-packages/sage/rings/polynomial/polynomial_integer_dense_flint.so
rongcuid commented 10 years ago

[I] sci-mathematics/flint Available versions: (~)1.6^m12.3^m (~)2.3-r2^m12.4.3^m (~)2.4.4^m{tbz2} {doc gc ntl -static static-libs test} Installed versions: 2.4.4^m{tbz2}(23:11:30 2014-07-03)(-doc -gc -ntl -static-libs -test) Homepage: http://www.flintlib.org/ Description: Fast Library for Number Theory

ldd -r /usr/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_integer_dense_flint.so linux-vdso.so.1 (0x00007fffc6d57000) libcsage.so => /usr/lib64/libcsage.so (0x00007fe6b82f0000) libflint.so => /usr/lib64/libflint.so (0x00007fe6b7f46000) libntl-6.1.0.so => /usr/lib64/libntl-6.1.0.so (0x00007fe6b7b7f000) libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007fe6b7908000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6 (0x00007fe6b7600000) libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007fe6b723b000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/libgcc_s.so.1 (0x00007fe6b7024000) libc.so.6 => /lib64/libc.so.6 (0x00007fe6b6c7c000) libpari-gmp.so.3 => /usr/lib64/libpari-gmp.so.3 (0x00007fe6b660e000) libmpfr.so.4 => /usr/lib64/libmpfr.so.4 (0x00007fe6b63b2000) libm.so.6 => /lib64/libm.so.6 (0x00007fe6b60b0000) /lib64/ld-linux-x86-64.so.2 (0x00007fe6b877c000) libgf2x.so.1 => /usr/lib64/libgf2x.so.1 (0x00007fe6b5e99000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe6b5c7b000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fe6b5a77000) libutil.so.1 => /lib64/libutil.so.1 (0x00007fe6b5873000) undefined symbol: fmpz_set_ZZ (/usr/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_integer_dense_flint.so) undefined symbol: fmpz_poly_get_ZZX (/usr/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_integer_dense_flint.so) undefined symbol: fmpz_poly_set_ZZX (/usr/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_integer_dense_flint.so)

kiwifb commented 10 years ago

You need to re-install flint with USE=ntl. If you still have undefined symbols re-emerge sage as well.

rongcuid commented 10 years ago

Fixed! So maybe some ebuild should be updated to depend on this USE?

kiwifb commented 10 years ago

Yes it needs doing. On the other hands if you were using our package.use file it would have been picked up automatically. Closing.