Hello, I'm also having this exact problem for matplotlib-py26. Is there a solution available?
It sounds like patching the matplotlib build script to change the directory ordering would fix it. Could this be done, or is there a way to do it manually? Thank you, John On 6Apr 2013, at 05:31, Martin Costabel wrote: > On 4/04/13 11:55, Sean Lake wrote: >> Hello all, >> >> I've run into a problem in matplotlib. I'm using the GTKAgg backend and the >> matplotlib.pyplot.show() command after labeling the axes with LaTeX >> formatted labels. I run into multiple copies of this error: >> >> libpng warning: Application built with libpng-1.2.41 but running with 1.5.10 >> Traceback (most recent call last): > [] >> File "/sw/lib/python2.7/site-packages/matplotlib/texmanager.py", line 510, >> in get_grey >> X = read_png(os.path.join(self.texcache, pngfile)) >> RuntimeError: _image_module::readpng: png_create_read_struct failed > > I think what happens is that when you build matplotlib-py27, it picks up > an include file "png.h" from libpng-1.2.41. This may be > /usr/X11/include/png.h or perhaps /usr/local/include/png.h. > > Did you mention what version of MacOSX you are running? If it is 10.6, > you may indeed have /usr/X11/include/png.h of version 1.2.41. Try > > grep "define PNG_LIBPNG_VER_STRING" /usr/X11/include/png.h > > This might be considered a bug in the matplotlib-py27 package, in that > it includes /usr/X11/include before /sw/include/libpng15. I see the > following relevant compiler line during the build phase of > matplotlib-py27 (on 10.8.3) > > gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -fwrapv -O3 -Wall > -I/sw/include/pygtk-2.0 -I/sw/lib/freetype219/include/freetype2 > -I/sw/lib/fontconfig2/include -DNSIG=32 > -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 > -I/usr/include -I/usr/X11/include -I/opt/X11/include > -I/sw/lib/freetype219/include -I/sw/include -I/sw/include/libpng15 > -I/usr/include -I/usr/X11/include -I/opt/X11/include > -I/sw/lib/freetype219/include -I/sw/include -I. > -I/sw/lib/python2.7/site-packages/numpy/core/include -I. -I/sw/include > -I/sw/include/python2.7 -c src/_png.cpp -o > build/temp.macosx-10.8-x86_64-2.7/src/_png.o > > This is bad ordering of include directories. > > -- > Martin > > > > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > Fink-users mailing list > [email protected] > List archive: > http://news.gmane.org/gmane.os.macosx.fink.user > Subscription management: > https://lists.sourceforge.net/lists/listinfo/fink-users ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Fink-users mailing list [email protected] List archive: http://news.gmane.org/gmane.os.macosx.fink.user Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-users
