abort trap

I’ve been having some trouble with compiling matplotlib on Snow Leopard. I managed to get rid of all my old problems by recompiling everything with gcc-4.2.

But now when I import matplotlib.pyplot I get an Abort trap message and python quits. Here is part of the error message I get:

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff84a893d6 __kill + 10
1 libSystem.B.dylib 0x00007fff84b29972 abort + 83
2 libgcc_s.1.dylib 0x0000000100487d51 uw_init_context_1 + 385
3 libgcc_s.1.dylib 0x00000001004884cc _Unwind_Resume + 76
4 ft2font.so 0x00000001017b046d FT2Font::FT2Font(std::string) + 4269 (Extensions.hxx:629)
5 ft2font.so 0x00000001017b0af8 ft2font_module::new_ft2font(Py::Tuple const&) + 408 (ft2font.cpp:1728)
6 ft2font.so 0x00000001017b3d52 Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string const&, Py::Tuple const&) + 162 (Extensions.hxx:422)
7 ft2font.so 0x00000001017c25a0 method_varargs_call_handler + 512

It seems like freetype is the problem and from a little googling I see that the sage developers also had a problem with this. Does anyone know how to fix this?

Thanks,

-Ranjit

I tried again by compiling version 2.4.11 of freetype instead of the latest and recompiling matplotlib with that and now I get the following less severe error:
Traceback (most recent call last):
File “”, line 1, in
File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py”, line 6, in
from matplotlib.figure import Figure, figaspect
File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py”, line 18, in
from axes import Axes, SubplotBase, subplot_class_factory
File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py”, line 12, in
import matplotlib.axis as maxis
File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axis.py”, line 10, in
import matplotlib.font_manager as font_manager
File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py”, line 52, in
from matplotlib import ft2font
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so
Reason: Incompatible library version: ft2font.so requires version 11.0.0 or later, but libfreetype.6.dylib provides version 10.0.0

···

On Mon, Jun 28, 2010 at 5:43 PM, Ranjit Chacko <rjchacko@…287…> wrote:

I’ve been having some trouble with compiling matplotlib on Snow Leopard. I managed to get rid of all my old problems by recompiling everything with gcc-4.2.

But now when I import matplotlib.pyplot I get an Abort trap message and python quits. Here is part of the error message I get:

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff84a893d6 __kill + 10
1 libSystem.B.dylib 0x00007fff84b29972 abort + 83
2 libgcc_s.1.dylib 0x0000000100487d51 uw_init_context_1 + 385

3 libgcc_s.1.dylib 0x00000001004884cc _Unwind_Resume + 76
4 ft2font.so 0x00000001017b046d FT2Font::FT2Font(std::string) + 4269 (Extensions.hxx:629)
5 ft2font.so 0x00000001017b0af8 ft2font_module::new_ft2font(Py::Tuple const&) + 408 (ft2font.cpp:1728)

6 ft2font.so 0x00000001017b3d52 Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string const&, Py::Tuple const&) + 162 (Extensions.hxx:422)
7 ft2font.so 0x00000001017c25a0 method_varargs_call_handler + 512

It seems like freetype is the problem and from a little googling I see that the sage developers also had a problem with this. Does anyone know how to fix this?

Thanks,

-Ranjit

2010/6/29 Ranjit Chacko <rjchacko@...287...>:

I tried again by compiling version 2.4.11 of freetype instead of the latest
and recompiling matplotlib with that and now I get the following less severe
error:
Reason: Incompatible library version: ft2font.so requires version 11.0.0
or later, but libfreetype.6.dylib provides version 10.0.0

Hmm, I'm using freetype 2.3.12 and yesterday it compiled fine with
this. It guess it has some very simple reason, maybe you forgot to
remove the old compilation result or something like this? :slight_smile: Good
luck,

Friedrich

Hi Michael,
Hi Ranjit,

2010/6/29 Ranjit Chacko <rjchacko@...287...>:

I've been having some trouble with compiling matplotlib on Snow Leopard. I
managed to get rid of all my old problems by recompiling everything with
gcc-4.2.

But now when I import matplotlib.pyplot I get an Abort trap message and
python quits. Here is part of the error message I get:

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff84a893d6 __kill + 10
1 libSystem.B.dylib 0x00007fff84b29972 abort + 83
2 libgcc_s.1.dylib 0x0000000100487d51 uw_init_context_1 +
385
3 libgcc_s.1.dylib 0x00000001004884cc _Unwind_Resume + 76
4 ft2font.so 0x00000001017b046d
FT2Font::FT2Font(std::string) + 4269 (Extensions.hxx:629)
5 ft2font.so 0x00000001017b0af8
ft2font_module::new_ft2font(Py::Tuple const&) + 408 (ft2font.cpp:1728)
6 ft2font.so 0x00000001017b3d52
Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string
const&, Py::Tuple const&) + 162 (Extensions.hxx:422)
7 ft2font.so 0x00000001017c25a0
method_varargs_call_handler + 512

It seems like freetype is the problem and from a little googling I see that
the sage developers also had a problem with this. Does anyone know how to
fix this?

Looks familiar, Michael? :slight_smile:

It seems there are some matplotlib users we might have scared away
without noticing by this ugly bug we're hopefully tracking down now
:slight_smile:

Although this email dates back to June. I updated my OS X roughly
every two weeks that time (from the Install logs of System
Preferences). Notably the google link I sent before
(http://groups.google.com/group/sage-devel/browse_thread/thread/2c538915abc99946)
dates back to Sep 2009, so the problem seems to be around since then.

FYI again, to save you searching on your own.

Friedrich