#16105: Sage crashes on start: libntl.so.2 not find
------------------------------+--------------------------
Reporter: darij | Owner:
Type: defect | Status: needs_work
Priority: blocker | Milestone: sage-6.2
Component: build | Resolution:
Keywords: ntl, crash | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------+--------------------------
Description changed by jdemeyer:
Old description:
> Sorry for the laziest bugreport since my last one, but this is what I'm
> getting since I've updated to 6.2.beta7 and I have no idea what it comes
> from.
>
> {{{
> ***************************************************************************
>
> IPython post-mortem report
>
> {'codename': 'An Afternoon Hack',
> 'commit_hash': '9db8c5c',
> 'commit_source': 'installation',
> 'default_encoding': 'UTF-8',
> 'ipython_path': '/home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/IPython',
> 'ipython_version': '1.2.1',
> 'os_name': 'posix',
> 'platform': 'Linux-3.2.0-60-generic-i686-with-debian-wheezy-sid',
> 'sys_executable': '/home/darij/gitsage6.2/local/bin/python',
> 'sys_platform': 'linux2',
> 'sys_version': '2.7.5 (default, Mar 23 2014, 16:40:35) \n[GCC 4.6.3]'}
>
> ***************************************************************************
>
>
> ***************************************************************************
>
> Crash traceback:
>
> ---------------------------------------------------------------------------
> ImportError Python 2.7.5:
> /home/darij/gitsage6.2/local/bin/python
> Tue Apr 8 22:39:26
> 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.
> /home/darij/gitsage6.2/src/bin/sage-ipython in <module>()
> 2 # -*- coding: utf-8 -*-
> 3 """
> 4 Sage IPython startup script.
> 5 """
> 6 from sage.misc.interpreter import SageTerminalApp
> 7
> 8 # installs the extra readline commands before the IPython
> initialization begins.
> 9 from sage.misc.readline_extra_commands import *
> 10
> 11 # Make sure we're using the Sage profile if one isn't specified.
> 12 import sys
> 13 if '--profile' not in sys.argv:
> 14 sys.argv.extend(['--profile', 'sage'])
> 15
> 16 app = SageTerminalApp.instance()
> ---> 17 app.initialize()
> global app.initialize = <bound method SageTerminalApp.initialize
> of <sage.misc.interpreter.SageTerminalApp object at 0xb76f0a2c>>
> 18 app.start()
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/IPython/terminal/ipapp.pyc in
> initialize(self=<sage.misc.interpreter.SageTerminalApp object>,
> argv=None)
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/IPython/config/application.pyc in
> catch_config_error(method=<function initialize>,
> app=<sage.misc.interpreter.SageTerminalApp object>, *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 0xb7170bfc>
> app = <sage.misc.interpreter.SageTerminalApp object at
> 0xb76f0a2c>
> 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,
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/IPython/terminal/ipapp.pyc in
> initialize(self=<sage.misc.interpreter.SageTerminalApp object>,
> 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.misc.interpreter.SageTerminalApp object at 0xb76f0a2c>>
> 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,
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/sage/misc/interpreter.pyc in
> init_shell(self=<sage.misc.interpreter.SageTerminalApp object>)
> 668 sage: from sage.misc.interpreter import
> SageTerminalApp, DEFAULT_SAGE_CONFIG
> 669 sage: app =
> SageTerminalApp(config=DEFAULT_SAGE_CONFIG)
> 670 sage: app.initialize(argv=[]) # indirect doctest
> 671 sage: app.shell
> 672 <sage.misc.interpreter.SageInteractiveShell object at
> 0x...>
> 673 """
> 674 # We need verbose crashes for the Sage crash handler. We
> set it here
> 675 # so that we don't overwrite the traitlet attribute
> 676 self.verbose_crash = True
> 677
> 678 # Shell initialization
> 679 self.shell =
> SageInteractiveShell.instance(config=self.config,
> 680 display_banner=False,
> profile_dir=self.profile_dir,
> 681 ipython_dir=self.ipython_dir)
> 682 self.shell.configurables.append(self)
> --> 683
> self.shell.extension_manager.load_extension('sage.misc.sage_extension')
> self.shell.extension_manager.load_extension = <bound method
> ExtensionManager.load_extension of
> <IPython.core.extensions.ExtensionManager object at 0x97e5a4c>>
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/IPython/core/extensions.pyc in
> load_extension(self=<IPython.core.extensions.ExtensionManager object>,
> module_str='sage.misc.sage_extension')
> 83 def load_extension(self, module_str):
> 84 """Load an IPython extension by its module name.
> 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)
> global __import__ = undefined
> module_str = 'sage.misc.sage_extension'
> 99 mod = sys.modules[module_str]
> 100 if self._call_load_ipython_extension(mod):
> 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.
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/sage/misc/sage_extension.py in <module>()
> 45 2
> 46
> 47 In contrast, input to the ``%time`` magic command is preparsed::
> 48
> 49 sage: shell.run_cell('%time 594.factor()')
> 50 CPU times: user ...
> 51 Wall time: ...
> 52 2 * 3^3 * 11
> 53 """
> 54
> 55 from IPython.core.hooks import TryNext
> 56 from IPython.core.magic import Magics, magics_class, line_magic
> 57 import os
> 58 import sys
> 59 import sage
> ---> 60 import sage.all
> global sage.all = undefined
> 61 from sage.misc.interpreter import preparser
> 62 from sage.misc.preparser import preparse
> 63
> 64 @magics_class
> 65 class SageMagics(Magics):
> 66
> 67 @line_magic
> 68 def crun(self, s):
> 69 r"""
> 70 Profile C function calls
> 71
> 72 INPUT:
> 73
> 74 - ``s`` -- string. Sage command to profile.
> 75
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-packages/sage/all.py in
> <module>()
> 76
> ###################################################################
> 77
> 78 import sage.ext.c_lib
> 79 sage.ext.c_lib._init_csage()
> 80 sig_on_count = sage.ext.c_lib._sig_on_reset
> 81
> 82 from time import sleep
> 83
> 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
> 89 from sage.misc.sh import sh
> 90
> ---> 91 from sage.libs.all import *
> global sage.libs.all = undefined
> 92 from sage.doctest.all import *
> 93 try:
> 94 from sage.dev.all import *
> 95 except ImportError:
> 96 pass # dev scripts are disabled
> 97
> 98 from sage.rings.all import *
> 99 from sage.matrix.all import *
> 100
> 101 # This must come before Calculus -- it initializes the Pynac
> library.
> 102 import sage.symbolic.pynac
> 103
> 104 from sage.modules.all import *
> 105 from sage.monoids.all import *
> 106 from sage.algebras.all import *
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-packages/sage/libs/all.py
> in <module>()
> ----> 1 import sage.libs.ntl.all as ntl
> global sage.libs.ntl.all = undefined
> global ntl = undefined
> 2
> 3 from sage.libs.pari.all import pari, pari_gen, PariError
> 4
> 5 from sage.libs.mwrank.all import (mwrank_EllipticCurve,
> mwrank_MordellWeil,
> 6 mwrank_initprimes,
> 7 get_precision as
> mwrank_get_precision,
> 8 set_precision as
> mwrank_set_precision)
> 9
> 10
> 11 import symmetrica.all as symmetrica
> 12
> 13 from cremona.all import CremonaModularSymbols
> 14
> 15
> 16 from sage.misc.lazy_import import lazy_import
> 17 lazy_import('sage.libs.gap.libgap', 'libgap')
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/sage/libs/ntl/__init__.py in <module>()
> ----> 1 import all
> global all = undefined
>
> /home/darij/gitsage6.2/local/lib/python2.7/site-
> packages/sage/libs/ntl/all.py in <module>()
> 17 # but WITHOUT ANY WARRANTY; without even the implied warranty
> of
> 18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
> the GNU
> 19 # General Public License for more details.
> 20 #
> 21 # The full text of the GPL is available at:
> 22 #
> 23 # http://www.gnu.org/licenses/
> 24
> #*****************************************************************************
> 25
> 26 from sage.libs.ntl.ntl_ZZ import (
> 27 ntl_setSeed, \
> 28 ntl_ZZ as ZZ,
> 29 randomBnd as ZZ_random,
> 30 randomBits as ZZ_random_bits )
> 31
> ---> 32 from sage.libs.ntl.ntl_ZZ_pContext import ntl_ZZ_pContext as
> ZZ_pContext
> global sage.libs.ntl.ntl_ZZ_pContext = undefined
> global ntl_ZZ_pContext = undefined
> global ZZ_pContext = undefined
> 33
> 34 from sage.libs.ntl.ntl_ZZ_p import (
> 35 ntl_ZZ_p as ZZ_p,
> 36 ntl_ZZ_p_random_element as ZZ_p_random )
> 37
> 38 from sage.libs.ntl.ntl_ZZX import (
> 39 ntl_ZZX as ZZX,
> 40 zero_ZZX, one_ZZX )
> 41
> 42 from sage.libs.ntl.ntl_ZZ_pX import ntl_ZZ_pX as ZZ_pX
> 43
> 44 from sage.libs.ntl.ntl_ZZ_pEContext import ntl_ZZ_pEContext as
> ZZ_pEContext
> 45
> 46 from sage.libs.ntl.ntl_ZZ_pE import ntl_ZZ_pE as ZZ_pE
> 47
>
> ImportError: libntl.so.2: cannot open shared object file: No such file or
> directory
>
> ***************************************************************************
>
> History of session input:
> *** Last line of input (may not be in above history):
> }}}
New description:
After upgrading to Sage 6.2.beta7:
{{{
(sage-sh) jdemeyer@tamiyo:sage-config$ ldd local/lib/python2.7/site-
packages/sage/misc/readline_extra_commands.so
linux-vdso.so.1 (0x00007fffdfffa000)
libcsage.so => /usr/local/src/sage-config/local/lib/libcsage.so
(0x00007f403d747000)
libreadline.so.6 => /usr/local/src/sage-
config/local/lib/libreadline.so.6 (0x00007f403d500000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-
gnu/4.6.3/libstdc++.so.6 (0x00007f403d1c4000)
libntl.so.2 => not found
libpython2.7.so.1.0 => /usr/local/src/sage-
config/local/lib/libpython2.7.so.1.0 (0x00007f403cde5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f403cbc8000)
libc.so.6 => /lib64/libc.so.6 (0x00007f403c820000)
libntl.so.3 => /usr/local/src/sage-config/local/lib/libntl.so.3
(0x00007f403c459000)
libpari-gmp.so.4 => /usr/local/src/sage-config/local/lib/libpari-
gmp.so.4 (0x00007f403bce9000)
libgmp.so.11 => /usr/local/src/sage-config/local/lib/libgmp.so.11
(0x00007f403ba7a000)
libm.so.6 => /lib64/libm.so.6 (0x00007f403b78b000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-
gnu/4.6.3/libgcc_s.so.1 (0x00007f403b575000)
libtinfo.so.5 => /usr/local/src/sage-
config/local/lib/libtinfo.so.5 (0x00007f403b340000)
/lib64/ld-linux-x86-64.so.2 (0x00007f403db66000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f403b13b000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f403af38000)
libgf2x.so.1 => /usr/local/src/sage-config/local/lib/libgf2x.so.1
(0x00007f403ad22000)
}}}
Note the missing `libntl.so.2` causing various kinds of problems.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/16105#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.