Fail to build python2.6 with i386 arch

Mathieu Suen mathk.sue at
Thu Apr 29 14:43:07 PDT 2010


I am on snow leopard 10.6.3 and I configure port to build i386 package.
When I try to install python I get the following error:

$ sudo port install python26
--->  Computing dependencies for python26
--->  Fetching python26
--->  Verifying checksum(s) for python26
--->  Extracting python26
--->  Applying patches to python26
--->  Configuring python26
--->  Building python26
Error: Target returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.5" && /usr/bin/make -j2 all MAKE="/usr/bin/make CC=/usr/bin/gcc-4.2" " returned error 2
Command output: 		/usr/bin/gcc-4.2 -o Python.framework/Versions/2.6/Python  -dynamiclib \
			-isysroot "" \
			-all_load libpython2.6.a -Wl,-single_module \
			-install_name /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python \
			-compatibility_version 2.6 \
			-current_version 2.6; \
        else \
		/usr/bin/libtool -o Python.framework/Versions/2.6/Python -dynamic  libpython2.6.a \
			 -lSystem -lSystemStubs -arch_only i386 -install_name /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python -compatibility_version 2.6 -current_version 2.6 ;\
/usr/bin/install -c -d -m 755  \
/usr/bin/install -c -m 644 Mac/Resources/framework/Info.plist \
ln -fsn 2.6 Python.framework/Versions/Current
ln -fsn Versions/Current/Python Python.framework/Python
ln -fsn Versions/Current/Headers Python.framework/Headers
ln -fsn Versions/Current/Resources Python.framework/Resources
/usr/bin/gcc-4.2 -L/opt/local/lib -u _PyMac_Error Python.framework/Versions/2.6/Python -o python \
			Modules/python.o \
			 -ldl  -framework CoreFoundation     
ld: warning: in Python.framework/Versions/2.6/Python, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_PyMac_Error", referenced from:
     -u command line option
  "_Py_Main", referenced from:
      _main in python.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python] Error 1

Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.


More information about the macports-users mailing list