Sage 64 bit OSX 10.5 build notes for Sage 3.3

Note: This page is outdated. Please check the Main OSX 64 bit porting page for the current status.

Build Instructions

3.3.alpha5

List of known doctest failures with notes:

segfault due to libSingular + system-malloc

This problem shows up even for a plain Sage session where we quit immediately.

Sprocketer:sage-3.3.alpha5-64 michaelabshoff$ ./sage
----------------------------------------------------------------------
| Sage Version 3.3.alpha5, Release Date: 2009-02-03                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: 
Exiting SAGE (CPU time 0m0.07s, Wall time 0m1.56s).
sage.bin(48962) malloc: *** error for object 0x106603030: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
sage.bin(48962) malloc: *** error for object 0x106603038: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
sage.bin(48962) malloc: *** error for object 0x106602048: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
sage.bin(48962) malloc: *** error for object 0x106602030: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug

When setting break points in malloc_error_break as suggested one does see that the Rational() dtor of Singular is called in place of a higher level Rational() deallocation routine for the Rational() class in Givaro. A similar issue exists when calling minpoly in Python which ends up calling libSingular's minpoly(). None of these problems happen when libSingular uses mmap, but on any system tested the problem pops up when using the system malloc as backend. This is unavoidable on 64 bit OSX since otherwise libSingular's memory manager fails due to missing initialization.

sage/calculus/wester.py

python(91372) malloc: *** error for object 0x106532040: pointer being reallocated was not allocated
*** set a breakpoint in malloc_error_break to debug
**********************************************************************
File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/devel/sage/sage/calculus/wester.py", line 392:
    : print d.factor()
Exception raised:
    Traceback (most recent call last):
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_0[150]>", line 1, in <module>
        print d.factor()###line 392:
    : print d.factor()
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/lib/python2.5/site-packages/sage/calculus/calculus.py", line 3678, in factor
        w = repr(f.factor())
    RuntimeError
**********************************************************************

sage/libs/pari/gen.pyx

sage -t -long "devel/sage/sage/libs/pari/gen.pyx"           
python(13799) malloc: *** mmap(size=268435456000000) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
**********************************************************************
File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/devel/sage/sage/libs/pari/gen.pyx", line 7726:
    sage: pari.finitefield_init(7,2)
Exception raised:
    Traceback (most recent call last):
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_279[4]>", line 1, in <module>
        pari.finitefield_init(Integer(7),Integer(2))###line 7726:
    sage: pari.finitefield_init(7,2)
    RuntimeError
**********************************************************************
File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/devel/sage/sage/libs/pari/gen.pyx", line 7729:
    sage: pari.finitefield_init(2,3)
Exception raised:
    Traceback (most recent call last):
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_279[5]>", line 1, in <module>
        pari.finitefield_init(Integer(2),Integer(3))###line 7729:
    sage: pari.finitefield_init(2,3)
    RuntimeError
**********************************************************************

osx64/sage-3.3 (last edited 2009-04-21 23:25:20 by MichaelAbshoff)