Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23674] iOS - Compilation error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-08-01T02:44:05.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0, Release 5.4.0
ComponentsiOS
Labelsios, qe-5.4.0, regression
ReporterAnna
AssigneeHans Knöchel
Created2016-05-26T14:36:20.000+0000
Updated2016-08-15T05:10:11.000+0000

Description

I was working perfectly on iOS, when suddenly this error appeared without change any cody:
[ERROR] :  ** BUILD FAILED **
[ERROR] :  The following build commands failed:
[ERROR] :  	CompileC build/Intermediates/App.build/Debug-iphoneos/App.build/Objects-normal/armv7/TiUIiOSProxy.o Classes/TiUIiOSProxy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] :  (1 failure)
Now, I can't compile the app.

Comments

  1. Sharif AbuDarda 2016-05-26

    Hello, The issue is with your xCode. Make sure your xCode is configured in studio perfectly. Launch Xcode once for being in the safe side. Now, In the Appcelerator studio clean the project and try rebuilding with latest SDK. Regards, Sharif.
  2. Hans Knöchel 2016-05-28

    You are using the SDK version 5.4.0.v20160425220956 from April 25. Please try the latest master and provide sample code to reproduce if it still does not work. Thanks!
  3. Jerod Fritz 2016-07-23

    Latest GA and below eg. 5.3.1GA will build for simulator and deployment without issue 5.4.x and 5.6.x will only run app in Simulator For example using 5.4.0.v20160720201924 has no problem targeting Simulator but running appc --ios --target dist-appstore always result in TiUIiOSProxy.o Classes/TiUIiOSProxy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compile error My Xcode version is 7.3.1
  4. Hans Knöchel 2016-07-23

    It's a valid issue, just reproduced it. Reopening for further investigation. *EDIT*: However, I can only reproduce it on 6.0.0 (master), not 5.4.0 (5_4_X). *EDIT2*: Actually, using both latest master and 5_4_X still don't have the error. Use ti sdk install -b 5_4_X (or -b master) to try.
  5. Jerod Fritz 2016-07-25

    Hans, can you tell me which version of xcode you are using?
  6. Hans Knöchel 2016-07-25

    I tested the *latest* 5_4_X build with Xcode 7.3.1 and 6.0.0 with Xcode 8 since 6.0.0 is only supposed to work with the latest Xcode due some new features and adjustments for iOS 10.
  7. Chee Kiat Ng 2016-07-26

    I have pushed this to Release 6.0.0 pending further investigation since we can't reproduce it. [~emerriman] Can your team help to verify if this is critical for 5.4.0? Thanks!
  8. Hans Knöchel 2016-07-27

    I am still very sure the current builds run through. [~htbryant] will validate the issue, if you still experience this issue, please attach a full trace-log (appc --ios --target dist-appstore --log-level trace).
  9. Markus Klemann 2016-07-31

    I have the same problem since i change some deprecated styles (branch: 5.4.0.vxxxx): - separatorInsets to listSeparatorInsets - Ti.UI.iPhone.ListViewCellSelectionStyle.NONE to Ti.UI.IOS.ListViewCellSelectionStyle.NONE - Ti.UI.iPhone.ListViewStyle.GROUPED to Ti.UI.iOS.ListViewStyle.GROUPED - Ti.UI.iPhone.SystemButtonStyle.DONE to Ti.UI.IOS.SystemButtonStyle.DONE, I don't know if this was the reason. @Hans Knoechel i send you the trace log
  10. Hans Knöchel 2016-07-31

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/8177 PR (5_4_X): https://github.com/appcelerator/titanium_mobile/pull/8179 Reason (see ticket description): The SystemButton is declared in the header-file, if the USE_TI_UIIOSSYSTEMBUTTON precompilation macro is defined. In this case, it was trying to compile it when USE_TI_UIIOSSYSTEMBUTTONSTYLE is defined, which is an unbalanced define-condition causing the build to fail for device- and dist-builds. Caused by replacing [this](https://github.com/appcelerator/titanium_mobile/commit/d5232e2373bfb2e4adb24998349ee6346df3d54a#diff-408833cabb129d280f4c1b27a346cb0bL213) with [that](https://github.com/appcelerator/titanium_mobile/commit/d5232e2373bfb2e4adb24998349ee6346df3d54a#diff-408833cabb129d280f4c1b27a346cb0bR231). [~apetkov] Any reason why you added the precompile macros there which haven't been there before? We need to be very sensitive when adding those, because the Core-SDK in Xcode auto-includes it, so it may not be seen during core-development. Please re-validate all macros again to ensure the integrity-tests all pass. *EDIT*: The reason why it only failed for some test-cases, was that if you don't use any of the "new" constants on the migrated iOS-namespace (TIMOB-20174), the error was not thrown, since they have been skipped. Thanks [~haZz] for reporting!
  11. Chee Kiat Ng 2016-08-01

    PRs merged.
  12. Hans Knöchel 2016-08-01

    [~jerodfritz], [~haZz]: Please try SDK-build [5.4.0.v20160731195210](http://builds.appcelerator.com/mobile/5_4_X/mobilesdk-5.4.0.v20160731195210-osx.zip) or later, they should include the fix. Steps to test: 1. Use the following demo-code:
        var win = Ti.UI.createWindow({
            backgroundColor: "#fff"
        });
        var button = Ti.UI.createButton({
            systemButton: Ti.UI.iOS.SystemButton.ADD
        });
        win.add(button);
        win.open();
        
    2. Build the app for the device. 3. The build should not fail, the button should be displayed.
  13. Jerod Fritz 2016-08-01

    I can confirm this has resolved my dist build error. Thank you.
  14. Angel Petkov 2016-08-01

    While covering the mass deprecation ticket I mislaid some of the properties because the volume of changes, I should have triple-checked. Good catch [~hansknoechel], will go through the rest of the macros to make sure another wasn't misplaced. Hey [~haZz], make sure to use lower-case i for iOS and it should work. Tested with the following demo-code on the newest 5.4.0 and 6.0.0. Thanks.
        var win = Ti.UI.createWindow({
            backgroundColor: "#fff"
        });
        var listView = Ti.UI.createListView({
        	style: Ti.UI.iOS.ListViewStyle.GROUPED,
        
        });
        var sections = [];
        
        var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});
        var fruitDataSet = [
            {properties: { title: 'Apple: No Selection', selectionStyle: Ti.UI.iOS.ListViewCellSelectionStyle.NONE}},
            {properties: { title: 'BlueBerry: Blue Selection', selectionStyle: Ti.UI.iOS.ListViewCellSelectionStyle.BLUE}},
        ];
        fruitSection.setItems(fruitDataSet);
        sections.push(fruitSection);
        
        var vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});
        var vegDataSet = [
            {properties: { title: 'Carrots: No Selection',selectionStyle: Ti.UI.iOS.ListViewCellSelectionStyle.NONE}},
            {properties: { title: 'Eggplant: Blue Selection', selectionStyle: Ti.UI.iOS.ListViewCellSelectionStyle.BLUE}},
        ];
        vegSection.setItems(vegDataSet);
        sections.push(vegSection);
        
        listView.sections = sections;
        win.add(listView);
        win.open();
        
  15. Harry Bryant 2016-08-02

    [~hansknoechel] I have been unable to reproduce this compilation error with the given test case. On some occasions I have encountered the error, but there have been no consistent causes identified, and cleaning the project or rebuilding always fixes the issue. Given that [~jerodfritz] has confirmed that the PR has fixed the issue, I will be closing this ticket. Tested On: iPhone 6S (9.3.3) Device & iPhone 6 Plus (8.3) Device Mac OSX El Capitan 10.11.6 Ti SDK: 5.4.0.v20160801022303 Appc Studio: 4.7.0.201607111053 Appc NPM: 4.2.7 App CLI: 5.4.0-37 Xcode 7.3 Node v4.4.7
  16. Harry Bryant 2016-08-02

    *Note: * If anyone is still experiencing this issue consistently with SDK version 5.4.0.v20160731195210 or later, please comment on this ticket and we will reopen and investigate further.
  17. Kondal Kolipaka 2016-08-12

    [~hansknoechel] - http://stackoverflow.com/questions/38889343/sdk-5-4-0-ga-fails-to-build-ios-application
        1 error generated.
        [ERROR] :  ** BUILD FAILED **
        [ERROR] :  The following build commands failed:
        [ERROR] :   CompileC build/Intermediates/REL.build/Debug-iphoneos/REL.build/Objects-normal/armv7/TiUITextWidget.o Classes/TiUITextWidget.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
        [ERROR] :  (1 failure)
        
  18. Chee Kiat Ng 2016-08-15

    [~hansknoechel] Looking at the trace log from the stack overflow:
        [TRACE] :  In file included from /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/Classes/TiUITextWidget.m:14:
        [TRACE] :  /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/Classes/TiApp.h:69:5: error: unknown type name 'UIApplicationShortcutItem'; did you mean 'UIApplicationState'?
        [TRACE] :      UIApplicationShortcutItem *launchedShortcutItem;
        
    It looks like the user is using Xcode 6.4 and this is causing an error because UIApplicationShortcutItem is iOS 9.0 and above only.
  19. Chee Kiat Ng 2016-08-15

    But I won't think about fixing it if that's the case. Since 5.5.0 will support Xcode 8 and Xcode 7.3.1 only.
  20. Chee Kiat Ng 2016-08-15

    [~hansknoechel] if this is the problem, we could probably merge a back port PR to 5_4_X (i just bumped to 5.4.1) and if this user seriously needs the fix he can get it from builds.appcelerator.com.

JSON Source