mac osx 10.6 matplotlib installation error: "lipo: can't open input file: /var/tmp//*.out"

Dear Matplotlib users
My apologies if this question is a bit simple, but I am new to Python, but I think I've done all the RTFM things and still hit a brick wall. I can see from Google that I am not the first to strike this problem, but no solutions seem to be posted.

I am trying to install matplotlib on a Mac OSX 10.6 (Snow Leopard)(OS fully up to date).
When I try to install, I get the error message:

lipo: can't open input file: /var/tmp//cctV2zuc.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

(full session messages are pasted at the end of this post)

I reach this same point via a variety of varied different installation strategies, which I have documented and outlined below.
Any assistance or guidance would be gratefully received.

With many thanks

Leslie Burnett
Sydney University

···

===

System:
Mac OSX 10.6.6
Xcode installed and up to date
Python 2.6.1 (Apple)

Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin

NumPy installed OK (so I think I have mastered the process of "python setup.py build" and "... install")

===

Pathways leading to the error message:

I obtained Matplotlib from the matplotlib home page download link to sourceforge

a) mpkg/dmg installation 1.0.1-r0 fails with message "can't be installed on this disk. matplotlib requires System Python 2.6 to install"

b) matplotlib-1.0.1.tar, then cd to tar directory, then "sudo python setup.py build" fails with the missing *.out error message above.

c) easy-install using "sudo sh setuptools-0.6c11-py2.6.egg" fails with same missing *.out error message

===

I have tried this on two different Macs, with same outcome and same error messages.
I have also searched the matplotlib archives ditto Google for this problem. I can see others have encountered it, but noone seems to have posted a solution.

===
Here is the full terminal transcript of the attempted build. Firstly the directory listing, then the build messages:

matplotlib-1.0.1 user$ ls
CHANGELOG MANIFEST.in __init__.py lib setup.py ttconv
CXX Makefile agg24 license setupegg.py
INSTALL PKG-INFO build make.osx setupext.py
INTERACTIVE README.txt doc matplotlibrc.template setupext.pyc
KNOWN_BUGS TODO examples setup.cfg.template src

matplotlib-1.0.1 user$ sudo python setup.py build
Password:*******
basedirlist is:

BUILDING MATPLOTLIB
            matplotlib: 1.0.1
                python: 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC
                        4.2.1 (Apple Inc. build 5646)]
              platform: darwin

REQUIRED DEPENDENCIES
                 numpy: 1.2.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: 67083, 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: present, version unknown
                  pytz: matplotlib will provide
adding pytz

OPTIONAL USETEX DEPENDENCIES
                dvipng: no
           ghostscript: /bin/sh: gs: command not found
                 latex: no

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.6-universal-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.macosx-10.6-universal-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.ft2font' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/core/include -I. -I/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/core/include/freetype2 -I./freetype2 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/ft2font.cpp -o build/temp.macosx-10.6-universal-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:14:22: error: ft2build.h: No such file or directory
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>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:1:
src/ft2font.h:33: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:33: error: ‘FT_Int’ has not been declared
src/ft2font.h:33: error: ‘FT_Int’ has not been declared
src/ft2font.h:89: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:89: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:95: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:95: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:137: error: ‘FT_Face’ does not name a type
src/ft2font.h:138: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:139: error: ‘FT_Vector’ does not name a type
src/ft2font.h:140: error: ‘FT_Error’ does not name a type
src/ft2font.h:141: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:141: error: template argument 1 is invalid
src/ft2font.h:141: error: template argument 2 is invalid
src/ft2font.h:142: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:142: error: template argument 1 is invalid
src/ft2font.h:142: error: template argument 2 is invalid
src/ft2font.h:148: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:45: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:108: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:108: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:108: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:109: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:110: error: ‘FT_Int’ was not declared in this scope
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:958: 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:14:22: error: ft2build.h: No such file or directory
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>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:1:
src/ft2font.h:33: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:33: error: ‘FT_Int’ has not been declared
src/ft2font.h:33: error: ‘FT_Int’ has not been declared
src/ft2font.h:89: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:89: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:95: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:95: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:137: error: ‘FT_Face’ does not name a type
src/ft2font.h:138: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:139: error: ‘FT_Vector’ does not name a type
src/ft2font.h:140: error: ‘FT_Error’ does not name a type
src/ft2font.h:141: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:141: error: template argument 1 is invalid
src/ft2font.h:141: error: template argument 2 is invalid
src/ft2font.h:142: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:142: error: template argument 1 is invalid
src/ft2font.h:142: error: template argument 2 is invalid
src/ft2font.h:148: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:45: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:108: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:108: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:108: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:109: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:110: error: ‘FT_Int’ was not declared in this scope
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:958: 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:14:22: error: ft2build.h: No such file or directory
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>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:1:
src/ft2font.h:33: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:33: error: ‘FT_Int’ has not been declared
src/ft2font.h:33: error: ‘FT_Int’ has not been declared
src/ft2font.h:89: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:89: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:95: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:95: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:137: error: ‘FT_Face’ does not name a type
src/ft2font.h:138: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:139: error: ‘FT_Vector’ does not name a type
src/ft2font.h:140: error: ‘FT_Error’ does not name a type
src/ft2font.h:141: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:141: error: template argument 1 is invalid
src/ft2font.h:141: error: template argument 2 is invalid
src/ft2font.h:142: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:142: error: template argument 1 is invalid
src/ft2font.h:142: error: template argument 2 is invalid
src/ft2font.h:148: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:45: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:108: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:108: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:108: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:109: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:110: error: ‘FT_Int’ was not declared in this scope
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:958: warning: ‘int _import_array()’ defined but not used
lipo: can't open input file: /var/tmp//ccX1tCpD.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1

