[MacPorts] #20284: python26 fails to build on 10.6

MacPorts noreply at macports.org
Fri Aug 28 12:35:02 PDT 2009


#20284: python26 fails to build on 10.6
------------------------------+---------------------------------------------
 Reporter:  snc@…             |       Owner:  blb@…           
     Type:  defect            |      Status:  new             
 Priority:  Low               |   Milestone:                  
Component:  ports             |     Version:  1.8.0           
 Keywords:  snowleopard       |        Port:  python26        
------------------------------+---------------------------------------------

Comment(by mattias@…):

 Ok I have found the problem, the bug is an upstream bug in python and the
 problem is line 461 in the Makefile for python, it looks something like
 this:


 {{{
 -lSystem -lSystemStubs -arch_only i386 -install_name
 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
 -compatibility_version $(V     ERSION) -current_version $(VERSION) ;
 }}}


 This means libtool is instructed to ONLY accept a python.o file in the
 i386 binary format, while what we are compiling is a x86_64 binary.
 If you change that line to:


 {{{
 -lSystem -lSystemStubs -arch_only x86_64 -install_name
 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
 -compatibility_version $(V     ERSION) -current_version $(VERSION) ;
 }}}


 However this will not solve it all, it will break things as I now get this
 error from macports:


 {{{
 running install_egg_info
 Writing
 //opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /lib-dynload/Python-2.6.2-py2.6.egg-info
 ln -fs "../../../Python"
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config/libpython2.6.a"
 cd Mac && /usr/bin/make CC=/usr/bin/gcc-4.2 installmacsubtree
 DESTDIR="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot"
 Creating directory
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Mac/Tools
 DYLD_FRAMEWORK_PATH=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.2:
 ../python.exe ./scripts/cachersrc.py -v
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /plat-mac
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/destroot/opt/local/Library/Frameworks/Python.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
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.2/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

     while executing
 "command_exec destroot"
     (procedure "portdestroot::destroot_main" line 2)
     invoked from within
 "$procedure $targetname"
 Warning: the following items did not execute (for python26):
 org.macports.activate org.macports.destroot org.macports.install
 Error: The following dependencies failed to build: python26
 Error: Status 1 encountered during processing.
 }}}

 Also changed the configure.args section in the Portfile to include
 "--with-universal-archs=64-bit"

 I will continue to look into this.

-- 
Ticket URL: <http://trac.macports.org/ticket/20284#comment:30>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list