[issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter
Sridhar Ratnakumar
report at bugs.python.org
Mon Jun 28 22:32:29 CEST 2010
Sridhar Ratnakumar <sridharr at activestate.com> added the comment:
I tried patching setup.py to force linking to Apple's Tcl/Tk:
--- python/setup.py.original 2010-06-28 11:40:26.000000000 -0700
+++ python/setup.py 2010-06-28 11:45:39.000000000 -0700
@@ -1682,6 +1682,15 @@
for F in framework_dirs:
# both Tcl.framework and Tk.framework should be present
+ # When building for 64-bit (presumably on 10.6, with 10.5 SDK),
+ # skip the SDK Tcl/Tk and instead use the one on /System/Library
+ # which is Apple's Tcl/Tk 8.5 with 64-bit.
+ if PT_CONFIG_mac_64bit:
+ F = '/System/Library/Frameworks/' # force Apple's one
+ for fw in 'Tcl', 'Tk':
+ if not exists(join(F, fw + '.framework')):
+ raise IOError('No %s found in %s' % (fw, F))
+ break
for fw in 'Tcl', 'Tk':
if is_macosx_sdk_path(F):
But unfortunately, even though we use 8.5 header files ... the link line uses `-isysroot`, thereby linking to 8.4:
gcc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -isysroot /Developer/SDKs/MacOSX10.5.sdk/ build/temp.macosx-10.5-intel-2.7/Users/sridharr/as/apy/trunk/build/pyhg_trunk-macosx-hgtip27/python/Modules/_tkinter.o build/temp.macosx-10.5-intel-2.7/Users/sridharr/as/apy/trunk/build/pyhg_trunk-macosx-hgtip27/python/Modules/tkappinit.o -L/Library/Frameworks/Python.framework/Versions/2.7/lib -o build/lib.macosx-10.5-intel-2.7/_tkinter.so -framework Tcl -framework Tk
ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks//Tk.framework/Tk, missing required architecture x86_64 in file
*** WARNING: renaming "_tkinter" since importing it failed: dlopen(build/lib.macosx-10.5-intel-2.7/_tkinter.so, 2): Symbol not found: _Tk_GetNumMainWindows
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9045>
_______________________________________
More information about the Python-bugs-list
mailing list