[Pythonmac-SIG] Trouble building against Tkinter on 64-bit python.org python
Russell E. Owen
rowen at uw.edu
Wed Oct 12 23:29:36 CEST 2011
I'm on MacOS X 10.6.8 using 64-bit Python 2.7.2 from python.org (the
10.6 version) and ActiveState Tcl/Tk 8.5.10.
I would like to build matplotlib 1.1.0 (in fact I'd like to build an
official binary installer) and am running into problems. The build and
install goes fine, though with a few odd messages (see appended log).
But importing pylab rusults in:
objc[1083]: Class TKApplication is implemented in both
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and
/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two
will be used. Which one is undefined.
objc[1083]: Class TKMenu is implemented in both
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and
/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two
will be used. Which one is undefined.
objc[1083]: Class TKContentView is implemented in both
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and
/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two
will be used. Which one is undefined.
objc[1083]: Class TKWindow is implemented in both
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and
/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two
will be used. Which one is undefined.
Any idea how to deal with this? Google turned up others with this
problem but no obvious solution.
-- Russell
P.S. partial log of build (not install) of matplotlib:
Edit setupext.py to point it to Apple's built-in libraries, plus include
/usr/local (which doesn't have a lot in it --nothing in lib or includes):
'darwin' : ['/usr/local', '/usr', '/usr/X11'],
$ python setup.py build
BUILDING MATPLOTLIB
???????????matplotlib: 1.1.0
???????????????python: 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
???????????????????????[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
?????????????platform: darwin
REQUIRED DEPENDENCIES
????????????????numpy: 1.6.1
????????????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.5, Tcl: 8.5
?????????????????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: 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.tri',
'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo']
running build
running build_py
...
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
-g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-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/include -I/usr/X11/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/include -I/usr/X11/include -I.
-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/include/freetype2 -I/usr/X11/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/include/freetype2
-I/usr/X11/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.6-intel-2.7/src/agg_py_transforms.o -framework Tcl
-framework Tk
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
-g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-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/include -I/usr/X11/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/include -I/usr/X11/include -I.
-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/include/freetype2 -I/usr/X11/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/include/freetype2
-I/usr/X11/include/freetype2 -I./freetype2
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c
src/_tkagg.cpp -o build/temp.macosx-10.6-intel-2.7/src/_tkagg.o
-framework Tcl -framework Tk
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
-g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-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/include -I/usr/X11/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/include -I/usr/X11/include -I.
-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/include/freetype2 -I/usr/X11/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/include/freetype2
-I/usr/X11/include/freetype2 -I./freetype2
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c
CXX/cxx_extensions.cxx -o
build/temp.macosx-10.6-intel-2.7/CXX/cxx_extensions.o -framework Tcl
-framework Tk
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
-g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-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/include -I/usr/X11/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/include -I/usr/X11/include -I.
-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/include/freetype2 -I/usr/X11/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/include/freetype2
-I/usr/X11/include/freetype2 -I./freetype2
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c
CXX/cxxsupport.cxx -o build/temp.macosx-10.6-intel-2.7/CXX/cxxsupport.o
-framework Tcl -framework Tk
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
-g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-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/include -I/usr/X11/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/include -I/usr/X11/include -I.
-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/include/freetype2 -I/usr/X11/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/include/freetype2
-I/usr/X11/include/freetype2 -I./freetype2
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c
CXX/IndirectPythonInterface.cxx -o
build/temp.macosx-10.6-intel-2.7/CXX/IndirectPythonInterface.o
-framework Tcl -framework Tk
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
-g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-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/include -I/usr/X11/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/include -I/usr/X11/include -I.
-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/include/freetype2 -I/usr/X11/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/include/freetype2
-I/usr/X11/include/freetype2 -I./freetype2
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c
CXX/cxxextensions.c -o
build/temp.macosx-10.6-intel-2.7/CXX/cxxextensions.o -framework Tcl
-framework Tk
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because
linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused
because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because
linking not done
c++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk
-g build/temp.macosx-10.6-intel-2.7/src/agg_py_transforms.o
build/temp.macosx-10.6-intel-2.7/src/_tkagg.o
build/temp.macosx-10.6-intel-2.7/CXX/cxx_extensions.o
build/temp.macosx-10.6-intel-2.7/CXX/cxxsupport.o
build/temp.macosx-10.6-intel-2.7/CXX/IndirectPythonInterface.o
build/temp.macosx-10.6-intel-2.7/CXX/cxxextensions.o -L/usr/lib
-L/usr/X11/lib -L/usr/lib -L/usr/X11/lib -lstdc++ -lm -lfreetype -lz
-lstdc++ -lm -o
build/lib.macosx-10.6-intel-2.7/matplotlib/backends/_tkagg.so -framework
Tcl -framework Tk
building 'matplotlib.backends._macosx' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
-g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pa
ckages/numpy/core/include -I/usr/include -I/usr/X11/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.6-intel-2.7/src/_macosx.o
src/_macosx.m: In function ?FigureManager_init?:
src/_macosx.m:3755: warning: class 'View' does not implement the
'NSWindowDelegate' protocol
src/_macosx.m: In function ?FigureManager_init?:
src/_macosx.m:3755: warning: class 'View' does not implement the
'NSWindowDelegate' protocol
More information about the Pythonmac-SIG
mailing list