Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#22367 closed defect (invalid)

python26 +universal does not build 32-bits in SL

Reported by: orez.org@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: python, snowleopard Cc:
Port: python26

Description

python26 was build with the universal method:

$ sudo port install python26 +universal
--->  Computing dependencies for python26
--->  Fetching python26
--->  Attempting to fetch Python-2.6.4.tar.bz2 from http://www.python.org//ftp/python/2.6.4/
--->  Verifying checksum(s) for python26
--->  Extracting python26
--->  Applying patches to python26
--->  Configuring python26
--->  Building python26
--->  Staging python26 into destroot
--->  Installing python26 @2.6.4_0+darwin+universal
--->  Activating python26 @2.6.4_0+darwin+universal
$ file /opt/local/bin/python2.6
/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

but still is 64-bits:

$ arch -i386 python
Python 2.6.4 (r264:75706, Nov  4 2009, 18:31:32) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; sys.maxint
9223372036854775807

this "arch trick" works with Apple's python

enigma:~ lup$ arch -i386 /System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; sys.maxint
2147483647
>>> ^D
$ /System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; sys.maxint
9223372036854775807
>>> 

this prevents me from loading 32-bits libraries using ctypes.

Change History (3)

comment:1 Changed 15 years ago by Veence (Vincent)

Resolution: invalid
Status: newclosed

/opt/local/bin/python2.6 is a kind of front-end to: /opt/local/frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python. Try

arch -i386 /opt/local/frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python

It should work.

comment:2 Changed 15 years ago by orez.org@…

worked with

$ arch -i386 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Python 2.6.4 (r264:75706, Nov  4 2009, 18:31:32) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; sys.maxint
2147483647
>>> 

thanks!

comment:3 Changed 15 years ago by blb@…

Note: See TracTickets for help on using tickets.