https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83531
Bug ID: 83531 Summary: Build broken on macOS 10.13.2 Product: gcc Version: 5.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: fxcoudert at gcc dot gnu.org Target Milestone: --- Build of GCC 5 is currently broken on x86_64-apple-darwin17.3.0 (macOS 10.13.2) because of a failure in building libsanitizer: In file included from ../../../../libsanitizer/asan/asan_malloc_mac.cc:17:0: /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:663:61: error: expected initializer before 'API_AVAILABLE' CFTypeRef CFAutorelease(CFTypeRef CF_RELEASES_ARGUMENT arg) API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)); The failure comes from the header file CoreFoundation/CFBase.h, which uses the API_AVAILABLE macro, which should be defined in /usr/include/os/availability.h but isn't: in that system header, the path followed by any non-clang compiler (such as GCC) ends up defining __API_AVAILABLE/__API_DEPRECATED/__API_DEPRECATED_WITH_REPLACEMENT/__API_UNAVAILABLE where it should define the corresponding API_AVAILABLE/etc macros (without leading underscores). I reported this bug to Apple (radar #36176941). Hopefully, they will fix their system headers. In the mean time, we can get bootstrap working again by fixinclud'ing the header in question. Patch to do so is available at https://github.com/Homebrew/formula-patches/blob/master/gcc%405/10.13_headers.patch