Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partial Qt 6 support. #541

Merged
merged 3 commits into from
Apr 4, 2023

Conversation

RICCIARDI-Adrien
Copy link
Contributor

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 #495 comments for more details about the tests.

@probonopd
Copy link
Owner

probonopd commented Jul 29, 2022

Build, and hence merge, blocked by #542

@TheAssassin
Copy link
Collaborator

TheAssassin commented Jul 29, 2022

You should open a new issue in this repository to finally fix the bundling of appimagetool.

@probonopd
Copy link
Owner

probonopd commented Jul 29, 2022

You should open a new issue in this repository to finally fix the bundling of appimagetool.

#542

Repository owner deleted a comment from TheAssassin Jul 29, 2022
@martinrotter
Copy link

Question, how do you install Qt 6.3.1 on Ubuntu 18.04?

@RICCIARDI-Adrien
Copy link
Contributor Author

I built it from sources with a little script I wrote : https://github.com/RICCIARDI-Adrien/Qt_Builder.

@martinrotter
Copy link

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).

@RICCIARDI-Adrien
Copy link
Contributor Author

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 !

@gaojinhsu
Copy link

Unfortunately, my APP is based on QtWebEngine(Qt6.3.1), What can I do with it ?

@RICCIARDI-Adrien
Copy link
Contributor Author

@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.

@gaojinhsu
Copy link

gaojinhsu commented Sep 3, 2022

@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

@RICCIARDI-Adrien
Copy link
Contributor Author

@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 to linuxdeployqt 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 ?

@gaojinhsu
Copy link

@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 ?

@martinrotter
Copy link

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

@RICCIARDI-Adrien
Copy link
Contributor Author

@martinrotter Does linuxdeploy work well with Qt 6 ?

@gaojinhsu
Copy link

gaojinhsu commented Sep 6, 2022

@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.

  1. 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 with QWebEngineView: AppImage file generated, but failed to launch by double-clicking.
    Demo without QWebEngineView: 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 with QWebEngineView: 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.

  1. os: ubuntu 12.04 + Qt5.15.2
  • linuxdeployqt(git branch: master)
    Demo with QWebEngineView: AppImage file generated, succeed to launch by double-clicking.
    compare to other cases, an additional folder libexec containing QtWebEngineProcess and qt.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
Copy link

@martinrotter Does linuxdeploy work well with Qt 6 ?

For me, yes.

@gaojinhsu
Copy link

@martinrotter Does linuxdeploy work well with Qt 6 ?

For me, yes.

Does your app include QtWebEngine?

@martinrotter
Copy link

@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.

@gaojinhsu
Copy link

gaojinhsu commented Sep 7, 2022

@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
Copy link

@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.

@arximboldi
Copy link

What's the status of this, any chance of this getting merged @probonopd ?

@probonopd
Copy link
Owner

probonopd commented Oct 12, 2022

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.

@probonopd
Copy link
Owner

probonopd commented Apr 4, 2023

Builds "green" now. Thanks @RICCIARDI-Adrien.

Fingers crossed. Hopefully it will not break things. Otherwise will need to rollback.

@probonopd probonopd merged commit edbf092 into probonopd:master Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants