Failures with Xcode 9 and 10.13 SDK

Issue #114 resolved
Kent Sutherland created an issue

Faux Pas doesn't work with Xcode 9 and 10.13. I assume this is because of the older version of LLVM/clang packaged with Faux Pas.

ERROR: Initialization: Error when parsing precompiled header #4: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUUID.h:26:49: error: nullability specifier '_Nullable' cannot be applied to non-pointer type 'uuid_t' (aka 'unsigned char [16]')

  Prefix.pch:6:10: note: in file included from Prefix.pch:6:

  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:9: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:

  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:128:9: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:128:
ERROR: Initialization: Error when parsing precompiled header #4: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUUID.h:29:30: error: nullability specifier '_Nonnull' cannot be applied to non-pointer type 'uuid_t' (aka 'unsigned char [16]')
ERROR: Initialization: There were errors when parsing the precompiled header #4.

Comments (12)

  1. Mike Eustace

    This priority should be "blocker" as Faux Pas is unusable with Xcode 9.

    I have project using iPhoneOS11.0 SDK and experience the exact same error.

  2. Ali Rantakari repo owner

    Thanks for reporting this. Apple has not yet released the source code for the version of Clang that ships with Xcode 9, but I have a prerelease version of Faux Pas that uses the mainline Clang 5.0.0 release, which seems to resolve these issues in my testing (but might have other incompatibilities due to the Clang version being a bit different than the one in Xcode).

    <deprecated link redacted>

    @ksuther @michaeleustace it'd be great if you could try out this build and let me know whether it fixes this issue for you.

  3. Mike Eustace

    I got essentially the same result as Kent, I'm afraid.

    If it is any help, my project has a mix of Swift and Objective-C in it.

  4. Ali Rantakari repo owner

    Thanks for reporting back. Here is a second test build that uses the Clang from the Swift open source project’s Swift 4 release — I was able to reproduce similar “AST deserialization errors” when compiling PCHs with the previous build, while this seemed to fix them:

    https://www.dropbox.com/s/2graj80chsgxtgx/FauxPas-1.7.2-prerelease-test-2.tar.bz2?dl=0

    @ksuther @michaeleustace please let me know if this second build works with your project(s).

  5. Kent Sutherland reporter

    Works well for 3 projects, but it's failing on 1. Is there somewhere I can email you the full log? Thanks!

    There are errors that look something like this (but Xcode 9 builds things fine):

    COMPILER ERROR when parsing file /FrameworkProject/File.m: /FrameworkProject/File.h:13:28: error: redefinition of 'TypedefedEnum'

  6. Log in to comment