Py2app error with libpng

View: New views
3 Messages — Rating Filter:   Alert me  

Py2app error with libpng

by Brian Zambrano-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I'm building an app with py2app and it runs successfully both on my computer and a friends.  We both have the developer tools installed.  On two other Macs, the application would die when loading one of the matplotlib .so files.  The problem is that the .so, matplotlib/_png.so, is linking to:

/usr/X11/lib/libpng12.0.dylib

...which doesn't exist on the two machines where the crash is occurring.

My understanding is that py2app (or, macholib?) tries to resolve these dependencies and copy over the necessary dylibs. 

I've tried adding /usr/X11/lib/libpng12.0.dylib to the build with the 'frameworks' argument, but that doesn't seem to do anything.  Now, I'm thinking of doing a manual copy of that file into the Framework directory, along with using install_name_tool.

What's the best way to handle this?

BZ

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Py2app error with libpng

by Kevin Walzer-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/6/09 11:27 AM, Brian Zambrano wrote:

> Hi there,
>
> I'm building an app with py2app and it runs successfully both on my
> computer and a friends.  We both have the developer tools installed.  On
> two other Macs, the application would die when loading one of the
> matplotlib .so files.  The problem is that the .so, matplotlib/_png.so,
> is linking to:
>
> /usr/X11/lib/libpng12.0.dylib
>
> ...which doesn't exist on the two machines where the crash is occurring.
>
> My understanding is that py2app (or, macholib?) tries to resolve these
> dependencies and copy over the necessary dylibs.
>
> I've tried adding /usr/X11/lib/libpng12.0.dylib to the build with the
> 'frameworks' argument, but that doesn't seem to do anything.  Now, I'm
> thinking of doing a manual copy of that file into the Framework
> directory, along with using install_name_tool.
>
> What's the best way to handle this?
>

py2app typically doesn't include system files. I think /usr/lib is
considered a system directory, which may explain why it's not bundling
the files.

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Py2app error with libpng

by Ronald Oussoren :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 6 Nov, 2009, at 23:55, Kevin Walzer wrote:

> On 11/6/09 11:27 AM, Brian Zambrano wrote:
>> Hi there,
>>
>> I'm building an app with py2app and it runs successfully both on my
>> computer and a friends.  We both have the developer tools installed.  On
>> two other Macs, the application would die when loading one of the
>> matplotlib .so files.  The problem is that the .so, matplotlib/_png.so,
>> is linking to:
>>
>> /usr/X11/lib/libpng12.0.dylib
>>
>> ...which doesn't exist on the two machines where the crash is occurring.
>>
>> My understanding is that py2app (or, macholib?) tries to resolve these
>> dependencies and copy over the necessary dylibs.
>>
>> I've tried adding /usr/X11/lib/libpng12.0.dylib to the build with the
>> 'frameworks' argument, but that doesn't seem to do anything.  Now, I'm
>> thinking of doing a manual copy of that file into the Framework
>> directory, along with using install_name_tool.
>>
>> What's the best way to handle this?
>>
>
> py2app typically doesn't include system files. I think /usr/lib is considered a system directory, which may explain why it's not bundling the files.
That's correct. /usr/lib is a system directory, and hence anything in it is assumed to be a file owned by Apple. That's why those files are not copied into the application bundle.

Ronald

>
> --Kevin
>
> --
> Kevin Walzer
> Code by Kevin
> http://www.codebykevin.com
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
> http://mail.python.org/mailman/listinfo/pythonmac-sig


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

smime.p7s (4K) Download Attachment