OS X 10.6 port

in case anyone has some suggestions, I'm forwarding this from the sage list

···

---------- Forwarded message ----------
From: William Stein <wstein@...149...>
Date: Sun, Sep 27, 2009 at 10:51 PM
Subject: OS X 10.6 port
To: sage-devel <sage-devel@...614...>, John Hunter <jdh2358@...149...>

Hi,

I spent several hours yesterday trying to get matplotlib for Sage to
work on OS X 10.6. On my laptop everything works perfectly, but on
another test machine (bsd.math) the workaround from my laptop doesn't
work. So at this point Sage still does not support OS X 10.6.

The problem is in matplotlib's C++ wrapper for freetype2. It's a
Python extension module implemented directly in C++, and it simply
doesn't work correctly at all. For example, whenever it tries to
raise a Python exception, it just terminates Python with

"11713 Abort trap sage-ipython "$@" -i"

I'm cc'ing John Hunter -- author of matplotlib, in case he has any
advice to share. In particular, he has an account on
bsd.math.washington.edu and build tests matplotlib there, so I'm
curious if he has any issues with that. Note that Sage builds
freetype from source, which could be relevant.

I will try updating freetype in Sage (our version is slightly out of
date), and also checking if there is some sort of conflict with a
system-wide freetype. My worry is that Matplotlib has some weird
custom C++ code for writing extensions that maybe uses signals or
something to raise exceptions, and it is just broken when used with OS
X 10.6. Hopefully this is not that the case, and something special to
Sage is happening.

William

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

John Hunter wrote:

I spent several hours yesterday trying to get matplotlib for Sage to
work on OS X 10.6. On my laptop everything works perfectly, but on
another test machine (bsd.math) the workaround from my laptop doesn't
work. So at this point Sage still does not support OS X 10.6.

The problem is in matplotlib's C++ wrapper for freetype2. It's a
Python extension module implemented directly in C++, and it simply
doesn't work correctly at all. For example, whenever it tries to
raise a Python exception, it just terminates Python with

"11713 Abort trap sage-ipython "$@" -i"
  

Can you run this inside of gdb and get a traceback?

I'm cc'ing John Hunter -- author of matplotlib, in case he has any
advice to share. In particular, he has an account on
bsd.math.washington.edu and build tests matplotlib there, so I'm
curious if he has any issues with that. Note that Sage builds
freetype from source, which could be relevant.

I will try updating freetype in Sage (our version is slightly out of
date), and also checking if there is some sort of conflict with a
system-wide freetype. My worry is that Matplotlib has some weird
custom C++ code for writing extensions that maybe uses signals or
something to raise exceptions, and it is just broken when used with OS
X 10.6. Hopefully this is not that the case, and something special to
Sage is happening.
  

CXX is the name of the C++ wrapper mechanism we use and is reasonably well-maintained. I can't find out if it has been tested on 10.6 yet, but it's certainly been tested on the gcc version that comes with it. There are no signals involved, only standard C++ exceptions which are delegated to Python exceptions. Is it possible there is any C++ code linked to this that was generated with another compiler version?

Cheers,
Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

I thought I'd chime in since I recently upgraded to OSX 10.6. I don't think I ever got this error, so I probably didn't have the same issue, but just in case...

I reinstalled freetype2, but I'm not sure if I needed to. I also made a change to setupext.py so that the setup script could find freetype2, but this doesn't seem to be your problem because your errors don't occur during the build.

Did you happen to build on top of an old install? I had to clean out the old compiled extensions before everything would build properly. I had to clean out the build directory (obviously), but there are also *.so files in lib/matplotlib and lib/matplotlib/backends.

I should note that I'm built on top of the system python (2.6.1) and I did not use make.osx.

-Tony

···

On Sep 28, 2009, at 2:14 AM, John Hunter wrote:

in case anyone has some suggestions, I'm forwarding this from the sage list

---------- Forwarded message ----------
From: William Stein <wstein@...149...>
Date: Sun, Sep 27, 2009 at 10:51 PM
Subject: OS X 10.6 port
To: sage-devel <sage-devel@...614...>, John Hunter <jdh2358@...149...>

Hi,

I spent several hours yesterday trying to get matplotlib for Sage to
work on OS X 10.6. On my laptop everything works perfectly, but on
another test machine (bsd.math) the workaround from my laptop doesn't
work. So at this point Sage still does not support OS X 10.6.

The problem is in matplotlib's C++ wrapper for freetype2. It's a
Python extension module implemented directly in C++, and it simply
doesn't work correctly at all. For example, whenever it tries to
raise a Python exception, it just terminates Python with

"11713 Abort trap sage-ipython "$@" -i"