Qt 5 doesn`t build - too many errors emitted



  • Hi everyone!

    I try to compile a 32 Bit Version of Qt on Mac OS X 10.8.3, but after a short time it throws many errors and ends up with the fatal error: too many errors emitted, stopping now.
    I uninstalled Xcode 4 some time ago because I had to work on another project using Xcode 3. Is there a relationship? I reinstalled Version 4 now but nevertheless the output looks like this:

    @./configure -nomake tests -platform macx-clang-32 -DNS_BUILD_32_LIKE_64

    [...]

    /System/Library/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:381:56: error: expected function body after function declarator
    CG_EXTERN CFMachPortRef CGWindowServerCFMachPort(void) CF_RETURNS_RETAINED
    ^
    In file included from /Users/rtwdev/Desktop/qt-everywhere-opensource-src-5.0.2/qtbase/qmake/generators/mac/pbuilder_pbx.cpp:56:
    In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:55:
    In file included from /System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h:14:
    /System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h:14:1: error: unknown type name 'CG_EXTERN_C_BEGIN'
    CG_EXTERN_C_BEGIN
    ^
    /System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h:17:1: error: expected unqualified-id
    enum CGImageSourceStatus {
    ^
    /System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h:25:14: error: ISO C++ forbids forward references to 'enum' types
    typedef enum CGImageSourceStatus CGImageSourceStatus;
    ^
    /System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h:193:1: error: unknown type name 'CG_EXTERN_C_END'
    CG_EXTERN_C_END
    ^
    In file included from /Users/rtwdev/Desktop/qt-everywhere-opensource-src-5.0.2/qtbase/qmake/generators/mac/pbuilder_pbx.cpp:56:
    In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:55:
    In file included from /System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h:16:
    /System/Library/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:10:1: error: expected unqualified-id
    typedef struct CGImageDestination *CGImageDestinationRef;
    ^
    /System/Library/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:14:1: error: unknown type name 'CG_EXTERN_C_BEGIN'
    CG_EXTERN_C_BEGIN
    ^
    /System/Library/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:29:1: error: expected unqualified-id
    CG_EXTERN const CFStringRef kCGImageDestinationLossyCompressionQuality AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
    ^
    /System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:63:22: note: expanded from macro 'CG_EXTERN'

    define CG_EXTERN extern "C"

    [...]

    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    make: *** [pbuilder_pbx.o] Error 1
    *** qtbase/configure exited with non-zero status.@

    What is going wrong? Thanks for any help.

    Best regards,
    Sonic


  • Lifetime Qt Champion

    Hi,

    IIRC you have to change the os x SDK used to build Qt, otherwise it defaults to the latest which uses 64bit.



  • Add -xplatform unsupported/macx-ios-clang to your configure line. Cross-compilations require that option with a "mkspec" value. mkspecs are qmake files shipped with qt: http://qt.gitorious.org/qt/qtbase/trees/stable/mkspecs



  • Thank you very much. I tried both hints but the upshot was that I went to another mac in our office and configured with "-universal" and Qt was built fine. After "sudo make -j1 install" I took the files back to my machine and could import the framework in my 32 Bit project.



  • I must have misunderstood when I posted; it seems you weren't interested in iOS. Regardless, you probably don't want to be building a PowerPC binary, as even Apple doesn't support that architecture anymore. Unless one of your Macs actually has it?



  • The goal was to build a 32 Bit version to use it on a current OSX in collaboration with an old plugin SDK for Pro Tools: http://qt-project.org/forums/viewthread/8825/
    I built Qt on OSX 10.6 and it works fine on my mac which runs with 10.8. This solution was more time-saving than to investigate why my mac did not want to build itself.


Log in to reply
 

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