iOS release build fails (Qt World Summit Conference App)


  • Qt Champions 2016

    thanks to much help from https://bugreports.qt.io/browse/QTCREATORBUG-16968 I finally managed to build and run on iPhone and iPad using Xcode 8, Qt 5.7, QtCreator 4.1

    now just wanted to start Testflight for upcoming Qt World Summit Conference App https://github.com/ekke/c2gQtWS_x and build a release to upload to apple appstore

    run into a problem I never had before

    build from Qt Creator fails here:

    === BUILD AGGREGATE TARGET Qt Preprocess OF PROJECT c2gQtWS_x WITH CONFIGURATION Release ===
    
    Check dependencies
    
    Write auxiliary files
    write-file /daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh
    chmod 0755 /daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh
    write-file /daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh
    chmod 0755 /daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh
    
    PhaseScriptExecution Qt\ Qmake c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh
        cd /daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release
        /bin/sh -c \"/daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh\"
    make[1]: `c2gQtWS_x.xcodeproj/project.pbxproj' is up to date.
    
    PhaseScriptExecution Qt\ Preprocessors c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh
        cd /daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release
        /bin/sh -c \"/daten/_qt_workspaces/work_570/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_ios-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh\"
    /daten/_qt_sdks/sdk_570/5.7/ios/bin/rcc -name translations ../c2gQtWS_x/translations.qrc -o qrc_translations.cpp
    /daten/_qt_sdks/sdk_570/5.7/ios/bin/rcc -name images ../c2gQtWS_x/images.qrc -o qrc_images.cpp
    /daten/_qt_sdks/sdk_570/5.7/ios/bin/rcc -name data-assets ../c2gQtWS_x/data-assets.qrc -o qrc_data-assets.cpp
    /daten/_qt_sdks/sdk_570/5.7/ios/bin/qtquickcompiler --resource=/daten/_qt_workspaces/work_570/c2gQtWS_x/qml.qrc ../c2gQtWS_x/qml/main.qml .qtquickcompiler/qml_main_qml.cpp
    ASSERT: "endptr - target.data() <= length - eSign -1" in file ../../corelib/tools/qlocale_tools.cpp, line 227
    make[1]: *** [.qtquickcompiler/qml_main_qml.cpp] Abort trap: 6
    Command /bin/sh failed with exit code 2
    
    ** BUILD FAILED **
    

    compared this with another project where release was build without an error:

    === BUILD AGGREGATE TARGET Qt Preprocess OF PROJECT MoToiMa_qt WITH CONFIGURATION Release ===
    
    Check dependencies
    
    PhaseScriptExecution Qt\ Qmake MoToiMa_qt.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh
        cd /daten/_qt_workspaces/work_570/build-MoToiMa_qt-iphoneos_clang_Qt_5_7_0_ios-Release
        /bin/sh -c \"/daten/_qt_workspaces/work_570/build-MoToiMa_qt-iphoneos_clang_Qt_5_7_0_ios-Release/MoToiMa_qt.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh\"
    make[1]: `MoToiMa_qt.xcodeproj/project.pbxproj' is up to date.
    
    PhaseScriptExecution Qt\ Preprocessors MoToiMa_qt.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh
        cd /daten/_qt_workspaces/work_570/build-MoToiMa_qt-iphoneos_clang_Qt_5_7_0_ios-Release
        /bin/sh -c \"/daten/_qt_workspaces/work_570/build-MoToiMa_qt-iphoneos_clang_Qt_5_7_0_ios-Release/MoToiMa_qt.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh\"
    /daten/_qt_sdks/sdk_570/5.7/ios/bin/rcc -name translations ../MoToiMa_qt/translations.qrc -o qrc_translations.cpp
    
    === BUILD TARGET MoToiMa_qt OF PROJECT MoToiMa_qt WITH CONFIGURATION Release ===
    

    so it seems to be a problem with the translations.qrc

    cleared the project and build dir
    added *.qm files again to translations.qrc

    all works well if doing a debug build on iPhone or iPad, but fails doing a release build
    also verified from debug build on devices with different local: translations are done

    have no idea what happened here
    blocks me to start beta test on iOS for Qt World Summit Conference App

    thx for help



  • Hmm, strange I just downloaded your project, and it worked directly in my iPhone (nice app!), here's my Release build log (relevant parts):

    === BUILD AGGREGATE TARGET Qt Preprocess OF PROJECT c2gQtWS_x WITH CONFIGURATION Release ===
    
    Check dependencies
    
    Write auxiliary files
    write-file /Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh
    chmod 0755 /Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh
    write-file /Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh
    chmod 0755 /Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh
    
    PhaseScriptExecution Qt\ Qmake c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh
        cd /Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release
        /bin/sh -c \"/Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-5E618435888B9D49F8540165.sh\"
    make[1]: `c2gQtWS_x.xcodeproj/project.pbxproj' is up to date.
    
    PhaseScriptExecution Qt\ Preprocessors c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh
        cd /Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release
        /bin/sh -c \"/Users/henry/Projects/Paraphernalia/build-c2gQtWS_x-iphoneos_clang_Qt_5_7_0_for_iOS-Release/c2gQtWS_x.build/Release-iphoneos/Qt\ Preprocess.build/Script-7EF0942E79C014DCEC8976BC.sh\"
    /Users/henry/Qt/5.7/ios/bin/rcc -name qml ../c2gQtWS_x/qml.qrc -o qrc_qml.cpp
    /Users/henry/Qt/5.7/ios/bin/rcc -name translations ../c2gQtWS_x/translations.qrc -o qrc_translations.cpp
    /Users/henry/Qt/5.7/ios/bin/rcc -name images ../c2gQtWS_x/images.qrc -o qrc_images.cpp
    /Users/henry/Qt/5.7/ios/bin/rcc -name data-assets ../c2gQtWS_x/data-assets.qrc -o qrc_data-assets.cpp
    /Users/henry/Qt/5.7/ios/bin/moc -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D__APPLE__ -D__GNUC__=4 -D__APPLE_CC__ -I/Users/henry/Qt/5.7/ios/mkspecs/macx-ios-clang -I/Users/henry/Projects/Paraphernalia/c2gQtWS_x -I/Users/
    ...
    

  • Qt Champions 2016

    @hskoglund thx.really strange.
    deleted build dir
    cleaned project
    always the same: debug build work, release build fails.

    you're also using Xcode8 ?



  • I built your app with 7.3 (can't start 8.0, that silly "have to agree to license" keep popping up in Qt Creator :-(


  • Qt Champions 2016

    @hskoglund Xcode8 - I went thru all the problems and also https://bugreports.qt.io/browse/QTCREATORBUG-16968
    it's working for other projects - so it's not a generic problem with Xcode8 I think
    only this project causes release build problems



  • Should google on how to get rid of "Xcode not set up properly.." just a minute..


  • Qt Champions 2016

    @hskoglund think it was running xcodebuild -license from terminal



  • Did that, not enough. Think I have to edit the mkspecs...



  • https://bugreports.qt.io/browse/QTBUG-56004 did that, didn't help. Maybe because I upgraded to Sierra (macOS 10.11) yesterday :-(
    I have time later tonight, can look into it more then...


  • Qt Champions 2016

    @hskoglund thx looking into this.


  • Qt Champions 2016

    BTW: thinking to clone my app and try it out if it works.
    At first I want to know if it is safe to manage the same App (same name and content of .pro), but at different file locations in Qt Creator without any trouble.
    thx for any hints


  • Qt Champions 2016

    also asked in Interest and Qt Creator List.
    Eike Ziller found the reason why release build fails under iOS:

    That’s a crash in Qt Quick Compiler, which looks like it is https://bugreports.qt.io/browse/QTBUG-54482

    Eike saved my day :)
    looked at the bugreport and immediately know the reason and fixed it:

    Timer {
                id: autoVersionCheckTimer
                interval: 3600000 // 60*60*1000
                repeat: false
                onTriggered: {
                    appWindow.doAutoVersionCheck()
                }
            }
    

    just built the release, uploaded to AppStore and added build to TestFlight
    now all projects are working with Qt 5.7 and Xcode8 :)

    ekke



  • Good news!
    (yesterday evening I tested building your app on Xcode 8 and it worked fine (of course!), I thought I'd sleep on it. So it was an overflow bug, good it's solved.)
    Also yesterday I forgot rule #1: always google for the error message first (if you do, you get that QTBUG-54482 as the first hit, the bug report is from June 30) but since it worked for me, it wasn't obvious :-)


  • Qt Champions 2016

    @hskoglund I did a search but with the wrong line ;-)

    so you have no issues with Sierra ?



  • @ekkescorner No Sierra seems quite harmless, I said no to installing Siri and the only new thing seems some new nice wallpapers with the Sierra mountains.
    However getting Qt Creator 4.10 to build a sample app for iOS required editing 2(!) different .prf files in the mkspecs subdirectory jungle, thankfully it was documented on Stackoverflow. But I think that is more because of Xcode 8 and less because of Sierra.


  • Qt Champions 2016

    @hskoglund good to know. and yes: the mkspecs changes are caused by Xcode8.


  • Lifetime Qt Champion

    I confirm it's Xcode 8 that changed some stuff again. The next round of Qt releases are already fixed.



  • Yes indeed I just discovered, Xcode 8 has really moved my cheese.
    For many years I've had my Xcode keyboard plugin, but now Xcode 8 has obsoleted that and introduced "Xcode source editor extensions".
    Reminds me of when Microsoft changed the Visual Studio plugin infrastructure for VS2015 (was bad news for the Qt VS Addin) Apple had to do same kind of "improvement" now :-(


  • Qt Champions 2016

    @SGaist said in iOS release build fails (Qt World Summit Conference App):

    I confirm it's Xcode 8 that changed some stuff again. The next round of Qt releases are already fixed.

    yep - new Qt releases will help with mkspec changes
    but there are also changes required in .pro because Xcode has new requirements for signing apps
    I had to add under ios/:

    QMAKE_XCODE_CODE_SIGN_IDENTITY = "iPhone Developer"
    MY_DEVELOPMENT_TEAM.name = DEVELOPMENT_TEAM
    MY_DEVELOPMENT_TEAM.value = XXX42XXX42
    QMAKE_MAC_XCODE_SETTINGS += MY_DEVELOPMENT_TEAM
    

    where team value can be found at Apple Developer/account membership
    using Xcode 7.3 there's no need to add this


  • Lifetime Qt Champion

    I saw some people already experiencing an issue with that.

    Seems like Xcode 8 is a bit less intuitive...

    Thanks for the hint


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.