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? > > |