Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Mac OSX 10.10 - Compiling Qt 4.8.2
Forum Updated to NodeBB v4.3 + New Features

Mac OSX 10.10 - Compiling Qt 4.8.2

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 2.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pappaloo
    wrote on last edited by
    #1

    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!

    J 1 Reply Last reply
    0
    • P pappaloo

      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!

      J Offline
      J Offline
      jalomic
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sandy.martel23
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved