[MacPorts] #48471: FSF gcc48 fails to compile projects on El Capitan due to OS X SDK bug in Availability.h

MacPorts noreply at macports.org
Thu Dec 17 21:54:55 PST 2015


#48471: FSF gcc48 fails to compile projects on El Capitan due to OS X SDK bug in
Availability.h
-----------------------+-----------------------
  Reporter:  jasonw@…  |      Owner:  mww@…
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.3.3
Resolution:            |   Keywords:  elcapitan
      Port:  gcc48     |
-----------------------+-----------------------

Comment (by bgantner@…):

 Replying to [comment:80 murrayeisenberg@…]:
 > Replying to [comment:78 siqueira@…]:
 > > I just tried copy and pasting Availability.h as suggested by
 michaelbyrne1978 at gmal.com, and this doesn't seem to work. Iit wants me to
 turn of SIP which I would rather not do.
 > Did you try the workaround of copying Availability.h into
 /opt/local/include and doing the edits in the copy.? As I noted in another
 reply, that worked for me.

 This worked for me, but with one addition.  I had to change both the OSX
 and iOS lines.  Copied the Availability.h from /usr/include to
 /opt/local/include and changed two lines.  After that, gcc48 compiled
 fine.

 {{{
 /* for use marking APIs available info for Mac OSX */
 #if defined(__has_attribute)
 <------CHANGE HERE (1 of 2)
   #if __has_attribute(availability)
     #define __OSX_UNAVAILABLE
 __OS_AVAILABILITY(macosx,unavailable)

 /* for use marking APIs available info for iOS */
 #if defined(__has_attribute)
 <------CHANGE HERE (2 of 2)
   #if __has_attribute(availability)
     #define __IOS_UNAVAILABLE
 __OS_AVAILABILITY(ios,unavailable)
 }}}
 Thanks for the fix!

-- 
Ticket URL: <https://trac.macports.org/ticket/48471#comment:81>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list