This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ctypes compilation error on SnowLeopard
Type: compile error Stage: resolved
Components: ctypes, macOS Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: barry, benjamin.peterson, naro, ronaldoussoren, theller
Priority: release blocker Keywords:

Created on 2009-09-15 21:21 by ronaldoussoren, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg92656 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-09-15 21:21
When I compile the trunk on MacOS X 10.6 I get a compile (or rather 
link) error in ctypes:

ld: in build/temp.macosx-10.5-fat3-
2.7/Users/ronald/Projects/python/python-trunk-
clean/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.o, unsupported 
encoding in FDE for architecture ppc

This makes it impossible to build a univeral binary Python framework on 
OSX 10.6.

I don't think I'm running into the same issue with PyObjC, it that works 
I'll port PyObjC's version of ppc-darwin to the version of libffi that's 
used by ctypes.
msg92681 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2009-09-16 12:48
Agreed this should be a release blocker for 2.6.3
msg92717 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-09-16 20:25
Annoyingly PyObjC suffers from the same issue. I hadn't noticed this yet 
because I've been linked to the system copy of libffi the last couple of 
months.

Luckily Apple has already released the source code for libffi in 10.6 
(see http://www.opensource.apple.com/source/libffi/libffi-15/, or 
http://www.opensource.apple.com/tarballs/libffi/libffi-15.tar.gz). 

Next steps:
* Check diffs between this release and the one in ctypes
* Update ctypes libffi_osx based on those differences
* Test the result on 10.5 and 10.6
msg92875 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2009-09-19 19:07
This one is fixed, isn't it?

See for example the buildbot output at

http://www.python.org/dev/buildbot/2.6/builders/x86%20osx.5%202.6/builds/566/steps/compile/logs/stdio

(Search for "building '_ctypes' extension" on the page)
msg92886 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-09-20 09:30
Thomas: I haven't fixed anything yet.

The error only happens when building a PPC binary (either a single-
architecture build on a PPC machine or a fat binary).

The error occurs in assembly files that contain manually constructed C++ 
exception stack unwind helper segments, I guess those are not entirely 
valid and the linker got more strict.
msg92909 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-09-20 18:59
I've merged the latest copy of Apple's version of libffi into libffi_osx, 
that ensures that libffi compiles again on OSX 10.6.

Checked in in r74972 (trunk), r74973 (2.6), r74974 (3.x), r74975 (3.1).
History
Date User Action Args
2022-04-11 14:56:53adminsetnosy: + benjamin.peterson
github: 51167
2009-09-20 18:59:31ronaldoussorensetstatus: open -> closed
resolution: fixed
messages: + msg92909

stage: resolved
2009-09-20 09:30:34ronaldoussorensetmessages: + msg92886
2009-09-19 19:07:42thellersetnosy: + theller
messages: + msg92875
2009-09-17 13:31:18narosetnosy: + naro
2009-09-16 20:25:18ronaldoussorensetmessages: + msg92717
2009-09-16 12:48:55barrysetnosy: + barry
messages: + msg92681
2009-09-15 21:21:18ronaldoussorencreate