I tried to run $ sudo port upgrade outdated on my Mac and had build issues with: gcc48, texlive-bin clang-3.5 clang-3.7, etc.
Macports has some of the issues I've encountered:
https://trac.macports.org/ticket/48471
I tried applying the patch (define_non_standard_clang_macros.patch ) from the Macport incident above and I also manually updating: /usr/include/Availability.h
$ sudo patch /usr/include/Availability.h define_non_standard_clang_macros.patch
Password:
patching file /usr/include/Availability.h
Hunk #1 FAILED at 1141.
patch: **** Can't rename file /usr/include/Availability.h to /usr/include/Availability.h.orig : Operation not permitted
$ sudo cp Availability.h /usr/include/Availability.h
cp: /usr/include/Availability.h: Operation not permitted
Any ideas?
On El Capitan, you can no longer modify any files in /usr. The feature is called System Integrity Protection and is also known under it's development name "rootless".
It is also a bad idea to start patching a system header. If the header needs fixing, that's a problem that should be reported to Apple via a rdar for them to correct.