3

I have problems using macdeployqt with arm64 build. I am on Apple Silicon M1 machine with macOS12 (Monterey). I have installed Qt 6.2.1 and XCode 13.1.

I created a very simple console application.

#include <QDebug>

int main()
{
    qDebug() << "Hello world.";
}

with qmake PRO file:

QT -= gui
CONFIG += c++11 console
SOURCES += main.cpp

I call qmake with QMAKE_APPLE_DEVICE_ARCHS="arm64". It successfully creates app bundle.

Then I try to run macdeployqt from Qt 6.2.1 bin directory:

./macdeployqt /Users/vk/build-ConsoleApp-Qt_6_2_1_for_macOS_XCode-Release/ConsoleApp.app

...and I receive lots of messages:

ERROR: Could not parse otool output line: "/Users/vk/Qt/6.2.1/macos/lib/QtSvg.framework/Versions/A/QtSvg (architecture arm64):"
ERROR: Could not parse otool output line: "/Users/vk/Qt/6.2.1/macos/lib/QtWidgets.framework/Versions/A/QtWidgets (architecture arm64):"
ERROR: Could not parse otool output line: "/Users/vk/Qt/6.2.1/macos/lib/QtGui.framework/Versions/A/QtGui (architecture arm64):"
ERROR: Could not parse otool output line: "/Users/vk/Qt/6.2.1/macos/lib/QtNetwork.framework/Versions/A/QtNetwork (architecture arm64):"
...

How can I fix this?

  • Sounds like it chokes on fat binaries. If you can change the otool invocation, then adding `-arch arm64` might help. – Siguza Nov 16 '21 at 23:22
  • @Siguza do you happen to know how to do this? From what I understood I can't add any arguments to otool since I don't invoke it directly (macdeployqt invokes otool) – user3027198 Dec 16 '21 at 08:46
  • 1
    UPDATE: apparently those "errors" can be ignored. macdeployqt just gets confused about ARM architecture. Cheers! =) – user3027198 Dec 16 '21 at 09:03
  • 1
    The errors have been changed to warnings as mentioned on https://bugreports.qt.io/browse/QTBUG-98466 – alcroito Mar 14 '22 at 14:18

0 Answers0