[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
Mon Oct 26 16:01:14 PDT 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 jeremyhu@…):

 Replying to [comment:51 murrayeisenberg@…]:
 > Replying to [comment:50 ryandesign@…]:
 > > Replying to [comment:48 murrayeisenberg@…]:
 > > > Replying to [comment:41 jeremyhu@…]:
 > > > > Yes.  If you want, you can just manually edit Availability.h to
 replace the '`defined(__has_feature)`' with '`defined(__has_attribute)`'
 for the OSX and iOS availability macros, but you do so at your own risk
 because you know what you're doing ;)
 > > >
 > > > Even using {{{sudo}}} with an admin account on OS X 10.11.1 did not
 allow me to edit Availability.h. How did you do it (if you did)?
 > >
 > > System Integrity Protection (SIP), a new feature as of OS X 10.11 El
 Capitan, will not allow you to edit files in system locations like /usr.
 SIP can be turned off, but I recommend you don't do that.
 > >
 > > > Also, I could not even build gcc48, again apparently due to the same
 issue with Availability.h.
 > >
 > > Yes.
 >
 > Yes, I know about SIP and how to turn it on and off, but for the obvious
 reasons hesitate to do so. So:
 >  (1) Is there to be some other workaround?
 > (2) In case I dare to turn off SIP temporarily...
 >
 > Is it literally just the several instances of {{{
 'defined(__has_feature)' }}} that have to be replaced?

 Only the ones that are preceding __has_attribute() usage.  Don't replace
 the ones that are correctly guarding __has_feature() usage.  If you don't
 know what that means, then don't make any changes.

 >  I ask because in Availability.h there are other mentions of
 "availability", such as in
 > {{{'#if __has_feature(attribute_availability_*)'}}} where what follows
 {{{'availability'}}} could be {{{'twos'}}}, {{{'watchOS'}}},
 {{{'app_extension'}}}, etc.

 I suggest you don't make manual changes if you're not absolutely clear to
 you what the problem is just by looking at the code block shown in comment
 #24.  Making a mistake in editing that file can have further fallout.

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


More information about the macports-tickets mailing list