I've resurrected this post because I have some indication of the

source of the subject start-up errors. The sage version is 4.2.1, my

architecture is amd64 running Gentoo and my gcc info is:

gcc version 4.3.4 (Gentoo 4.3.4 p1.0, pie-10.1.5)

Building sage with the usual "make" results in a sage that passes all

tests. The CFLAGS are unset when sage is built in this fashion.

However, when I build sage with custom CFLAGS as

CFLAGS="-march=opteron -O2 -pipe" CXXFLAGS="-march=opteron -O2 -pipe"

make

everything is built except the documentation. The documentation fails

completely with

sphinx-build -b html -d /local/sage_test/sage-4.2.1/devel/sage/doc/

output/doctrees/en/tutorial /local/sage_test/sage-4.2.1/devel/sage/

doc/en/tutorial /local/sage_test/sage-4.2.1/devel/sage/doc

/output/html/en/tutorial

Traceback (most recent call last):

File "/local/sage_test/sage-4.2.1/local/bin/sphinx-build", line 6,

in <module>

import sage.all

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/all.py", line 64, in <module>

from sage.misc.all import * # takes a while

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/misc/all.py", line 70, in <module>

from sage_input import sage_input

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/misc/sage_input.py", line 163, in <module>

from sage.misc.functional import parent

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/misc/functional.py", line 37, in <module>

from sage.rings.complex_double import CDF

File "complex_double.pyx", line 88, in sage.rings.complex_double

(sage/rings/complex_double.c:13818)

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/rings/complex_field.py", line 86, in ComplexField

C = ComplexField_class(prec)

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/rings/complex_field.py", line 177, in __init__

self._populate_coercion_lists_(coerce_list=[complex_number.RRtoCC

(self._real_field(), self)])

File "complex_number.pyx", line 2004, in

sage.rings.complex_number.RRtoCC.__init__ (sage/rings/complex_number.c:

13046)

File "complex_number.pyx", line 153, in

sage.rings.complex_number.ComplexNumber.__init__ (sage/rings/

complex_number.c:3183)

File "parent.pyx", line 380, in

sage.structure.parent.Parent.__call__ (sage/structure/parent.c:4241)

File "map.pyx", line 173, in sage.categories.map.Map._call_ (sage/

categories/map.c:3481)

NotImplementedError: <type 'sage.rings.real_mpfr.int_toRR'>

Build finished. The built documents can be found in /local/sage_test/

sage-4.2.1/devel/sage/doc/output/html/en/tutorial

Traceback (most recent call last):

File "/local/sage_test/sage-4.2.1/devel/sage/doc/common/builder.py",

line 1009, in <module>

getattr(get_builder(name), type)()

File "/local/sage_test/sage-4.2.1/devel/sage/doc/common/builder.py",

line 260, in _wrapper

getattr(get_builder(document), name)(*args, **kwds)

File "/local/sage_test/sage-4.2.1/devel/sage/doc/common/builder.py",

line 360, in _wrapper

self.write_auto_rest_file(module_name)

File "/local/sage_test/sage-4.2.1/devel/sage/doc/common/builder.py",

line 569, in write_auto_rest_file

title = self.get_module_docstring_title(module_name)

File "/local/sage_test/sage-4.2.1/devel/sage/doc/common/builder.py",

line 539, in get_module_docstring_title

import sage.all

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/all.py", line 64, in <module>

from sage.misc.all import * # takes a while

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/misc/all.py", line 70, in <module>

from sage_input import sage_input

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/misc/sage_input.py", line 163, in <module>

from sage.misc.functional import parent

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/misc/functional.py", line 37, in <module>

from sage.rings.complex_double import CDF

File "complex_double.pyx", line 88, in sage.rings.complex_double

(sage/rings/complex_double.c:13818)

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/rings/complex_field.py", line 86, in ComplexField

C = ComplexField_class(prec)

File "/local/sage_test/sage-4.2.1/local/lib/python2.6/site-packages/

sage/rings/complex_field.py", line 177, in __init__

self._populate_coercion_lists_(coerce_list=[complex_number.RRtoCC

(self._real_field(), self)])

File "complex_number.pyx", line 2004, in

sage.rings.complex_number.RRtoCC.__init__ (sage/rings/complex_number.c:

13046)

File "complex_number.pyx", line 153, in

