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. Building Mac ARM/Intel Universal binaries on Mac
QtWS25 Last Chance

Building Mac ARM/Intel Universal binaries on Mac

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.9k 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.
  • A Offline
    A Offline
    AndyBrice
    wrote on 26 Sept 2022, 20:24 last edited by
    #1

    I have recently upgraded to a Qt commercial license. This has given me access to Qt 5.15.10, which supports build ARM/Intel Universal ('fat') binaries on Mac.

    I am trying to build a Universal binary on my Intel iMac with:

    • macOS 12.5.1
    • XCode 13.4
    • 'Desktop Qt 5.15.10 for macOS (Universal)' kit.

    My .pro file includes:

    QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64

    I use macdeployqt to create the .app file.

    The .app file I create runs on my Intel Mac, but not on my ARM laptop. It crashes at:

    QGuiApplicationPrivate::createPlatformIntegration()

    lipo -detailed_info EasyDataTransform_Universal.app/Contents/MacOS/EasyDataTransform

    Gives:

    Fat header in: EasyDataTransform_1_34_1_snapshot_2_Universal_2.app/Contents/MacOS/EasyDataTransform
    fat_magic 0xcafebabe
    nfat_arch 2
    architecture x86_64
    cputype CPU_TYPE_X86_64
    cpusubtype CPU_SUBTYPE_X86_64_ALL
    capabilities 0x0
    offset 16384
    size 4469408
    align 2^14 (16384)
    architecture arm64
    cputype CPU_TYPE_ARM64
    cpusubtype CPU_SUBTYPE_ARM64_ALL
    capabilities 0x0
    offset 4489216
    size 4657312
    align 2^14 (16384)

    But the Qt libraries don't appear to be recognized as Universal.

    lipo -detailed_info EasyDataTransform_Universal.app/Contents/Frameworks/QtCore.framework/QtCore

    Gives:

    input file EasyDataTransform_Universal.app/Contents/Frameworks/QtCore.framework/QtCore is not a fat file
    Non-fat file: EasyDataTransform_Universal.app/Contents/Frameworks/QtCore.framework/QtCore is architecture: x86_64

    Before I dig into this more, has anyone actually managed to build a Universal binary on an Intel Mac with Qt 5.15.10 using macdeployqt? Am I missing some magic words?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 27 Sept 2022, 05:25 last edited by
      #2

      Since you have a commercial license, you can ask Qt Company and get priority help from them.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AndyBrice
        wrote on 27 Sept 2022, 07:12 last edited by
        #3

        It is a small business license, so I believe I am only entitled to help with installation.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 27 Sept 2022, 07:27 last edited by
          #4

          Ah, sorry then, I don't know the answer here :-(

          (Z(:^

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AndyBrice
            wrote on 30 Sept 2022, 13:53 last edited by
            #5

            I found the issue. I was using
            <QtDir>/macos/bin/macdeployqt not <QtDir>/clang_64/bin/macdeployqt .

            More at:
            https://successfulsoftware.net/2022/09/30/creating-a-mac-universal-binary-for-intel-and-arm-m1-m2-with-qt/

            1 Reply Last reply
            4

            5/5

            30 Sept 2022, 13:53

            • Login

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