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. Qt 6.9.3, 6.10.1 on Mac: QMAKE_APPLE_DEVICE_ARCHS="arm64" but QT_ARCH reports "x86_64"

Qt 6.9.3, 6.10.1 on Mac: QMAKE_APPLE_DEVICE_ARCHS="arm64" but QT_ARCH reports "x86_64"

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 152 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.
  • V Offline
    V Offline
    Violet Giraffe
    wrote last edited by Violet Giraffe
    #1

    I'm building for arm64:
    /Users/me/Qt/6.10.1/macos/bin/qmake -o Makefile /Users/me/project/lib/lib.pro CONFIG+=debug CONFIG+=qml_debug -spec macx-clang QMAKE_APPLE_DEVICE_ARCHS=arm64

    But message($$QT_ARCH) prints "x86_64", why??
    MacOS 26.1, the latest Xcode is insalled from App Store, command line tools were updated after updating Xcode.

    lipo -info mylib.a says it was actually compiled for x86_64 despite the flag saying arm64, and this flag (-arch arm64) is present on the clang command line.

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

      Hi,

      What architecture is your build machine ?

      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
      • V Offline
        V Offline
        Violet Giraffe
        wrote last edited by Violet Giraffe
        #3

        Hi, happy New Year!
        It's M1. I can't build a working app on M1 at all, neither for x64 nor for arm64, and I suspect something is malfunctioning (as opposed to just wrong project settings). It might be new with the recent Xcode update a few weeks ago.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Violet Giraffe
          wrote last edited by Violet Giraffe
          #4

          Does anyone have any advice on how to properly select your target architecture with the latest Xcode+macOS+Qt versions?

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

            I just created one with a minimal project with a dummy main.cpp and:

            TEMPLATE = app
            QT += widgets
            SOURCES = main.cpp
            QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
            

            as .pro file content.

            The build is screaming at me because the x86_64 symbols are missing so it does work correctly (the architecture missing is expected in my case).
            I also tested with that variable removed from the .pro file and set on the command line and it's working as expected as well.
            So some things to check:

            • Do you have QMAKE_APPLE_DEVICE_ARCHS set somewhere in one of your project file ?
            • Are you doing this call from a clean state (i.e. did you call make distclean before calling qmake?
            • Do you have some .qmake.stash file lying around that might wreak havock ?

            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

            • Login

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