Dear Pim,

2010/5/27 Pim Schellart <p.schell...@gmail.com>:
> At first I used the binaries for the latest stable releases of Python
> 2.6 + numpy + matplotlib from the respected websites.
> But in order to compile a custom library I needed Python to be compiled 64 
> bit.

For me this was the same with PIL ... though I didn't need 64bit for
that.  And I agree, for a new Mac user it's a mess.

> This worked for Python, numpy and scipy but not for matplotlib.
> I used to be able to compile matplotlib with a simple "sudo python
> setup.py install" but when I tried to do this after the change to 64
> bit the build failed with some errors which seemed to me to be related
> to freetype not being compiled 64 bit (these errors, which I
> unfortunately did not save clearly indicated that the linker could not
> find some symbols and when I checked the architecture of the libs it
> was i386 only).
> I tried to fix this by first compiling freetype 64 bit, and later
> libpng as well.
> The problem now was that setupext.py did not look in the right
> location for my new libpng build.
> After I installed pkgtool this was also solved, however now the
> reported error occurred.

And this error was due to the API change.

> I also could not use the make.osx script from the latest svn checkout
> because of a bug in the fetching of zlib which John fixed.
> Finally removing my custom installations of freetype and libpng and
> using make.osx to fetch and build them solved the problem.

> Oh and somewhere in all this mess I also managed to build it but then
> got a malloc error when loading so I tried the removing of i386 but
> this did not solve the problem so I changed it back.

This I don't understand.

> I guess the conclusion is that the current svn works, but only with
> the make.osx approach.

I cannot agree currently.  I can try to do my first contact with svn,
but for the stable release, it works as said before with some tweaking
in setupext.py and src/_png.cpp too.  Also we seem to have quite
similar machines and prerequisites.  The setupext.py tweak may be
omittable by using pkgtool.

So my conclusion is that with using pkgtool and the change in
src/_png.cpp matplotlib should be buildable from sources with
setup.py.

John, shouldn't we finally fix this ugly src/_png.cpp problem?  More
and more people run into problems when using the recent libpng-1.4.
The lines to be added to _png.cpp are:

#define png_infopp_NULL (png_infopp)NULL
#define int_p_NULL (int*)NULL

Maybe libpng defines some constant to make use of in determining
whether the build is with libpng-1.2 or 1.4.

> If I had the time I would try it again on a fresh install to see where
> the bug is that prevents setup.py from working with a custom compiled
> freetype and libpng but for now I am happy that it finally works :)

I can understand you and I'm facing the same problem.

Friedrich

------------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to