On 04/ 1/11 12:54 PM, Burcin Erocal wrote:
On Fri, 01 Apr 2011 00:37:46 +0100
"Dr. David Kirkby"<david.kir...@onetel.net>  wrote:

I've built Sage 64-bit on OpenSolaris but it crashes at startup. I've
run gdb and find the bit of code that's causing the crash is this.

./devel/sage-main/sage/symbolic/function.cpp


   /* "sage/symbolic/function.pyx":109
   *                 raise ValueError,  real_fname + " parameter must
be callable" *
   *         if not self._is_registered():             #<<<<<<<<<<<<<<
   *             self._register_function()
   *
   */
<snip>
allows Sage to run. It's not 100% stable, but much better than before.

<snip>
Can anyone see if there might be something wrong with this code,
which is causing Sage to segfault?

It might be due to the linker initializing the library in a different
order. Can you post a backtrace so we can see which function it is
trying to construct?

Here's a backtrace

drkirkby@hawk:~/64/sage-4.7.alpha3$ ./sage -gdb
Building Sage on Solaris in 64-bit mode
Creating SAGE_LOCAL/lib/sage-64.txt since it does not exist
Detected SAGE64 flag
Building Sage on Solaris in 64-bit mode
----------------------------------------------------------------------
| Sage Version 4.7.alpha3, Release Date: 2011-03-31                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
/export/home/drkirkby/64/sage-4.7.alpha3/local/bin/sage-ipython
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11"...
warning: Lowest section in /lib/amd64/libdl.so.1 is .dynamic at 00000000000000b0
Python 2.6.4 (r264:75706, Apr  1 2011, 15:07:52)
[GCC 4.5.0] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
warning: Lowest section in /lib/amd64/libintl.so.1 is .dynamic at 
00000000000000b0
warning: Lowest section in /lib/amd64/libpthread.so.1 is .dynamic at 00000000000000b0

Program received signal SIGSEGV, Segmentation fault.
0x00000000003eb0a5 in ?? ()
(gdb) bt
#0  0x00000000003eb0a5 in ?? ()
#1  0xfffffd7fff2ac5d1 in _Unwind_RaiseException_Body () from /lib/64/libc.so.1
#2  0xfffffd7fff2ac855 in _Unwind_RaiseException () from /lib/64/libc.so.1
#3 0xfffffd7ff91d6729 in __cxa_throw (obj=<value optimized out>, tinfo=<value optimized out>, dest=<value optimized out>)
    at ../../../../../gcc-4.5.0/libstdc++-v3/libsupc++/eh_throw.cc:78
#4 0xfffffd7fcec6d5ff in GiNaC::function::find_function (name=@0x4a359b0, nparams=2) at function.cpp:1446 #5 0xfffffd7fce9454ad in __pyx_f_4sage_8symbolic_8function_15BuiltinFunction__is_registered (__pyx_v_self=0x4a142f0) at sage/symbolic/function.cpp:7301 #6 0xfffffd7fce950755 in __pyx_pf_4sage_8symbolic_8function_8Function___init__ (__pyx_v_self=0x4a142f0, __pyx_args=<value optimized out>,
    __pyx_kwds=<value optimized out>) at sage/symbolic/function.cpp:2374
#7  0xfffffd7fffde7a70 in ?? ()
#8  0x00000016745f5f63 in ?? ()
#9  0x0000000004a0e5a8 in ?? ()
#10 0x0000000004a142f0 in ?? ()
#11 0x000000000000000b in ?? ()
#12 0x0000000004a0e5a8 in ?? ()
#13 0x0000000002c913e8 in ?? ()
#14 0xfffffd7fd76c2b30 in module_members () from /export/home/drkirkby/64/sage-4.7.alpha3/local/lib//libpython2.6.so.1.0
#15 0x0000002752657572 in ?? ()
#16 0xfffffd7fd76d5c60 in ?? () from /export/home/drkirkby/64/sage-4.7.alpha3/local/lib//libpython2.6.so.1.0
#17 0x2800000040520000 in ?? ()
#18 0xfffffd7fd76d5920 in ?? () from /export/home/drkirkby/64/sage-4.7.alpha3/local/lib//libpython2.6.so.1.0
#19 0x0000000000000005 in ?? ()
#20 0x00000000049e4db8 in ?? ()
---Type <return> to continue, or q <return> to quit---
#21 0x0000000000000000 in ?? ()

The line starting:

  __pyx_t_2 = ((struct __pyx_vtabstruct_4sage_8symbolic_8function_Function *)

below is sage/symbolic/function.cpp line 2374


  /* "sage/symbolic/function.pyx":109
 *                 raise ValueError,  real_fname + " parameter must be callable"
 *
 *         if not self._is_registered():             # <<<<<<<<<<<<<<
 *             self._register_function()
 *
 */
__pyx_t_2 = ((struct __pyx_vtabstruct_4sage_8symbolic_8function_Function *)((struct __pyx_obj_4sage_8symbolic_8function_Function *)__pyx_v_self)->__pyx_vtab)->_is_registered(((struct __pyx_obj_4sage_8symbolic_8function_Function *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_6);
  if (__pyx_t_5) {

Dave

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to