Mac OSX 10.10 - Compiling Qt 4.8.2



  • Trying to do a 32 bit compile with Qt 4.8.2 on OSX 10.10.2. I am trying the following configuration and it seems to go through, however when I do a "make" it fails within a 20 seconds or so. Is this because I am using 10.10? I can put an older version (i.e. 10.7) on my test machine to get this compiled. Any suggestions how to get these libraries compiled?

    I just need a bare-bones install as I am using this for PyQt while only using QtGui and QtCore.

    ./configure -release -no-webkit -no-qt3support -opensource -nomake examples -nomake tests -arch x86

    warning "This version of Mac OS X is unsupported"

     ^
    

    In file included from kernel/qcursor_mac.mm:42:
    In file included from ../../include/QtGui/private/qcursor_p.h:1:
    In file included from ../../include/QtGui/private/../../../src/gui/kernel/qcursor_p.h:59:
    In file included from ../../include/QtGui/qpixmap.h:1:
    In file included from ../../include/QtGui/../../src/gui/image/qpixmap.h:49:
    In file included from ../../include/QtCore/qsharedpointer.h:1:
    In file included from ../../include/QtCore/../../src/corelib/tools/qsharedpointer.h:50:
    In file included from ../../include/QtCore/qsharedpointer_impl.h:1:
    ../../include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:595:43: warning: field 'd' is uninitialized when used here [-Wuninitialized]
    inline QWeakPointer(X *ptr) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr)
    ^
    In file included from kernel/qcursor_mac.mm:52:
    In file included from ../../include/QtGui/private/qt_cocoa_helpers_mac_p.h:1:
    ../../include/QtGui/private/../../../src/gui/kernel/qt_cocoa_helpers_mac_p.h:158:10: warning: extra qualification on member 'TabletProximityRec' [-Wextra-qualification]
    struct ::TabletProximityRec;
    ^
    ../../include/QtGui/private/../../../src/gui/kernel/qt_cocoa_helpers_mac_p.h:158:8: error: forward declaration of struct cannot have a nested name specifier
    struct ::TabletProximityRec;
    ^~
    ../../include/QtGui/private/../../../src/gui/kernel/qt_cocoa_helpers_mac_p.h:218:10: error: cannot initialize return object of type 'NSString *' with an rvalue of type 'const NSString *'
    { return [reinterpret_cast<const NSString *>(QCFString::toCFStringRef(qstr)) autorelease]; }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/objc/NSObject.h:38:1: note: instance method 'autorelease' is assumed to return an instance of its receiver type ('const NSString *')

    • (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
      ^
      In file included from kernel/qcursor_mac.mm:47:
      In file included from ../../include/QtGui/qevent.h:1:
      In file included from ../../include/QtGui/../../src/gui/kernel/qevent.h:52:
      In file included from ../../include/QtGui/qmime.h:1:
      ../../include/QtGui/../../src/gui/kernel/qmime.h:119:10: warning: private field 'type' is not used [-Wunused-private-field]
      char type;
      ^
      4 warnings and 2 errors generated.
      make[2]: *** [.obj/release-shared/qcursor_mac.o] Error 1
      make[1]: *** [release] Error 2
      make: *** [sub-gui-make_default-ordered] Error 2

    Thanks!



  • @pappaloo -sdk macosx10.7 -no-c++11
    Try this option. Hope will help


  • Lifetime Qt Champion

    Hi,

    For the Qt 4 series, you'll need at least Qt 4.8.6 starting from OS X 10.9



  • I build Qt4.8.6 on 10.10 with the latest Xcode and deploy back to 10.6. But I build the 64 bits, not 32 bits. Qt4.8.6 does need some patching to compile with a recent SDK and its QWidget UI does not look good on 10.10 (the usual misaligned text when there's a new OS X version, waiting for the final 4.8.7...).

    Here's my steps:
    https://dootaini.wordpress.com/2014/12/11/building-qt-4-8-6-x64-on-os-x-10-10-with-xcode-6-x-so-that-it-works-on-os-x-10-6/

    It should work the same with -arch x86 for a 32 bits build. If you really need 4.8.2, you will need to come up with your own patch file, still might gives you some inspiration.

    @jalomic

    For the Qt 4.x series it's "-sdk fullpath_to_sdk", like:

    -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

    "-sdk macosx10.7" would be for Qt5. And if you are using a recent version of Xcode you are unlikely to have the 10.7 sdk.


Log in to reply
 

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