Hi folks,
I've been attempting to install a 32-bit version of Python-2.6.4
on Snow Leopard 10.6.2. I'd like to install it from source (a
32-bit binary built for 10.3+ is at Python.org). Unfortunately,
I haven't yet figured out a way to get an accessible 32-bit
interpreter built on Snow Leopard.
I have the latest SL Xcode installed, including the 10.4 SDK.
Here's what I've tried.
Installing with the following configuration to build an
"intel" universal framework:
$ ./configure --prefix=/usr/local/tmp --enable-framework
--with-universal-archs=intel --enable-universalsdk=/
does indeed produce a universal Python with 32-bit (i386) and
64-bit (x86_64) versions in a bundle, but there is no way to
access the 32 bit executable (the defaults variable that Apple
implemented to provide access to 32-bit 2.6.1 is proprietary and
has no effect on non-Apple installations; the Python.org solution
is to install a separate python-32 executable but this was not
backported to 2.6.4).
So I've tried building an "all" universal binary, which should
produce ppc and intel versions of both bit-widths. This configure:
$ ./configure --prefix=/usr/local/tmp --with-universal-archs=all
--enable-universalsdk=/
produces an error during the configure:
..
checking for wchar.h... yes
checking for wchar_t... yes
checking size of wchar_t... configure: error: cannot compute sizeof (wchar_t)
See `config.log' for more details.
The config.log indicates a problem building ppc64 libraries while
linking one of the conftest programs (many "missing required architecture
ppc64 in file" messages).
So I've tried just building a 32-bit universal framework (I cannot
see from the docs any way to build just a 32-bit i386 build):
$ ./configure --prefix=/usr/local/tmp --enable-framework
--with-framework-name=Python32 --enable-universalsdk --with-
universal-archs=32-bit
(By the way, this produces a config error if I set
MACOSX_DEPLOYMENT_TARGET=10.6,
but not if I don't set the target.) In this case "make" immediately
fails with errors compiling Modules/python.c:
-----
gcc -c -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -fno-common -dynamic -
DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include
-DPy_BUILD_CORE -o Modules/python.o
./Modules/python.c
In file included from Include/Python.h:58,
from ./Modules/python.c:3:
Include/pyport.h:480: warning: struct winsize declared inside parameter list
Include/pyport.h:481: warning: struct winsize declared inside parameter list
In file included from Include/unicodeobject.h:4,
from Include/Python.h:85,
from ./Modules/python.c:3:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No
such file or directory
In file included from Include/Python.h:58,
from ./Modules/python.c:3:
Include/pyport.h:480: warning: struct winsize declared inside parameter list
Include/pyport.h:481: warning: struct winsize declared inside parameter list
In file included from Include/unicodeobject.h:4,
from Include/Python.h:85,
from ./Modules/python.c:3:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No
such file or directory
lipo: can't figure out the architecture type of:
/var/folders/Hv/Hvx6V3reHlqGUIlS1r9NS++++TI/-Tmp-//ccbAkLni.out
make: *** [Modules/python.o] Error 1
-----
The offending line in the 10.4sdk stdarg.h is:
#include_next <stdarg.h>
I don't know what this does, and thus have no clue how to diagnose
why the stdarg.h it is looking for cannot be found.
Any clues?
Also, is there a way to build i386 without building ppc-32?
Thanks,
Tom
PS: What is the role of MACOSX_DEPLOYMENT_TARGET? Was it only a
one-time fix for Leopard installs that should be disregarded post-Leopard?
I ask because NumPy does a check on its value. I don't think
the check is consequential, but to avoid warning messages NumPy
installers are encouraged to set MACOSX_DEPLOYMENT_TARGET=10.6 for
Snow Leopard when installing NumPy. I thought this was "inherited"
from Python itself.
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG