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. QProcess returns "wrong" result due to architecture, mac.
Forum Updated to NodeBB v4.3 + New Features

QProcess returns "wrong" result due to architecture, mac.

Scheduled Pinned Locked Moved Solved General and Desktop
qprocessarchitecturemacarm
2 Posts 2 Posters 535 Views 1 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.
  • D Offline
    D Offline
    Dariusz
    wrote on last edited by Dariusz
    #1

    Hey

    Ok soo this is fun one.. I want to know what is the architecture of current system... You know x86_64 or arm64 (I'm on mac m1)... the fun part is... if I compile my app for Intel only, and run (mac runs it via rosetta) > QSysInfo::currentCpuArchitecture() I will get x86_64, because thats what whatever enumeration does and thats what Qt gets. Which is not what I want. I want to know if this hardware is x86_64 or arm... so I figured I would run a QProcess("uname",{"-m"}); instead and just get it from OS... but oh boi how I was wrong, that returns x86_64 too!!! Soo my magical question is... how can I use QProcess to get the correct architecture? Or qt lib in general ?

    Regards
    Dariusz

    SOLLUTION :
    Found out that we can check if we are running in translated mode via > https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment

    It would be nice if Qt had an option to figure that one natively via QSysInfo at some point.

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

      Hi,

      You can open a feature request to discuss that matter.

      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