Following those steps, my app started just fine on Snow Leopard.  Thank you
Emanuele!

I would, however, like to understand this problem a bit more so I can fix
the build.  I'd like this app to run out of the box.

Looking at ft2font.so:

otool -L Resources/lib/python2.5/matplotlib/ft2font.so
Resources/lib/python2.5/matplotlib/ft2font.so:
        @executable_path/../Frameworks/libfreetype.6.dylib (compatibility
version 10.0.0, current version 10.12.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
1.2.3)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 7.4.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.1.3)
        @executable_path/../Frameworks/libgcc_s.1.dylib (compatibility
version 1.0.0, current version 1.0.0)

For matplotlib to load successfully, which libgcc should be loaded?

Thanks again,
BZ



On Mon, Nov 9, 2009 at 11:45 PM, Emanuele Santos
<emanuelesan...@gmail.com>wrote:

> We saw the same problem with VisTrails (www.vistrails.org).
>
> It seems that python.org's python can't build the fonts in ~/.matplotlib
> on snow leopard.
> We noticed that importing matplotlib.axis using Apple's python will do
> that.
>
> So this is the work-around we found for vistrails (bundled with python.org2.5)
>
> In a terminal on snow leopard:
>
> $ rm -rf ~/.matplotlib
> $ cd /Applications/Vistrails.app/Contents/Resources/lib/python2.5
> $ DYLD_LIBRARY_PATH=/usr/lib
>  /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python
>
> >>> import matplotlib.axis
>
> Now running the app again works.
>
> The DYLD_LIBRARY_PATH is necessary because of problems we saw with
> different versions of libgcc_s.1.dylib present in the system and the wrong
> one was being loaded.
>
> I don't think it's a py2app bug because I can reproduce it by just running
> python.org's python and importing matplotlib.axis.
>
> I guess it is a bug in matplotlib.
>
> -- Emanuele.
>
>
> On Nov 9, 2009, at 11:46 PM, Brian Zambrano wrote:
>
> I'm getting my Py2app build running and think I've worked around some
> issues, but another major one has come up.  My application is being built on
> OS X 10.5.8, where matplotlib is, oviously, installed.  On another 10.5.X
> machine without any of the app's dependencies, my compiled app runs just
> fine.  Today, I tried getting it running on a new Mac with Snow Leopard,
> 10.6, and get the following bus error.
>
> From the crash report, it looks like these are relevant:
>
> Exception Type:  EXC_BAD_ACCESS (SIGBUS)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
> Crashed Thread:  0  Dispatch queue: com.apple.main-thread
>
> Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
> 0   ???                                 0000000000 0 + 0
> 1   libSystem.B.dylib                   0x91176aa8
> _Unwind_GetLanguageSpecificData + 24
> 2   libstdc++.6.dylib                   0x90057d86 __gxx_personality_v0 +
> 120
> 3   libgcc_s.1.dylib                    0x03801476 _Unwind_Backtrace + 278
> 4   libgcc_s.1.dylib                    0x03801890 _Unwind_Resume + 112
> 5   ft2font.so                          0x038cd3b1
> FT2Font::FT2Font(std::string) + 3737
> 6   ft2font.so                          0x038cd4df
> ft2font_module::new_ft2font(Py::Tuple const&) + 291
> 7   ft2font.so                          0x038d787f
> Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string
> const&, Py::Tuple const&) + 261
> 8   ft2font.so                          0x038df637
> method_varargs_call_handler + 301
>
> I'm not really sure where to go from here.  I've read a few other things
> which hint at Snow Leopard being a bit of a headache: http://bit.ly/2Z2Cil
>
> Has anyone run this setup before?  Suggestions?
>
> BZ
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.
> http://p.sf.net/sfu/bobj-july_______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to