Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.9.2 build error (Mac)
QtWS25 Last Chance

Qt 5.9.2 build error (Mac)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 2 Posters 1.3k Views
  • 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.
  • C Offline
    C Offline
    ChristopherL
    wrote on last edited by
    #1

    I can't seem to get Qt 5.9.2 to build...

    qtbase/src/corelib/kernel/qcore_foundation.mm:491:13: error: static_cast from 'CFTimeZoneRef' (aka 'const __CFTimeZone *') to
          'NSTimeZone *' is not allowed
        return [static_cast<NSTimeZone *>(toCFTimeZone()) autorelease];
    

    The code for method:

    NSTimeZone *QTimeZone::toNSTimeZone() const
    {
    	return [static_cast<NSTimeZone *>(toCFTimeZone()) autorelease];
    }
    

    is the same up to the latest Qt so I'm guessing the problem is with my specific compiler/os. Has anybody else run across this issue? Is there a possible workaround that only involves a code change (and not upgrading OS/compiler)? I'm willing to remove any feature or module needed to get this built.

    The Apple Developer documentation says that NSTimeZone and CFTimeZoneRef are interchangeable but I'm not at all familiar with Objective-C.

    I have also tried disabling timezone features while configuring but it leads to even more build errors. I noticed that the code always checks for

    !defined(QT_NO_SYSTEMLOCALE)
    

    but I can't find where to set that while configuring.

    OS x 10.9 / Xcode 6.2

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

      Hi and welcome to devnet,

      IIRC you are running a too old version of macOS and Xcode, the current supported list is 10.10 - 10.13.

      You can try to replace static_cast with reinterpret_cast.

      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
      • C Offline
        C Offline
        ChristopherL
        wrote on last edited by ChristopherL
        #3

        I've already tried that.

        I'd love to be able to just 86 the whole locale/timezone code but it seems to break more stuff.

        And by the way these OS and XCode upgrade requirements are really annoying.

        SGaistS 1 Reply Last reply
        0
        • C ChristopherL

          I've already tried that.

          I'd love to be able to just 86 the whole locale/timezone code but it seems to break more stuff.

          And by the way these OS and XCode upgrade requirements are really annoying.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ChristopherL said in Qt 5.9.2 build error (Mac):

          I'd love to be able to just 86 the whole locale/timezone code but it seems to break more stuff.

          What do you mean by that ?

          @ChristopherL said in Qt 5.9.2 build error (Mac):
          And by the way these OS and XCode upgrade requirements are really annoying.

          Tell that to Apple, they officially support the 3 last versions of their OS. If you need support for older versions, then you should consider the 5.6 series.

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

          C 1 Reply Last reply
          0
          • SGaistS SGaist

            @ChristopherL said in Qt 5.9.2 build error (Mac):

            I'd love to be able to just 86 the whole locale/timezone code but it seems to break more stuff.

            What do you mean by that ?

            @ChristopherL said in Qt 5.9.2 build error (Mac):
            And by the way these OS and XCode upgrade requirements are really annoying.

            Tell that to Apple, they officially support the 3 last versions of their OS. If you need support for older versions, then you should consider the 5.6 series.

            C Offline
            C Offline
            ChristopherL
            wrote on last edited by
            #5

            @SGaist said in Qt 5.9.2 build error (Mac):

            @ChristopherL said in Qt 5.9.2 build error (Mac):

            I'd love to be able to just 86 the whole locale/timezone code but it seems to break more stuff.

            What do you mean by that ?

            I mean that I can get Qt 5.8 to build just fine because it doesn't have that bug I mentioned that's stopping me from building 5.9.

            @ChristopherL said in Qt 5.9.2 build error (Mac):
            And by the way these OS and XCode upgrade requirements are really annoying.

            Tell that to Apple, they officially support the 3 last versions of their OS. If you need support for older versions, then you should consider the 5.6 series.

            Thanks. I'll take a look at 5.6 next..

            1 Reply Last reply
            0

            • Login

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