|
From: Ranjit C. <rjc...@gm...> - 2010-06-29 00:43:19
|
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 |
|
From: Ranjit C. <rjc...@gm...> - 2010-06-29 02:00:08
|
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 "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py",
line 6, in <module>
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 <module>
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 <module>
import matplotlib.axis as maxis
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axis.py",
line 10, in <module>
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 <module>
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 <rjc...@gm...> 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
>
>
|
|
From: Friedrich R. <fri...@gm...> - 2010-06-29 07:34:07
|
2010/6/29 Ranjit Chacko <rjc...@gm...>: > 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? :-) Good luck, Friedrich |
|
From: Ranjit C. <rjc...@gm...> - 2010-06-29 16:56:16
|
I just recompiled freetype-2.4.12 and checked the version of
/usr/local/lib/libfreetype.6.dylib with otool -l:
Load command 3
cmd LC_ID_DYLIB
cmdsize 64
name /usr/local/lib/libfreetype.6.dylib (offset 24)
time stamp 1 Wed Dec 31 16:00:01 1969
current version 11.0.0
compatibility version 11.0.0
And I checked matplotlib's ft2font.so with otool -L:
ft2font.so:
/usr/local/lib/libfreetype.6.dylib (compatibility version 11.0.0,
current version 11.0.0)
/usr/local/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.5)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version
7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
125.2.0)
/usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
And now that they match I get "Abort trap" on loading matplotlib.pyplot and
it looks as if ft2font.so has something to do with it:
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 looks like the sage developers encountered this problem and this is how
they fixed it:
http://trac.sagemath.org/sage_trac/ticket/7022
All it does is take the plane vanilla matplotlib-0.99.1.spkg spkg and add a
little script that simply rebuilds f2font.so again using *exactly* the same
command lines used by distutils to build that extension. That's it. For some
reason -- probably involving environment variables (?) -- this fixes the
problem. I consider this a temporary 1-sage release solution until the
matplotlib developers (or me) come up with a real fix.
How do I rebuild f2font.so?
>
>
|
|
From: Ranjit C. <rjc...@gm...> - 2010-06-29 18:40:07
|
I finally got it to work. I did the compilation of matplotlib with: sudo make -f make.osx fetch deps mpl_build mpl_install sudo python setup.py install as described here: http://blog.hyperjeff.net/?p=160 The first command correctly compiled matplotlib but installed it to /usr/local. The second command incorrectly compiled matplotlib and installed it in the Framework. Copying ft2font.so over from the /usr/local installation fixed the problem "Abort trap" problem. On Tue, Jun 29, 2010 at 9:56 AM, Ranjit Chacko <rjc...@gm...> wrote: > I just recompiled freetype-2.4.12 and checked the version of > /usr/local/lib/libfreetype.6.dylib with otool -l: > Load command 3 > cmd LC_ID_DYLIB > cmdsize 64 > name /usr/local/lib/libfreetype.6.dylib (offset 24) > time stamp 1 Wed Dec 31 16:00:01 1969 > current version 11.0.0 > compatibility version 11.0.0 > > And I checked matplotlib's ft2font.so with otool -L: > > ft2font.so: > /usr/local/lib/libfreetype.6.dylib (compatibility version 11.0.0, > current version 11.0.0) > /usr/local/lib/libz.1.dylib (compatibility version 1.0.0, current > version 1.2.5) > /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current > version 7.9.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 125.2.0) > /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > > And now that they match I get "Abort trap" on loading matplotlib.pyplot and > it looks as if ft2font.so has something to do with it: > > > 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 looks like the sage developers encountered this problem and this is how > they fixed it: > http://trac.sagemath.org/sage_trac/ticket/7022 > > All it does is take the plane vanilla matplotlib-0.99.1.spkg spkg and add a > little script that simply rebuilds f2font.so again using *exactly* the same > command lines used by distutils to build that extension. That's it. For some > reason -- probably involving environment variables (?) -- this fixes the > problem. I consider this a temporary 1-sage release solution until the > matplotlib developers (or me) come up with a real fix. > > How do I rebuild f2font.so? > > > >> >> |
|
From: Friedrich R. <fri...@gm...> - 2011-11-12 19:31:14
|
Hi Michael, Hi Ranjit, 2010/6/29 Ranjit Chacko <rjc...@gm...>: > 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? :-) It seems there are some matplotlib users we might have scared away without noticing by this ugly bug we're hopefully tracking down now :-) 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 |