Hi Everyone,
I am attempting to compile matplotlib against a 64 bit version of
Python 2.6 compiled and installed from source on OSX 10.6 (Snow
Leopard).
Numpy, scipy, freetype2 and libpng have been installed and work just
fine, however I cannot get matplotlib to compile correctly.
I get the following output:
matplotlib-0.99.1.1 $ sudo python setup.py install
============================================================================
BUILDING MATPLOTLIB
matplotlib: 0.99.1.1
python: 2.6.5 (r265:79063, May 25 2010, 11:45:36) [GCC
4.2.1 (Apple Inc. build 5659)]
platform: darwin
REQUIRED DEPENDENCIES
numpy: 1.4.1
freetype2: found, but unknown version (no pkg-config)
* WARNING: Could not find 'freetype2' headers in any
* of '.', './freetype2'.
OPTIONAL BACKEND DEPENDENCIES
libpng: found, but unknown version (no pkg-config)
* Could not find 'libpng' headers in any of '.'
Tkinter: Tkinter: 73770, Tk: 8.5, Tcl: 8.5
wxPython: no
* wxPython not found
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: yes
Qt: no
Qt4: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: matplotlib will provide
pytz: matplotlib will provide
adding pytz
OPTIONAL USETEX DEPENDENCIES
dvipng: 1.12
ghostscript: 8.70
latex: 3.1415926
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends',
'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d',
'mpl_toolkits.axes_grid', 'matplotlib.sphinxext',
'matplotlib.numerix', 'matplotlib.numerix.mlab',
'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra',
'matplotlib.numerix.random_array', 'matplotlib.numerix.fft',
'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
running install
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.macosx-10.6-intel-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf ->
build/lib.macosx-10.6-intel-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.ft2font' extension
gcc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API
-I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include
-I.
-I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/freetype2
-I./freetype2
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-c src/ft2font.cpp -o build/temp.macosx-10.6-intel-2.6/src/ft2font.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
In file included from src/ft2font.cpp:1:
src/ft2font.h:13:22: error: ft2build.h: No such file or directory
src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:1:
src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:31: error: ‘FT_Int’ has not been declared
src/ft2font.h:31: error: ‘FT_Int’ has not been declared
src/ft2font.h:77: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:77: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:83: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:83: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:122: error: ‘FT_Face’ does not name a type
src/ft2font.h:123: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:124: error: ‘FT_Vector’ does not name a type
src/ft2font.h:125: error: ‘FT_Error’ does not name a type
src/ft2font.h:126: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:126: error: template argument 1 is invalid
src/ft2font.h:126: error: template argument 2 is invalid
src/ft2font.h:127: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:127: error: template argument 1 is invalid
src/ft2font.h:127: error: template argument 2 is invalid
src/ft2font.h:133: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:45: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:96: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:96: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:96: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:97: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:98: error: ‘FT_Int’ was not declared in this scope
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1187:
warning: ‘int _import_array()’ defined but not used
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
In file included from src/ft2font.cpp:1:
src/ft2font.h:13:22: error: ft2build.h: No such file or directory
src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:1:
src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:31: error: ‘FT_Int’ has not been declared
src/ft2font.h:31: error: ‘FT_Int’ has not been declared
src/ft2font.h:77: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:77: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:83: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:83: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:122: error: ‘FT_Face’ does not name a type
src/ft2font.h:123: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:124: error: ‘FT_Vector’ does not name a type
src/ft2font.h:125: error: ‘FT_Error’ does not name a type
src/ft2font.h:126: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:126: error: template argument 1 is invalid
src/ft2font.h:126: error: template argument 2 is invalid
src/ft2font.h:127: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:127: error: template argument 1 is invalid
src/ft2font.h:127: error: template argument 2 is invalid
src/ft2font.h:133: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:45: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:96: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:96: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:96: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:97: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:98: error: ‘FT_Int’ was not declared in this scope
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1187:
warning: ‘int _import_array()’ defined but not used
lipo: can't figure out the architecture type of: /var/tmp//ccrnooej.out
error: command 'gcc' failed with exit status 1
It seems that freetype2 is not found which I tried to remedy by adding
the following lines to the check_freetype function in setupext.py
module.include_dirs.append('/usr/local/include')
module.include_dirs.append('/usr/local/include/freetype2')
This removes the warning about the header files but the compiling
error remains (the pkg-config warning also remains).
Any suggestions?
Kind regards,
Pim Schellart
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users