[Solved] QT 5.1 Alpha IOS build



  • Hi,

    I'm attempting to build QT 5.1 alpha for IOS. Build for desktop works fine, but when attempting to build IOS I get a compile error.

    I have attempted to reinstall xcode and to use different versions of the iphonesimualtor and iphoneos, but get:

    In file included from tools/qlocale_mac.mm:49:
    In file included from ../../include/QtCore/5.1.0/QtCore/private/qcore_mac_p.h:1:
    In file included from ../../include/QtCore/5.1.0/QtCore/private/../../../../../src/corelib/kernel/qcore_mac_p.h:63:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:11:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:791:32: error: expected ';' after top level declarator
    const CFStringRef kCFURLPathKey CF_AVAILABLE(10_8, 6_0);
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:998:59: error: expected ';' after top level declarator
    const CFStringRef kCFURLUbiquitousItemPercentDownloadedKey CF_DEPRECATED(10_7, 10_8, 5_0, 6_0);
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:1002:57: error: expected ';' after top level declarator
    const CFStringRef kCFURLUbiquitousItemPercentUploadedKey CF_DEPRECATED(10_7, 10_8, 5_0, 6_0);
    ^
    In file included from tools/qlocale_mac.mm:49:
    In file included from ../../include/QtCore/5.1.0/QtCore/private/qcore_mac_p.h:1:
    In file included from ../../include/QtCore/5.1.0/QtCore/private/../../../../../src/corelib/kernel/qcore_mac_p.h:63:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:84:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFFileSecurity.h:283:99: error: expected function body after function declarator
    Boolean CFFileSecurityClearProperties(CFFileSecurityRef fileSec, CFOptionFlags clearPropertyMask) CF_AVAILABLE(10_8, 6_0);
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:79:34: note: expanded from macro 'CF_AVAILABLE'
    #define CF_AVAILABLE(_mac, _ios) __OSX_AVAILABLE_STARTING(_MAC##_mac, _IPHONE##_ios)
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/Availability.h:148:50: note: expanded from macro '__OSX_AVAILABLE_STARTING'
    #define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_ios
    ^
    <scratch space>:103:1: note: expanded from macro '__AVAILABILITY_INTERNAL'
    __AVAILABILITY_INTERNAL__IPHONE_6_0
    ^
    In file included from tools/qlocale_mac.mm:49:
    In file included from ../../include/QtCore/5.1.0/QtCore/private/qcore_mac_p.h:1:
    In file included from ../../include/QtCore/5.1.0/QtCore/private/../../../../../src/corelib/kernel/qcore_mac_p.h:63:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:92:10: fatal error: 'CoreFoundation/CFUserNotification.h' file not found
    #include <CoreFoundation/CFUserNotification.h>
    ^
    5 errors generated.
    make[3]: *** [.obj/release-static/qlocale_mac.o] Error 1
    make[2]: *** [sub-corelib-make_first] Error 2
    make[1]: *** [sub-src-make_first] Error 2
    make: *** [module-qtbase-make_first] Error 2

    Anyone got an idea on how to cure that little snag ?

    br,
    /Sverre



  • Oh - forgot - I'm compiling on OS X 10.8, using following configure:

    ./configure -xplatform unsupported/macx-ios-clang -nomake examples -nomake tests -release -sdk iphonesimulator -prefix /Users/sverre/Tools/Qt/Qt-5.1.0-ios -opensource -confirm-license



  • Be sure that qtbase is clean before running that.
    I had similar issues in the past due to that, I did not try with 5.1 but with the dev branch (where it works), and you can also apply https://codereview.qt-project.org/#change,53651,patchset=2 if you want.


Log in to reply
 

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