Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
1.12.0
-
None
-
5f1b52e1c6f7668c3ea21ec11fde818ee6efd521
Description
I'm trying to build https://github.com/mitchcurtis/slate/blob/master/app/app.qbs statically so that I can deploy it easily. When using qmake, the application runs fine, but after switching to Qbs, I ran into this error:
QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. 11:40:57: The program has unexpectedly finished.
I've seen e.g. QBS-1346 and QBS-1121 which have the same error message as me. I added the relevant line from the example in QBS-1121:
Depends { name: "Qt.qxcb"; condition: Qt.core.staticBuild && qbs.targetOS.contains("linux") }
That got me a bit further:
11:51:40: Starting /home/mitch/dev/slate-qt5_slate_static_release-Release/qtc_qt5_slate_static_release_Release/install-root//app... QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds loaded library "Xcursor" QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5" since plugins are disabled in static builds QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1" since plugins are disabled in static builds QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" since plugins are disabled in static builds QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QStyleFactoryInterface" since plugins are disabled in static builds app.applicationsettings: Loading settings from "/home/mitch/.config/Unknown Organization.conf" Previously registered enum will be overwritten due to name clash: QQuickListView.Center QQmlApplicationEngine failed to load component qrc:/qml/main.qml:176 Type Ui.CanvasContainer unavailable qrc:/qml/ui/CanvasContainer.qml:60 Cannot assign object to list property "data" QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QAccessibleBridgeFactoryInterface" since plugins are disabled in static builds 11:54:22: The program has unexpectedly finished.
I'm still trying to work out the remaining issues; the QML issue looks like a bug in the QML engine, but there are still lots of warnings about plugins being disabled which doesn't look right.
Taking a hint from QBS-1346, I've attached plugins.list and qml_plugin_import.cpp.
I looked at https://doc.qt.io/qbs/howtos.html, but it doesn't mention the "Depends { name: "Qt.qxcb"" stuff. If this is necessary to get statically built applications working, then it should be documented.