Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build 1.2.0rc1 for 32-bit Mac python #1270

Closed
r-owen opened this issue Sep 17, 2012 · 2 comments
Closed

Cannot build 1.2.0rc1 for 32-bit Mac python #1270

r-owen opened this issue Sep 17, 2012 · 2 comments

Comments

@r-owen
Copy link
Contributor

r-owen commented Sep 17, 2012

1.2.0rc1 builds fine on Mac OS X for 64-bit python.org python, but when I try to build it for 32-bit python.org python (which requires an old compiler) I get the appended errors.

Erik Firing suggested it is failing on code introduced with PR #1036.

I hope somebody can fix this. Otherwise we may have to abandon Mac compatibility with one of the two python.org Mac pythons. That said, it is conceivable that building for Mac OS X 10.5 or later would make it work. I will try that if necessary.

$ python setup.py build
basedirlist is: ['/usr/local/', '/usr', '/usr/X11']
=========================================================================
===
BUILDING MATPLOTLIB
           matplotlib: 1.2.0rc1
               python: 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 14:13:39)
                       [GCC 4.0.1 (Apple Inc. build 5493)]
             platform: darwin

REQUIRED DEPENDENCIES
                numpy: 1.6.2
            freetype2: found, but unknown version (no pkg-config)

OPTIONAL BACKEND DEPENDENCIES
               libpng: found, but unknown version (no pkg-config)
              Tkinter: Tkinter: version not identified, Tk: 8.4, Tcl: 8.4
                 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
               PySide: no
                Cairo: no

OPTIONAL DATE/TIMEZONE DEPENDENCIES
             dateutil: matplotlib will provide
                 pytz: matplotlib will provide
adding pytz

OPTIONAL USETEX DEPENDENCIES
               dvipng: no
          ghostscript: /bin/sh: line 1: 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.tri', 