On a fully updated Mac OSX 10.6.6 the installation of
http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/matplotlib-1.0.0.tar.gz/download
did work for me.

···

Am 15.01.2011 um 12:07 schrieb Leslie Burnett:

My apologies if this question is a bit simple, but I am new to Python, but I think I've done all the RTFM things and still hit a brick wall. I can see from Google that I am not the first to strike this problem, but no solutions seem to be posted.
I am trying to install matplotlib on a Mac OSX 10.6 (Snow Leopard)(OS fully up to date).
When I try to install, I get the error message:

lipo: can't open input file: /var/tmp//cctV2zuc.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

--
kurt.alfred.mueller@...287...

Thank you. You are correct. The matplotlib version 1.0.0 works for me too!

I will post this reply so that others can be aware that the problem seems to be only with matplotlib version 1.0.1.
The previous version matplotlib 1.0.0 works ok with Mac OS X 10.6.6 Snow Leopard and Apple Python 2.6.1

···

On 15/01/2011, at 11:04 PM, Kurt Mueller wrote:

Am 15.01.2011 um 12:07 schrieb Leslie Burnett:

My apologies if this question is a bit simple, but I am new to Python, but I think I've done all the RTFM things and still hit a brick wall. I can see from Google that I am not the first to strike this problem, but no solutions seem to be posted.
I am trying to install matplotlib on a Mac OSX 10.6 (Snow Leopard)(OS fully up to date).
When I try to install, I get the error message:

lipo: can't open input file: /var/tmp//cctV2zuc.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

On a fully updated Mac OSX 10.6.6 the installation of
Download matplotlib-1.0.0.tar.gz (matplotlib)
did work for me.

--
kurt.alfred.mueller@...287...

**update** matplotlib 1.0.0 setup worked on one but did not work on a second Mac OS X 10.6.6. The second one again failed with a missing dependency. It seems to depend on what previous packages may have been installed.

The following seems to be a complete fix:

1. On Mac OS X 10.6.x (in my case...6)
2. Install Apple Xcode (requires registration as an Apple developer)
3. Install MacPorts http://www.macports.org/
4. Check that all library dependencies for matplotlib in Python 2.6 have been satisfied by first running (with Administrator privileges):
  sudo port install py26-matplotlib
(this will use MacPorts script to install matplotlib 1.0.0)

5. (optional) you can reinstall now matplotlib from Download matplotlib-1.0.0.tar.gz (matplotlib)

**now** it works :slight_smile:

PS note to matplotlib developers. The above may suggest that matplotlib may have a dependency that is not present on a virgin OSX Xcode machine but which is incidentally installed by some other package usually present on a developer's machine and so whose absence is not noticed when preparing the installation script.

···

On 16/01/2011, at 10:22 AM, Leslie Burnett wrote:

Thank you. You are correct. The matplotlib version 1.0.0 works for me too!

I will post this reply so that others can be aware that the problem seems to be only with matplotlib version 1.0.1.
The previous version matplotlib 1.0.0 works ok with Mac OS X 10.6.6 Snow Leopard and Apple Python 2.6.1

On 15/01/2011, at 11:04 PM, Kurt Mueller wrote:

Am 15.01.2011 um 12:07 schrieb Leslie Burnett:

My apologies if this question is a bit simple, but I am new to Python, but I think I've done all the RTFM things and still hit a brick wall. I can see from Google that I am not the first to strike this problem, but no solutions seem to be posted.
I am trying to install matplotlib on a Mac OSX 10.6 (Snow Leopard)(OS fully up to date).
When I try to install, I get the error message:

lipo: can't open input file: /var/tmp//cctV2zuc.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

On a fully updated Mac OSX 10.6.6 the installation of
Download matplotlib-1.0.0.tar.gz (matplotlib)
did work for me.

--
kurt.alfred.mueller@...287...