Xcode 8 support

Issue #103 resolved
Nikos Bitoulas created an issue

While trying to check my project I keep getting a ton of errors of this type:

COMPILER ERROR when parsing file /learnenglish/Flashcards/Controller/OKPFlashcardsWebViewController.m: /Users/nikosbitoulas/Dropbox/Development/OKPanda/ios_live/learnenglish/CommonControllers/OKPWebViewBaseController.h:9:9: fatal error: could not build module 'UIKit'

It is probably Xcode 8 related, since I did not have any problem with Xcode 7.

Comments (22)

  1. Brian Dorfman

    I'm having the same issue. It seems to be caused by FauxPas looking for the 9.3sdk to compile things against. warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk' [-Wmissing-sysroot]

    Xcode8 does not include this sdk so Faux Pas errors. I cannot seem to figure out where Faux Pas is getting this value from (possibly hardcoded?)

    I attempted to work around by adding -sdk iphoneos10.0 as an additional xcodebuild arg in configuration, but Faux Pas does not seem to pass through through correctly, or possibly I misunderstood what this configuration option is supposed to do.

  2. Ali Rantakari repo owner

    Thanks for reporting this.

    This is most likely due to Faux Pas using an older version of the Clang compiler (Apple hasn't yet released the sources for the Xcode 8 version of Clang). I will however try to find a workaround if I can.

    @brian_dorfman your SDK issue might be due to Faux Pas caches — try selecting Project > Clean Project Caches in the Faux Pas GUI and building again. This won't fix the underlying issue here, however.

  3. Nikos Bitoulas reporter

    @brian_dorfman did you try to download the SDK explicitly from Preferences->Components?

  4. Brian Dorfman

    There is no way to download the 9.3 sdk in Xcode prefs as far as I can tell (only old simulators), but I think you are right and those errors were just because I had a stale cache. After cleaning they are gone, but I still have compilation errors, so it is probably just the outdated clang like you said. Sorry about the accidental misinformation.

  5. Vijay Tholpadi

    Downloaded the trial before commiting a purchase. Unfortunately I am on Xcode 8. So no donut for me till the update arrives. :-1:

  6. Ali Rantakari repo owner

    Hey everyone: Thanks for your patience with this — I now have a release candidate that should work with Xcode 8.1 in most cases:

    https://www.dropbox.com/s/t8nsli66ovip42o/FauxPas-v1.7-prerelease-testbuild.zip?dl=0

    Please report here whether this build fixes this particular issue for you.

    Unfortunately Apple has still not released the sources for the Xcode 8.1 (or 8.0 for that matter) version of Clang, so this version of Faux Pas has to revert to the “upstream” Clang, which might cause incompatibilities in some cases. @lucky06 the link you posted is for the macOS source dump; not for Clang, unfortunately.

  7. 高海峰

    Not working for me.

    Initialization: Reading cached build steps
    Initialization: Processing build steps
    
    Applying rules before checking code
    Checking file #0/2 (2 remaining): /Development Pods/RACProgressSubject/RACProgressSubject/Classes/RACProgressSubject.m
    
    Checking file #1/2 (2 remaining): /Development Pods/RACProgressSubject/Support Files/RACProgressSubject-dummy.m
    
    ERROR: FATAL: Unrecoverable compiler error: Translation unit is NULL: /Users/Lono/Dropbox/RACProgressSubject/Example/Pods/../../RACProgressSubject/Classes/RACProgressSubject.m
    ERROR: FATAL: Unrecoverable compiler error: Translation unit is NULL: /Users/Lono/Dropbox/RACProgressSubject/Example/Pods/../../Example/Pods/Target Support Files/RACProgressSubject/RACProgressSubject-dummy.m
    Applying rules after checking code
    Filtering diagnostics
    Post-processing diagnostics
    Checked total 0 code statements in 00:00:00.096 (the preparation took 00:00:00.057 (59.6%)).
    

    The project is https://github.com/haifengkao/RACProgressSubject

    I believe that this problem will occur in Xcode 9, 10, and so on. Why don't you develop a reduced version fo faux-pas which doesn't require clang's sources? Apple's libclang can generate a valid Translation unit. If faux-pas can work with apple's binary, you will not need the sources anymore.

  8. Log in to comment