#12422: Python doesn't compile on Mac with GCC
------------------------+---------------------------------------------------
   Reporter:  jdemeyer  |          Owner:  tbd     
       Type:  defect    |         Status:  new     
   Priority:  major     |      Milestone:  sage-5.0
  Component:  packages  |       Keywords:          
Work_issues:            |       Upstream:  N/A     
   Reviewer:            |         Author:          
     Merged:            |   Dependencies:          
------------------------+---------------------------------------------------
 From
 `/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h`
 on `bsd` (and presumably other OS X systems):
 {{{
 #if defined(__GNUC__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) &&
 !defined(__INTEL_COMPILER) && (TARGET_OS_MAC || TARGET_OS_EMBEDDED)
 #define CF_FORMAT_FUNCTION(F,A) __attribute__((format(CFString, F, A)))
 #define CF_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
 #else
 #define CF_FORMAT_FUNCTION(F,A)
 #define CF_FORMAT_ARGUMENT(A)
 #endif
 }}}

 Here Apple is assuming that gcc >= 4.2 will properly understand
 `_attribute__((format_arg()))` but this isn't true.  Obviously this works
 with XCode's C compiler, not with GCC.  A stupid workaround is to define
 `__INTEL_COMPILER` when compiling Python on OS X.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12422>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to