'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo']
running build
running build_py
creating build
creating build/lib.macosx-10.3-fat-2.7
copying lib/pylab.py -> build/lib.macosx-10.3-fat-2.7
creating build/lib.macosx-10.3-fat-2.7/matplotlib
copying lib/matplotlib/__init__.py -> 
build/lib.macosx-10.3-fat-2.7/matplotlib
...
copying lib/dateutil_py2/zoneinfo/zoneinfo-2010g.tar.gz -> 
build/lib.macosx-10.3-fat-2.7/dateutil/zoneinfo
running build_ext
building 'matplotlib.ft2font' extension
creating build/temp.macosx-10.3-fat-2.7
creating build/temp.macosx-10.3-fat-2.7/src
creating build/temp.macosx-10.3-fat-2.7/CXX
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -g -O2 -DNDEBUG -g 
-O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 
-I/usr/local/include -I/usr/include -I/usr/X11/include 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include -I/usr/local/include -I/usr/include -I. 
-I/usr/local/include/freetype2 -I/usr/include/freetype2 
-I/usr/X11/include/freetype2 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include/freetype2 -I/usr/local/include/freetype2 
-I/usr/include/freetype2 -I./freetype2 
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
src/ft2font.cpp -o build/temp.macosx-10.3-fat-2.7/src/ft2font.o
...
building 'matplotlib.backends._tkagg' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -g -O2 -DNDEBUG -g 
-O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 
-I/usr/local/include -I/usr/include -I/usr/X11/include 
-I/Library/Frameworks/Tcl.framework/Headers 
-I/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders 
-I/Library/Frameworks/Tk.framework/Headers 
-I/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders 
-I/usr/local/include -I/usr/include -I. 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include -Isrc -Iagg24/include -I. 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include -I/usr/local/include -I/usr/include -I. 
-I/usr/local/include/freetype2 -I/usr/include/freetype2 
-I/usr/X11/include/freetype2 
-I/Library/Frameworks/Tcl.framework/Headers/freetype2 
-I/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders/freet
ype2 -I/Library/Frameworks/Tk.framework/Headers/freetype2 
-I/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders/freety
pe2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 
-I./freetype2 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include/freetype2 -Isrc/freetype2 
-Iagg24/include/freetype2 -I./freetype2 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include/freetype2 -I/usr/local/include/freetype2 
-I/usr/include/freetype2 -I./freetype2 
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
src/agg_py_transforms.cpp -o 
build/temp.macosx-10.3-fat-2.7/src/agg_py_transforms.o -framework Tcl 
-framework Tk
powerpc-apple-darwin8-gcc-4.0.1: -framework: linker input file unused 
because linking not done
powerpc-apple-darwin8-gcc-4.0.1: Tcl: linker input file unused because 
linking not done
powerpc-apple-darwin8-gcc-4.0.1: -framework: linker input file unused 
because linking not done
powerpc-apple-darwin8-gcc-4.0.1: Tk: linker input file unused because 
linking not done
i686-apple-darwin8-gcc-4.0.1: -framework: linker input file unused 
because linking not done
i686-apple-darwin8-gcc-4.0.1: Tcl: linker input file unused because 
linking not done
i686-apple-darwin8-gcc-4.0.1: -framework: linker input file unused 
because linking not done
i686-apple-darwin8-gcc-4.0.1: Tk: linker input file unused because 
linking not done
...(five more compiles with these same warnings elided)...
c++ -bundle -undefined dynamic_lookup -arch ppc -arch i386 -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -g 
build/temp.macosx-10.3-fat-2.7/src/agg_py_transforms.o 
build/temp.macosx-10.3-fat-2.7/src/_tkagg.o 
build/temp.macosx-10.3-fat-2.7/CXX/cxx_extensions.o 
build/temp.macosx-10.3-fat-2.7/CXX/cxxsupport.o 
build/temp.macosx-10.3-fat-2.7/CXX/IndirectPythonInterface.o 
build/temp.macosx-10.3-fat-2.7/CXX/cxxextensions.o -L/usr/local/lib 
-L/usr/lib -L/usr/local/lib -L/usr/lib -lstdc++ -lm -lfreetype -lz 
-lstdc++ -lm -o 
build/lib.macosx-10.3-fat-2.7/matplotlib/backends/_tkagg.so -framework 
Tcl -framework Tk
building 'matplotlib.backends._macosx' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -g -O2 -DNDEBUG -g 
-O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 
-I/usr/local/include -I/usr/include -I/usr/X11/include 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include -I/usr/local/include -I/usr/include -I. 
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include -Isrc -Iagg24/include -I. 
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
src/_macosx.m -o build/temp.macosx-10.3-fat-2.7/src/_macosx.o
src/_macosx.m: In function 'show':
src/_macosx.m:5763: error: nested functions are disabled, use 
-fnested-functions to re-enable
src/_macosx.m:5763: error: syntax error before 'in'
src/_macosx.m: At top level:
src/_macosx.m:5768: error: parse error before 'PyObject'
src/_macosx.m: In function 'show':
src/_macosx.m:5763: error: nested functions are disabled, use 
-fnested-functions to re-enable
src/_macosx.m:5763: error: syntax error before 'in'
src/_macosx.m: At top level:
src/_macosx.m:5768: error: parse error before 'PyObject'
lipo: can't figure out the architecture type of: /var/tmp//ccI9WUN2.out
error: command 'gcc-4.0' failed with exit status 1
d-173-250-206-120:/Archives/PythonPackages/matplotlib-1.2.0rc1
@dmcdougall
Copy link
Member

I said it in an email to mpl-devel and I'll repeat it here for completeness.

The show method in _macosx.m uses the Objective-C 2.0 construct:

for (NSWindow *window in [NSApp windows]) {

gcc 4.0 does not support objective c 2.0. I will create a PR to fix the issue. Watch this space.

@dmcdougall
Copy link
Member

This can be closed now. PR #1272 resolved it.

@mdboom mdboom closed this as completed Sep 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants