On Jul 27, 2005, at 10:21 AM, Derek Homeier wrote:
Hi Folks,
has anyone been able to successfully build a matplotlib since version
0.80?
All the recent releases are first failing with missing pygtk includes,
which can be fixed with this patch:
--- matplotlib/src/_backend_gdk.c.orig Wed Jul 27 17:37:55 2005
+++ matplotlib/src/_backend_gdk.c Wed Jul 27 16:49:34 2005
@@ -10,6 +10,7 @@
#endif
#include <pygtk/pygtk.h>
+#include <pygtk-2.0/pygobject.h>
static PyTypeObject *_PyGdkPixbuf_Type;
But afterwards there are tons of errors from the freetype2 headers:
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I
-I/sw/lib/freetype219/include -I/usr/local/include -I/usr/include
-I/sw/include -I/sw/lib/freetype219/include -I/usr/local/include
-I/usr/include -I/sw/include -I/sw/include/glib-2.0
-I/sw/lib/glib-2.0/include -I/sw/include/pygtk-2.0
-I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include
-I/sw/include/pango-1.0 -I/usr/X11R6/include
-I/usr/X11R6/include/freetype2 -I/sw/include/gtk-2.0
-I/sw/include/atk-1.0 -I/sw/lib/gtk-2.0/include
-I/sw/lib/freetype219/include -I/usr/local/include -I/usr/include
-I/sw/include -Isrc -Iswig -Iagg23/include -I.
-I/sw/lib/freetype219/include -I/usr/local/include -I/usr/include
-I/sw/include -Ifreetype2 -I/sw/lib/freetype219/include/freetype2
-I/usr/local/include/freetype2 -I/usr/include/freetype2
-I/sw/include/freetype2 -I/sw/lib/freetype219/include/freetype2
-I/usr/local/include/freetype2 -I/usr/include/freetype2
-I/sw/include/freetype2 -I/sw/include/glib-2.0/freetype2
-I/sw/lib/glib-2.0/include/freetype2 -I/sw/include/pygtk-2.0/freetype2
-I/sw/include/glib-2.0/freetype2 -I/sw/lib/glib-2.0/include/freetype2
-I/sw/include/pango-1.0/freetype2 -I/usr/X11R6/include/freetype2
-I/usr/X11R6/include/freetype2/freetype2
-I/sw/include/gtk-2.0/freetype2 -I/sw/include/atk-1.0/freetype2
-I/sw/lib/gtk-2.0/include/freetype2
-I/sw/lib/freetype219/include/freetype2 -I/usr/local/include/freetype2
-I/usr/include/freetype2 -I/sw/include/freetype2 -Isrc/freetype2
-Iswig/freetype2 -Iagg23/include/freetype2 -I./freetype2
-I/sw/lib/freetype219/include/freetype2 -I/usr/local/include/freetype2
-I/usr/include/freetype2 -I/sw/include/freetype2
-I/sw/lib/freetype219/include -I/usr/local/include -I/usr/include
-I/sw/include -Isrc -Iswig -Iagg23/include -I.
-I/sw/lib/freetype219/include -I/usr/local/include -I/usr/include
-I/sw/include -I/sw/include -I/sw/include -I/sw/include -I/sw/include
-I/sw/include/python2.4 -c src/ft2font.cpp -o
build/temp.darwin-7.9.0-Power_Macintosh-2.4/src/ft2font.o -DNUMARRAY=1
In file included from src/ft2font.h:13,
from src/ft2font.cpp:2:
/usr/X11R6/include/freetype2/freetype/ftglyph.h:104: error:
'FT_Library' is
used as a type, but is not defined as a type.
/usr/X11R6/include/freetype2/freetype/ftglyph.h:106: error:
'FT_Glyph_Format'
is used as a type, but is not defined as a type.
I can see from the comments in setupext.py
basedir = {
'win32' : ['win32_static',],
'linux2' : ['/usr/local', '/usr',],
'linux' : ['/usr/local', '/usr',],
# Charles Moad recommends not putting in /usr/X11R6 for darwin
# because freetype in this dir is too old for mpl
'darwin' : ['/sw/lib/freetype219', '/usr/local', '/usr', '/sw'],
that the freetype includes from Apple's X11R6 are probably bound to
fail and therefore
fink's freetype219 should be used, but despite this change the build
command ends up with
-I/usr/X11R6/include/freetype2 ahead of
-I/sw/lib/freetype219/include/freetype2 -
any ideas how to avoid this? This is on Panther, 10.3.9, btw, maybe
Tiger's X11 has a
freetype that works?
Also, several of the previous matplotlib packages would quietly fail
in the matplotlib
compilation, continue with building basemap and packaging only that
library, i.e.
they successfully built a dysfunctional package!
Since I accidentally deleted the last working
matplotlib-py24_0.80-1_darwin-powerpc.deb
during a fink cleanup, is there a sane way to get back to building at
least that version of
matplotlib? I feel rather lost without any matplotlib support in
python :-(...
Thanks,
Derek
Derek,
I have the same problem, and the maintainer told me off-list that he
also doesn't know why the X11 freetype libraries are being picked up. I
think he won't be able to get around to working on this for a while, so
I also tried reverting to the old verison you mentioned (except I used
py23). But that leads to the following problem when I start pylab:
% python2.3
Python 2.3.5 (#1, Apr 29 2005, 19:27:12)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/sw/lib/python2.3/site-packages/pylab.py", line 1, in ?
from matplotlib.pylab import *
File "/sw/lib/python2.3/site-packages/matplotlib/pylab.py", line 195,
in ?
from axes import Axes, PolarAxes
File "/sw/lib/python2.3/site-packages/matplotlib/axes.py", line 12,
in ?
from axis import XAxis, YAxis
File "/sw/lib/python2.3/site-packages/matplotlib/axis.py", line 20,
in ?
from font_manager import FontProperties
File "/sw/lib/python2.3/site-packages/matplotlib/font_manager.py",
line 991, in ?
fontManager = FontManager()
File "/sw/lib/python2.3/site-packages/matplotlib/font_manager.py",
line 835, in __init__
rebuild()
File "/sw/lib/python2.3/site-packages/matplotlib/font_manager.py",
line 828, in rebuild
self.ttfdict = createFontDict(self.ttffiles)
File "/sw/lib/python2.3/site-packages/matplotlib/font_manager.py",
line 467, in createFontDict
prop = ttfFontProperty(font)
File "/sw/lib/python2.3/site-packages/matplotlib/font_manager.py",
line 271, in ttfFontProperty
sfnt = font.get_sfnt()
RuntimeError: No SFNT name table
So it's failing in the font manager where freetype probably is supposed
to do its work... I didn't have time to investigate this further. My
system is also 10.3.9, and I have freetype219 and shlibs installed. If
you want the old deb file to try your luck, I can give you a download
location for matplotlib-py23_0.80-1...
Jens
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users