Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 484532

Summary: dev-python/matplotlib-1.3.0 cannot save a png file on Darwin
Product: Gentoo/Alt Reporter: MATSUI Tetsushi <VED03370>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: OS X   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch against setupext.py

Description MATSUI Tetsushi 2013-09-11 00:19:38 UTC
Created attachment 358448 [details, diff]
patch against setupext.py

With dev-python/matplotlib-1.3.0 (and media-libs/libpng-1.6.3), 
I cannot save a png file.
$ python
>>> from matplotlib.pyplot import savefig
>>> savefig('a.png')
libpng warning: Application built with libpng-1.2.41 but running with 1.6.3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
...
RuntimeError: Could not create write struct
>>>

The strange "libpng-1.2.41" points png.h of host OSX from /usr/X11/include.

The patch attached excludes /usr/X11 from setupext.py for libpng,
and since it also makes a freetype header be lost, adds some workarounds
for include path of freetype.

Older versions of matplotlib should show similar symptom.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2015-03-20 12:35:41 UTC
Please reopen if this problem still exists with version 1.4
Comment 2 MATSUI Tetsushi 2015-03-23 14:07:06 UTC
1.4.3 seems fine.
Thank you.