Qt6.2.2 macdeployqt plugin rpath issues #2823
Replies: 7 comments 19 replies
-
This looks like an upstream bug. If we look at
It also has the correct
If we look at what First, it copies
and then uses
Of course, since Please report this upstream so that it can get fixed. |
Beta Was this translation helpful? Give feedback.
-
I will point out that install available from qt.io works fine. It seems to work because of a difference in rpath usage in the frameworks. It seems macdeployqt discovers a set of rpaths when processing frameworks, and uses them to resolve references from plugins. In any event, this issue appears to be specific to the homebrew install of Qt. |
Beta Was this translation helpful? Give feedback.
-
What's the output of
for the install from qt.io? |
Beta Was this translation helpful? Give feedback.
-
It seems to me the error results from this logic in macdeployqt: In https://github.com/qt/qttools/blob/6.2.2/src/macdeployqt/macdeployqt/main.cpp deployQtFrameworks is called (L212), and the resulting deploymentInfo is passed to deployPlugins at L261. In https://github.com/qt/qttools/blob/6.2.2/src/macdeployqt/shared/shared.cpp, deployQtFrameworks (L958) builds a QSet rpathsUsed which it returns as deploymentInfo.rpathsUsed. In https://github.com/qt/qttools/blob/6.2.2/src/macdeployqt/shared/shared.cpp, deployPlugins passes this information to getQtFrameworks (L1188), which calls parseOtoolLibraryLine which prints the error message (L272). I can see the deploymentInfo.rpathsUsed is empty with brew, and non-empty with the qt.io install. |
Beta Was this translation helpful? Give feedback.
-
Indeed changing the id of one of the used frameworks to use rpath like the qt.io install works. % pwd Now, the brew macdeployqt works. I don't know why the id of the qt libraries has an absolute path with brew and uses rpath with qt.io, but that does seem to be a critical difference. |
Beta Was this translation helpful? Give feedback.
-
Hi there, I'm trying to create an app bundle for a Qt application. Steps:
I get the following errors and a not working app:
Is this the same problem or should I create a new issue? The workaround in https://github.com/orgs/Homebrew/discussions/2823#discussioncomment-2010340 does resolve the error messages in the macdeployqt step, but the resulting app doesn't work. Steps:
Crash with:
|
Beta Was this translation helpful? Give feedback.
-
`-------------------------------------
|
Beta Was this translation helpful? Give feedback.
-
macdeployqt shows numerous ERRORS when deploying plugins.
This is similar to Qt6 macdeployqt not copying plugins #73019. However, the fix for that should be in Qt 6.2.2.
% brew info qt
qt: stable 6.2.2 (bottled), HEAD
Cross-platform application and UI framework
https://www.qt.io/
/usr/local/Cellar/qt/6.2.2 (12,156 files, 510.3MB) *
Poured from bottle on 2022-01-20 at 05:57:54
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/qt.rb
License: GFDL-1.3-only and GPL-2.0-only and GPL-3.0-only and LGPL-2.1-only and LGPL-3.0-only
==> Dependencies
Build: cmake ✘, ninja ✔, node ✘, pkg-config ✔
Required: assimp ✔, brotli ✔, dbus ✔, double-conversion ✔, freetype ✔, glib ✔, hunspell ✔, icu4c ✔, jasper ✔, jpeg ✔, libb2 ✔, libpng ✔, libtiff ✔, md4c ✔, pcre2 ✔, python@3.9 ✔, sqlite ✔, webp ✔, zstd ✔
==> Requirements
Build: Xcode ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 38,528 (30 days), 175,545 (90 days), 704,469 (365 days)
install-on-request: 19,579 (30 days), 86,925 (90 days), 269,962 (365 days)
build-error: 67 (30 days)
The log from macdeployqt shows numerouse ERRORS, here are a few:
Log:
Log: Deploying plugins from "/usr/local/share/qt/plugins"
Log: copied: "/usr/local/share/qt/plugins/platforms/libqcocoa.dylib"
Log: to "GPSBabelFE.app/Contents/PlugIns/platforms/libqcocoa.dylib"
Log: Using strip:
Log: stripped "GPSBabelFE.app/Contents/PlugIns/platforms/libqcocoa.dylib"
Log: Using otool:
Log: inspecting "GPSBabelFE.app/Contents/PlugIns/platforms/libqcocoa.dylib"
ERROR: Cannot resolve rpath "@rpath/QtGui.framework/Versions/A/QtGui"
ERROR: using QSet("/Users/administrator/gpsbabel_base/gui/lib")
ERROR: Cannot resolve rpath "@rpath/QtCore.framework/Versions/A/QtCore"
ERROR: using QSet("/Users/administrator/gpsbabel_base/gui/lib")
Log:
Log: Deploying Qt frameworks found inside: QList("GPSBabelFE.app/Contents/PlugIns/platforms/libqcocoa.dylib")
Log: copied: "/usr/local/share/qt/plugins/styles/libqmacstyle.dylib"
Log: to "GPSBabelFE.app/Contents/PlugIns/styles/libqmacstyle.dylib"
Log: Using strip:
Log: stripped "GPSBabelFE.app/Contents/PlugIns/styles/libqmacstyle.dylib"
Log: Using otool:
Log: inspecting "GPSBabelFE.app/Contents/PlugIns/styles/libqmacstyle.dylib"
ERROR: Cannot resolve rpath "@rpath/QtWidgets.framework/Versions/A/QtWidgets"
ERROR: using QSet("/Users/administrator/gpsbabel_base/gui/lib")
ERROR: Cannot resolve rpath "@rpath/QtGui.framework/Versions/A/QtGui"
ERROR: using QSet("/Users/administrator/gpsbabel_base/gui/lib")
ERROR: Cannot resolve rpath "@rpath/QtCore.framework/Versions/A/QtCore"
ERROR: using QSet("/Users/administrator/gpsbabel_base/gui/lib")
Log:
macdeployqt_log.txt
Beta Was this translation helpful? Give feedback.
All reactions