#28703: Python 2.6 (Universal) does not honor 'arch -i386' command at runtime -----------------------------+---------------------------------------------- Reporter: tcwan@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: -----------------------------+---------------------------------------------- I have built Python 2.6 and 2.7 with +universal. I need to execute 32-bit Python for a specific module. tcmac$ file /opt/local/bin/python2.* /opt/local/bin/python2.6: Mach-O universal binary with 2 architectures /opt/local/bin/python2.6 (for architecture x86_64): Mach-O 64-bit executable x86_64 /opt/local/bin/python2.6 (for architecture i386): Mach-O executable i386 /opt/local/bin/python2.6-config: a /opt/local/Library/Frameworks/P script text executable /opt/local/bin/python2.7: Mach-O universal binary with 2 architectures /opt/local/bin/python2.7 (for architecture x86_64): Mach-O 64-bit executable x86_64 /opt/local/bin/python2.7 (for architecture i386): Mach-O executable i386 /opt/local/bin/python2.7-config: a /opt/local/Library/Frameworks/P script text executable However, when using the arch command to specify the runtime architecture, only Python 2.7 honors this, it does not work with Python 2.6. tcmac$ arch -i386 /opt/local/bin/python2.6 Python 2.6.6 (r266:84292, Mar 4 2011, 09:28:43) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import sys print sys.maxsize 9223372036854775807
tcmac$ arch -i386 /opt/local/bin/python2.7 Python 2.7.1 (r271:86832, Mar 1 2011, 09:22:53) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import sys print sys.maxsize 2147483647
-- Ticket URL: <https://trac.macports.org/ticket/28703> MacPorts <http://www.macports.org/> Ports system for Mac OS