Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#21137 closed defect (duplicate)

python26 doesn't build on macos 10.6

Reported by: yesthatjwz (Jamie Zawinski) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
Port:

Description

I did the "Migration" upgrade.

% port clean python26
--->  Cleaning python26
% port -f uninstall python26
% 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 org.macports.build 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.2" && /usr/bin/make all MAKE="/usr/bin/make CC=/usr/bin/gcc-4.2" " returned error 2
Command output: if test ""; then \
		/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 ;\
	fi
/usr/bin/install -c -d -m 755  \
		Python.framework/Versions/2.6/Resources/English.lproj
/usr/bin/install -c -m 644 Mac/Resources/framework/Info.plist \
		Python.framework/Versions/2.6/Resources/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.exe \
			Modules/python.o \
			 -ldl      
ld: warning: in Python.framework/Versions/2.6/Python, file is not of required architecture
Undefined symbols:
  "_PyMac_Error", referenced from:
  "_Py_Main", referenced from:
      _main in python.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1

Error: Status 1 encountered during processing.
52.732u 17.137s 1:36.53 72.3%	0+0k 593+855io 0pf+0w
Exit 1

Change History (4)

comment:1 Changed 15 years ago by Themanwithoutaplan

See #20284

Apple has hacked its own version of Python 2.6 without passing the changes on to the Python team. I can confirm that the Python 2.6 does now build. I'm not sure if you will need to clean out more ports for it build.

fuchsia:fulfilment charlieclark$ 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
--->  Staging python26 into destroot
--->  Installing python26 @2.6.2_4+darwin
--->  Activating python26 @2.6.2_4+darwin

To fully complete your installation and make python 2.6 the default, please run

	sudo port install python_select  
	sudo python_select python26

--->  Cleaning python26

comment:2 Changed 15 years ago by tobypeterson

Resolution: duplicate
Status: newclosed

comment:3 Changed 15 years ago by iandennismiller@…

I am trying to build on 10.5, and I receive this error:

--->  Building python26
Error: Target org.macports.build 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.2" && 
/usr/bin/make -j1 all MAKE="/usr/bin/make CC=/usr/bin/gcc-4.0" " returned error 2
Command output: /usr/bin/gcc-4.0 -L/opt/local/lib -u _PyMac_Error Python.framework/Versions/2.6/Python -o python \
                        Modules/python.o \
                         -ldl      
ld warning: in Python.framework/Versions/2.6/Python, file is not of required architecture
Undefined symbols:
  "_Py_Main", referenced from:
      _main in python.o
  "_PyMac_Error", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python] Error 1

I am upgrading from python26 2.6.2_3 < 2.6.2_4

I am running OSX 10.5.7 on a MBP 1,1

I looked at the thread linked above, and I have a few questions:

1) is the problem only patched in the subversion ports, or is it supposed to be patched in the release ports as well?

2) is the solution supposed to work with 32-bit 10.5 installations?

Sorry if this is supposed to be evident from the thread you linked to, but I wasn't able to replicate the results posted above. Any help is appreciated.

comment:4 Changed 15 years ago by iandennismiller@…

Nevermind - I see a new patch called "patch-64bit.diff" that was probably the result of that thread. I can report that it installed successfully on 10.5.7:

--->  Building python26
--->  Staging python26 into destroot
--->  Installing python26 @2.6.2_4+darwin
--->  Deactivating python26 @2.6.2_3
--->  Activating python26 @2.6.2_4+darwin
Note: See TracTickets for help on using tickets.