Gentoo Archives: gentoo-science

From: Steven Trogdon <strogdon@×××××.edu>
To: gentoo-science <gentoo-science@l.g.o>
Subject: [gentoo-science] [sage-on-gentoo](python-2.6.5-r99)
Date: Wed, 26 May 2010 23:30:36
Message-Id: 1274916413.31651.0@ledaig
To those using amd64:

I first encountered the following when revising sage-core-4.3.5-r1 to  
allow backporting from sage-4.4.2 to sage-4.3.5 and it appears with  
sage-4.4.2. If I upgrade python to 2.6.5-r99 and rebuild sage-core,  
sage will not start. I get:

ImportError                               Traceback (most recent call  
last)

/usr/lib64/python2.6/site-packages/IPython/ipmaker.pyc in  
force_import(modname, force_reloa
d)
      61         reload(sys.modules[modname])
      62     else:
---> 63         __import__(modname)
      64
      65

/opt/sage/local/bin/ipy_profile_sage.py in <module>()
       5     preparser(True)
       6
----> 7     import sage.all_cmdline
       8     sage.all_cmdline._init_cmdline(globals())
       9

/usr/lib64/python2.6/site-packages/sage/all_cmdline.py in <module>()
      12 try:
      13
---> 14     from sage.all import *
      15     from sage.calculus.predefined import x
      16     preparser(on=True)

/usr/lib64/python2.6/site-packages/sage/all.py in <module>()
      70 get_sigs()
      71
---> 72 from sage.rings.all      import *
      73 from sage.matrix.all     import *
      74

/usr/lib64/python2.6/site-packages/sage/rings/all.py in <module>()
      92
      93 # Algebraic numbers
---> 94 from qqbar import (AlgebraicRealField, is_AlgebraicRealField,  
AA,
      95                    AlgebraicReal, is_AlgebraicReal,
      96                    AlgebraicField, is_AlgebraicField, QQbar,

/usr/lib64/python2.6/site-packages/sage/rings/qqbar.py in <module>()
    1414 QQy = QQ['y']
    1415 QQy_y = QQy.gen()
-> 1416 QQxy = QQ['x', 'y']
    1417 QQxy_x = QQxy.gen(0)
    1418 QQxy_y = QQxy.gen(1)

/usr/lib64/python2.6/site-packages/sage/rings/ring.so in  
sage.rings.ring.Ring.__getitem__ (
sage/rings/ring.c:2711)()
     203
     204
--> 205
     206
     207

/usr/lib64/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py  
in
PolynomialRing(base_ring, arg1, arg2, sparse, order, names, name,  
implementation)
     353             names = arg1
     354             n = len(names)
--> 355             R = _multi_variate(base_ring, names, n, sparse,  
order)
     356
     357     if arg1 is None and arg2 is None:

/usr/lib64/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py  
in
_multi_variate(base_ring, names, n, sparse, order)
     451         return R
     452
--> 453     from sage.rings.polynomial.multi_polynomial_libsingular  
import MPolynomialRing_
libsingular
     454     if m.integral_domain.is_IntegralDomain(base_ring):
     455         if n < 1:

ImportError:  
/usr/lib64/python2.6/site-packages/sage/rings/polynomial/multi_polynomial_libs
ingular.so: undefined symbol: _Z7_p_TestP8spolyrecP9sip_sringi
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

and if I re-emerge sage I get:

Setting permissions of DOT_SAGE directory so only you can read and  
write it.
Traceback (most recent call last):
   File "/opt/sage/local/bin/sage-eval", line 4, in <module>
     from sage.all import *
   File "/usr/lib64/python2.6/site-packages/sage/all.py", line 72, in  
<module>
     from sage.rings.all      import *
   File "/usr/lib64/python2.6/site-packages/sage/rings/all.py", line  
90, in <module>
     from qqbar import (AlgebraicRealField, is_AlgebraicRealField, AA,
   File "/usr/lib64/python2.6/site-packages/sage/rings/qqbar.py", line  
1412, in <modul
e>
     QQxy = QQ['x', 'y']
   File "ring.pyx", line 205, in sage.rings.ring.Ring.__getitem__  
(sage/rings/ring.c:2
550)
   File  
"/usr/lib64/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_cons
tructor.py", line 355, in PolynomialRing
     R = _multi_variate(base_ring, names, n, sparse, order)
   File  
"/usr/lib64/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_cons
tructor.py", line 453, in _multi_variate
     from sage.rings.polynomial.multi_polynomial_libsingular import  
MPolynomialRing_li
bsingular
ImportError:  
/usr/lib64/python2.6/site-packages/sage/rings/polynomial/multi_polynomia
l_libsingular.so: undefined symbol: _Z7_p_TestP8spolyrecP9sip_sringi


I could have overlooked something. I rebuilt cython with no effect.  
This is somewhat similar to a problem that was solved by appending  
"-fno-strict-aliasing" to the flags in sage-core; which is still there.  
None of this is present with python-2.6.4-r99.

Steve

Replies

Subject Author
Re: [gentoo-science] [sage-on-gentoo](python-2.6.5-r99) "François Bissey" <f.r.bissey@×××××××××.nz>