Closed rongcuid closed 10 years ago
Updating the ebuild to get closer to upstream. Hopefully it won't be long.
Done, as I said in the commit it is fairly hackish but it works, try it.
OK, though sage crashes, it emerged.
Crashes? Do you have a log?
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
/usr/lib64/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=
/usr/lib64/python2.7/site-packages/IPython/config/application.pyc in catch_config_error(method=
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=
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=
/usr/lib64/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self=
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=
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=(
/usr/lib64/python2.7/site-packages/sage/repl/ipython_extension.pyc in load_ipython_extension(ip=
/usr/lib64/python2.7/site-packages/sage/repl/ipython_extension.pyc in init(self=
/usr/lib64/python2.7/site-packages/sage/all.py in
/usr/lib64/python2.7/site-packages/sage/rings/all.py in
/usr/lib64/python2.7/site-packages/sage/rings/finite_rings/all.py in
/usr/lib64/python2.7/site-packages/sage/rings/finite_rings/constructor.py in
/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
/usr/lib64/python2.7/site-packages/sage/rings/polynomial/polynomial_element_generic.py in
/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):
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
[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)
You need to re-install flint with USE=ntl. If you still have undefined symbols re-emerge sage as well.
Fixed! So maybe some ebuild should be updated to depend on this USE?
Yes it needs doing. On the other hands if you were using our package.use file it would have been picked up automatically. Closing.
When I install sage, this package gives the following error:
It seems that the file is moved or does not exist?