linuxdeployqt
linuxdeployqt copied to clipboard
Add partial Qt 6 support.
With this PR most of the Qt 6 libraries and plugins should be deployed. QWebengine is not yet supported because it requires some specific actions. The tests have been made with Qt 6.3.1 on 64-bit Ubuntu 18.04. See https://github.com/probonopd/linuxdeployqt/pull/495 comments for more details about the tests.
Build, and hence merge, blocked by https://github.com/probonopd/linuxdeployqt/issues/542
You should open a new issue in this repository to finally fix the bundling of appimagetool.
You should open a new issue in this repository to finally fix the bundling of appimagetool.
https://github.com/probonopd/linuxdeployqt/issues/542
Question, how do you install Qt 6.3.1 on Ubuntu 18.04?
I built it from sources with a little script I wrote : https://github.com/RICCIARDI-Adrien/Qt_Builder.
I built it from sources with a little script I wrote : https://github.com/RICCIARDI-Adrien/Qt_Builder.
Use a recent Ubuntu/Debian distribution (at least Ubuntu 20.04).
Use a recent Ubuntu/Debian distribution (at least Ubuntu 20.04).
At the beginning of Qt 6 I was not able to build it on Ubuntu versions older than 20.04, but now with Qt 6.2 and onward I am able to build it. Thank you for pointing that, I need to update the documentation !
Unfortunately, my APP is based on QtWebEngine(Qt6.3.1), What can I do with it ?
@gaojinhsu Is your app open source, so we can test the QtWebEngine deployment with it ? If not, have you tried deploying with this branch version of linuxdeployqt ? You could log the error messages and list the missing dependencies.
@RICCIARDI-Adrien I built Qt6.3.1 from source code with ./configure -platform linux-clang -force-debug-info -nomake examples -nomake tests -opensource --prefix=/home/parallels/Qt/6.3.1/gcc_64/ -webengine-proprietary-codecs
,
my app is a very simple demo with a QWebEngineView on a MainWidget.
after running linuxdeployqt '/home/parallels/Desktop/build-demo-Desktop-Release/demo/opt/demo/demo' -verbose=2 -unsupported-allow-new-glibc -appimage >>~/Desktop/log.txt 2>&1
, demo-x86_64.AppImage file was genarated. And here is the log when I tried to run this file in Terminal.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" libGL error: pci id for fd 10: 1ab8:0010, driver (null) pci id for fd 11: 1ab8:0010, driver (null) Could not find QtWebEngineProcess Aborted (core dumped)
here is the linuxdeployqt
log:
log.txt
@gaojinhsu Thank you for the logs.
- A dump question : I assume that your application is running well when you launch it from Qt Creator, so the execution error you get when running the appimage is only related to the appimage creation ?
- If you try to package the application without giving the option
-appimage
tolinuxdeployqt
you will get a standalone application in/home/parallels/Desktop/build-demo-Desktop-Release/demo/opt/demo/demo
.- Can you try to run it and tell if the same
qt.qpa.plugin
error occurs ? - Can you also execute
ldd
on the application binary ?
- Can you try to run it and tell if the same
@RICCIARDI-Adrien
- That's true, my application is running well when I launch it from Qt Creator.
- The standalone application still gets this error.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: xcb. Aborted (core dumped)
here are the logs, ldd_before_linuxdeployqt.txt linuxdeployqt_log.txt ldd_after_linuxdeployqt.txt
- A dump question : I assume that your application is running well when you launch it from Qt Creator, so the execution error you get when running the appimage is only related to the appimage creation ?
Well, I will not compile Qt 6.3.x from sources. Really out-of-scope since I build my stuff on github actions.
I switched to "linuxdeploy" instead.
https://github.com/martinrotter/rssguard/blob/master/resources/scripts/github-actions/build-linux-mac.sh#L69
@martinrotter Does linuxdeploy work well with Qt 6 ?
@martinrotter Does linuxdeploy work well with Qt 6 ?
@RICCIARDI-Adrien @martinrotter
I tried linuxdeploy
and linuxdeployqt (git branch:add_qt6_support)
both, here is the result.
- os:
ubuntu 22.04
+Qt6
(built from sources with./configure -platform linux-clang -force-debug-info -nomake examples -nomake tests -opensource --prefix=/home/parallels/Qt/6.3.1/gcc_64/ -webengine-proprietary-codecs
)
-
linuxdeploy
: Demo withQWebEngineView:
AppImage file generated, but failed to launch by double-clicking. Demo withoutQWebEngineView
: AppImage file generated, but failed to launch by double-clicking.tried to run the above two Demos in Terminal, also get this error both:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Aborted (core dumped)
-
linuxdeployqt(git branch:add_qt6_support)
: Demo withQWebEngineView
: AppImage file generated, but failed to launch by double-clicking. get same error when runing in Termial.Demo without
QWebEngineView
: AppImage file generated, succeed to launch by double-clicking.
- os:
ubuntu 12.04
+Qt5.15.2
-
linuxdeployqt(git branch: master)
: Demo withQWebEngineView
: AppImage file generated, succeed to launch by double-clicking. compare to other cases, an additional folderlibexec
containingQtWebEngineProcess
andqt.conf
was created.Demo without
QWebEngineView
: AppImage file generated, succeed to launch by double-clicking.
Seems Qt5.15.2
+ ubuntu 12.04
is a better choice, but the tragedy is errors occur when building Qt5.15.2
from sources . I have to build QtWebEngine
with option -webengine-proprietary-codecs
.
Is still there a chance that linuxdeployqt(git branch:add_qt6_support)
can fix the QtWebEngine
issue?
@martinrotter Does linuxdeploy work well with Qt 6 ?
For me, yes.
@martinrotter Does linuxdeploy work well with Qt 6 ?
For me, yes.
Does your app include QtWebEngine?
@martinrotter Does linuxdeploy work well with Qt 6 ?
For me, yes.
Does your app include QtWebEngine?
Yes, I published link to my build script few comments above. I was using linuxdeployQT with Qt 5 for a long time but now I want to migrate to Qt 6 and linux deploy seems to work well in linuxdeploy.
@martinrotter Does linuxdeploy work well with Qt 6 ?
For me, yes.
Does your app include QtWebEngine?
Yes, I published link to my build script few comments above. I was using linuxdeployQT with Qt 5 for a long time but now I want to migrate to Qt 6 and linux deploy seems to work well in linuxdeploy.
I adapt your build scrip for building my app, as a result, appimage file is created, and I can launch it by double-clicking on my PC, but when I copy the file to another PC, I can only launch it from Terminal. here is the log
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
libGL error: pci id for fd 10: 1ab8:0010, driver (null)
pci id for fd 11: 1ab8:0010, driver (null)
qt.webenginecontext:
GL Type: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.0
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes
Init Parameters:
* application-name AppRun.wrapped
* browser-subprocess-path /tmp/.mount_Gamer-f4SSi8/usr/libexec/QtWebEngineProcess
* create-default-gl-context
* disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture
* disable-setuid-sandbox
* disable-speech-api
* enable-features NetworkServiceInProcess,TracingServiceInProcess
* enable-threaded-compositing
* in-process-gpu
* use-gl desktop
I think maybe this error qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
can be ingored.
Anyway, thanks, dude. I can see victory is just at the corner.
@martinrotter Does linuxdeploy work well with Qt 6 ?
For me, yes.
Does your app include QtWebEngine?
Yes, I published link to my build script few comments above. I was using linuxdeployQT with Qt 5 for a long time but now I want to migrate to Qt 6 and linux deploy seems to work well in linuxdeploy.
I adapt your build scrip for building my app, as a result, appimage file is created, and I can launch it by double-clicking on my PC, but when I copy the file to another PC, I can only launch it from Terminal. here is the log
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" libGL error: pci id for fd 10: 1ab8:0010, driver (null) pci id for fd 11: 1ab8:0010, driver (null) qt.webenginecontext: GL Type: desktop Surface Type: OpenGL Surface Profile: CompatibilityProfile Surface Version: 4.0 QSG RHI Backend: OpenGL Using Supported QSG Backend: yes Using Software Dynamic GL: no Using Multithreaded OpenGL: yes Init Parameters: * application-name AppRun.wrapped * browser-subprocess-path /tmp/.mount_Gamer-f4SSi8/usr/libexec/QtWebEngineProcess * create-default-gl-context * disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture * disable-setuid-sandbox * disable-speech-api * enable-features NetworkServiceInProcess,TracingServiceInProcess * enable-threaded-compositing * in-process-gpu * use-gl desktop
I think maybe this error
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
can be ingored. Anyway, thanks, Dude. I can see victory is just at the corner.
I have some problems with gstreamer via linuxdeploy. Perhaps report it as a bug in their github page. maybe they will be able to help/fix.
What's the status of this, any chance of this getting merged @probonopd ?
All checks have failed
First step would be to get this to build "green" rather than "red" on the GitHub Actions CI. Then we could consider it for merging.
Builds "green" now. Thanks @RICCIARDI-Adrien.
Fingers crossed. Hopefully it will not break things. Otherwise will need to rollback.