classification
Title: Failure building 64-bit Python on Leopard
Type: compile error Stage:
Components: macOS Versions: Python 2.6
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: anand, mark.dickinson, ronaldoussoren, rpetrov
Priority: normal Keywords:

Created on 2008-10-21 20:31 by anand, last changed 2009-03-04 23:01 by ronaldoussoren. This issue is now closed.

Files
File name Uploaded Description Edit
config.log anand, 2008-10-21 20:31
Messages (6)
msg75039 - (view) Author: Anand Patil (anand) Date: 2008-10-21 20:31
Configuring with 

sihpc03:Python-2.6 anand$ ./configure --with-framework-name=Python64 --
with-universal-archs=all --enable-framework --enable-
universalsdk=MACOSX_DEPLOYMENT_TARGET=10.5

on an Intel Mac Pro with the latest Leopard and Apple gcc 4.0, I get 
many errors like the following instructing me to report a bug. My 
config.log file is attached.

checking errno.h presence... yes
configure: WARNING: errno.h: present but cannot be compiled
configure: WARNING: errno.h:     check for missing prerequisite headers?
configure: WARNING: errno.h: see the Autoconf documentation
configure: WARNING: errno.h:     section "Present But Cannot Be 
Compiled"
configure: WARNING: errno.h: proceeding with the preprocessor's result
configure: WARNING: errno.h: in the future, the compiler will take 
precedence
configure: WARNING:     ## ---------------------------------------------
--- ##
configure: WARNING:     ## Report this to http://www.python.org/python-
bugs ##
configure: WARNING:     ## ---------------------------------------------
--- ##
msg75043 - (view) Author: Roumen Petrov (rpetrov) * Date: 2008-10-21 20:57
....
configure:5602: checking errno.h usability
configure:5619: gcc-4.0 -c -arch i386 -arch ppc -arch ppc64 -arch x86_64
-isysroot MACOSX_DEPLOYMENT_TARGET=10.5 -g -O2  conftest.c >&5
Binary file conftest.er1 matches
configure:5625: $? = 1
....

It is possible gcc to compile for multiple architectures at same time ?
msg75062 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-10-22 06:12
On 21 Oct, 2008, at 22:57, Roumen Petrov wrote:

>
> It is possible gcc to compile for multiple architectures at same  
> time ?

Yes. Apple's gcc driver knows how to deal with multiple -arch flags.
msg75074 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-10-22 09:43
> sihpc03:Python-2.6 anand$ ./configure --with-framework-name=Python64 --
> with-universal-archs=all --enable-framework --enable-
> universalsdk=MACOSX_DEPLOYMENT_TARGET=10.5

I think you want --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.5
msg75075 - (view) Author: Anand Patil (anand) Date: 2008-10-22 10:01
That worked, thanks Mark. make worked fine also, but make install failed 
at the end with

running install_egg_info
Writing 
/Library/Frameworks/Python64.framework/Versions/2.6/lib/python2.6/lib-
dynload/Python-2.6-py2.6.egg-info
ln -fs "../../../Python64" 
"/Library/Frameworks/Python64.framework/Versions/2.6/lib/python2.6/confi
g/libpython2.6.a"
cd Mac && make installmacsubtree DESTDIR=""
Creating directory 
/Library/Frameworks/Python64.framework/Versions/2.6/Mac/Tools
DYLD_FRAMEWORK_PATH=/Users/anand/Downloads/Python-2.6:  ../python.exe 
./scripts/cachersrc.py -v 
/Library/Frameworks/Python64.framework/Versions/2.6/lib/python2.6/plat-
mac /Library/Frameworks/Python64.framework/Versions/2.6/Mac/Tools
Traceback (most recent call last):
  File "./scripts/cachersrc.py", line 44, in <module>
    main()
  File "./scripts/cachersrc.py", line 41, in main
    os.path.walk(dir, handler, (verbose, force))
  File "./Lib/posixpath.py", line 224, in walk
    func(arg, top, names)
  File "./scripts/cachersrc.py", line 23, in handler
    macresource.open_pathname(os.path.join(dirname, fn), 
verbose=verbose)
  File "/Users/anand/Downloads/Python-2.6/Lib/plat-mac/macresource.py", 
line 81, in open_pathname
    refno = Res.FSpOpenResFile(pathname, 1)
AttributeError: 'module' object has no attribute 'FSpOpenResFile'
make[1]: *** [installmacsubtree] Error 1
make: *** [frameworkinstallmaclib] Error 2
sihpc03:Python-2.6 anand$
msg78783 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-01-02 11:43
I located the problem, it's in the configure line:

 ./configure --with-framework-name=Python64 --
with-universal-archs=all --enable-framework --enable-
universalsdk=MACOSX_DEPLOYMENT_TARGET=10.5

That's wrong because the argument for --enable-universalsdk should be a 
filesystem path for the SDK. In this case the following command-line 
will work:

./configure --with-framework-name=Python64 --
with-universal-archs=all --enable-framework --enable-
universalsdk=/
History
Date User Action Args
2009-03-04 23:01:28ronaldoussorensetstatus: pending -> closed
2009-01-02 11:43:17ronaldoussorensetstatus: open -> pending
resolution: works for me
messages: + msg78783
2008-10-22 10:01:13anandsetmessages: + msg75075
2008-10-22 09:43:29mark.dickinsonsetnosy: + mark.dickinson
messages: + msg75074
2008-10-22 06:12:25ronaldoussorensetmessages: + msg75062
2008-10-21 20:57:56rpetrovsetnosy: + rpetrov
messages: + msg75043
2008-10-21 20:44:54benjamin.petersonsetassignee: ronaldoussoren
nosy: + ronaldoussoren
2008-10-21 20:31:47anandcreate