[ python-Bugs-1460514 ] ctypes extension does not compile on Mac OS 10.3.9

SourceForge.net noreply at sourceforge.net
Wed Mar 29 10:28:53 CEST 2006


Bugs item #1460514, was opened at 2006-03-29 01:28
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1460514&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Dalke (dalke)
Assigned to: Nobody/Anonymous (nobody)
Summary: ctypes extension does not compile on Mac OS 10.3.9

Initial Comment:
I compiled Python from CVS this morning.  It silently failed to compile 
ctypes.  Here is the text surrounding the failure

gcc [deleted] -c /Users/dalke/cvses/python-svn/Modules/_ctypes/
libffi/src/powerpc/darwin_closure.S -o build/temp.darwin-7.9.0-
Power_Macintosh-2.5/darwin_closure.o
darwin_closure.S:249:unknown section attribute: live_support
darwin_closure.S:249:Rest of line ignored. 1st junk character valued 69 
(E).
building 'itertools' extension
 ...

Python installed but when I tried to import ctypes I got

  File "/usr/local/lib/python2.5/ctypes/__init__.py", line 8, in 
<module>
    from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes

I tracked it down to the '+live_support' attribute from the 
darwin_closure.S.  My compiler does not understand that.

Thomas Heller (in private email) pointed out the text from the ctypes 
README

        On OS X, the segment attribute live_support must be
	defined. If your compiler doesn't know about it, upgrade or
	set the environment variable CCASFLAGS="-Dno_live_support".

Upgrading is out of the option.  I set the environment variable but that 
did not fix things when I tried to recompile Python.  However, editing 
the file to remove the "+live_support" works.  All the self-tests passed, 
and my experimentation this afternoon was successful.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1460514&group_id=5470


More information about the Python-bugs-list mailing list