sage.rings.complex_number.ComplexNumber.__init__ (sage/rings/

complex_number.c:3183)

File "parent.pyx", line 380, in

sage.structure.parent.Parent.__call__ (sage/structure/parent.c:4241)

File "map.pyx", line 173, in sage.categories.map.Map._call_ (sage/

categories/map.c:3481)

NotImplementedError: <type 'sage.rings.real_mpfr.int_toRR'>

Moreover, when I issue 'sage -c quit' I get the same errors listed

under the first post of this thread. These CFLAGS are the flags used

in building every package on my Gentoo machine whenever a package will

allow them. Now when I unpack the sage-4.2.1.spkg tarball and insert

unset CFLAGS

unset CXXFLAGS

near the top of the spkg-install script, repackage the tarball and

issue the above 'make' with custom CFLAGS; both sage and the

documentation build and 'sage -c quit' returns no errors. By altering

spkg-install in the above fashion every package in sage is exposed to

the custom CFLAGS with the exception of sage-4.2.1.spkg. A similar

hack to unset CFLAGS for the amd64 architecture

is utilized by Christopher Schwan and Francois Bissey (http://

github.com/cschwan/sage-on-gentoo) to build a partially split sage. It

would appear that these custom amd64 flags cannot be used to

successfully build the sage-4.2.1.spkg tarball. Is there any known

reason why these custom CFLAGS cannot be used? Gentoo custom flags for

32 bit architectures do not seem to have this build problem. On an

amd64 laptop I have, the CFLAGS setting

CFLAGS="-march=k8 -O2 -pipe"

also results in a sage that fails.

Steve

On Nov 5, 2:32 pm, strogdon <strog...@d.umn.edu> wrote:

> I'm building sage 4.2 on an amd64 machine running gentoo using a

> provided ebuild. There are no obvious errors in install.log. However,

> sage does not startup cleanly. When 'sage -c quit' is issued the

> following results:

>

> Traceback (most recent call last):

> File "/opt/sage/local/bin/sage-eval", line 4, in <module>

> from sage.all import *

> File "/opt/sage/local/lib/python2.6/site-packages/sage/all.py", line

> 64, in <module>

> from sage.misc.all import * # takes a while

> File "/opt/sage/local/lib/python2.6/site-packages/sage/misc/all.py",

> line 70, in <module>

> from sage_input import sage_input

> File "/opt/sage/local/lib/python2.6/site-packages/sage/misc/

> sage_input.py", line 163, in <module>

> from sage.misc.functional import parent

> File "/opt/sage/local/lib/python2.6/site-packages/sage/misc/

> functional.py", line 37, in <module>

> from sage.rings.complex_double import CDF

> File "complex_double.pyx", line 88, in sage.rings.complex_double

> (sage/rings/complex_double.c:13818)

> File "/opt/sage/local/lib/python2.6/site-packages/sage/rings/

> complex_field.py", line 86, in ComplexField

> C = ComplexField_class(prec)

> File "/opt/sage/local/lib/python2.6/site-packages/sage/rings/

> complex_field.py", line 177, in __init__

> self._populate_coercion_lists_(coerce_list=[complex_number.RRtoCC

> (self._real_field(), self)])

> File "complex_number.pyx", line 2004, in

> sage.rings.complex_number.RRtoCC.__init__ (sage/rings/complex_number.c:

> 13046)

> File "complex_number.pyx", line 153, in

> sage.rings.complex_number.ComplexNumber.__init__ (sage/rings/

> complex_number.c:3183)

> File "parent.pyx", line 380, in

> sage.structure.parent.Parent.__call__ (sage/structure/parent.c:4241)

> File "map.pyx", line 173, in sage.categories.map.Map._call_ (sage/

> categories/map.c:3481)

> NotImplementedError: <type 'sage.rings.real_mpfr.int_toRR'>

>

> Others have reported this same type of error on amd64 machines but

> relative to building sage in the "usual" way with the sage-provided

> makefile. When I do this sage builds, all tests pass and the above

> errors are not present. Is it possible that this is an amd64-related

> bug that the gentoo package managing system is discovering?

--

To post to this group, send an email to sage-devel@googlegroups.com

To unsubscribe from this group, send an email to sage-devel-unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/sage-devel

URL: http://www.sagemath.org