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

Supporting Qt5 and Qt6, Images and Dependencies Issues #29

Open
AIIX opened this issue Jan 15, 2023 · 8 comments
Open

Supporting Qt5 and Qt6, Images and Dependencies Issues #29

AIIX opened this issue Jan 15, 2023 · 8 comments

Comments

@AIIX
Copy link

AIIX commented Jan 15, 2023

Image and Mycroft-GUI issues:

  • Mycroft images are based on Ubuntu images shipping Qt version 5.12
  • Neon images are based on Debian which are also shipping older Qt versions
  • OVOS build root ships images based on Qt5.15 and OVOS manjaro images have already started shipping Qt6 along with Qt5 , Manjaro being a rolling release will probably be the first to drop Qt5 support in coming months
  • Qt6 is not backwards compatible with Qt5, Skills, GUI and everything is will have to be ported to Qt6 that allows us to continue to work on newer distributions.
  • Qt 5.15 changes are not backwards compatible with Qt 5.12, GUI has been kept back on upgrading the skill API to Qt 5.15 due to the issue of other dependent projects shipping on older Qt package

Multimedia Framework Issues:

  • QtMultimedia as of version Qt5.12 to Qt6.5 has been based of GStreamer, GStreamer requires various codecs for playback to be possible, but also seems to have other issues regarding media playback.
  • QT-AV is a third party project that seems to solve the playback issue on Qt5 but it has been depreciated for Qt6 and will no longer be maintained or supported, this means no distribution packaging Qt6 will be able to build Qt-AV
  • LibMPV and LibVLC (which also seems depreciated) will require a manual port to work as backends for the Multimedia framework, This also requires knowledge of OpenGL / OpenGLES and due to the nature is out of scope as a solution to the playback issues.
  • Mycroft-GUI cannot depend on QtAV:
    • QtAV is third party project that lives out of tree and all support seems to have been depreciated
    • QtAV QML api is not dual licensed, which means the cpp backend cannot be directly supported in Mycroft-GUI multimedia service, it can only be used as a direct import from QML as long as it is installed as a shared library by the distribution

Major changes:

  • We will be jumping directly from Qt5.12 to Qt6 api.
  • Refactor of Mycroft-GUI protocol with QT6 API Changes
  • Skill UI dropping Qt5 syntax and api in favor for Qt6 changes
  • Qt6 will not be backwards compatible with Qt5, so any older distributions will not be able to run Qt6 ported GUI.
@JarbasAl
Copy link
Member

copy pasting from chat

is_qt6_available and is_qt5_available could be helper methods in ovos_utils to be used to conditionally select QML files in skills, if skill devs are willing to maintain compat

with the qt6 move i encourage skills to keep a qt5 version qml file and load it conditionally

at same time skill.json spec is being extended for skills to identify what they need, so OSM can be smart about it and refuse to install/fallback to older skill versions

lets assume mycroft-core sticks to qt5 in all their images etc, if we want skills to be cross compatible we will need skills to explicitly support both, at least as part of a transition period

@AIIX
Copy link
Author

AIIX commented Feb 8, 2023

is_qt6_available and is_qt5_available is not going to work on many distributions, as distributions might ship both qt6 and qt5 packages during the migration phase to qt6 (currently as done by manjaro) , ovos-shell / mycroft-gui library will also only compile under a single qt version, so even if the distribution is shipping qt5 and ovos-shell and mycroft-gui lib have been built against qt6, qt5 skills will not load and same for the other way around.

There is no naming schema in QML to differentiate between QT5 and QT6 qml files either, and qml files targeting Qt6 cannot live under the same folder as qml files targeting Qt5.

Skills specifically need to target Qt5 and Qt6. Qt5 will eventually fully be replaced by Qt6 and a better approach here would be to let the distribution / setup specifically target which UI version to load and use during the migration phase to avoid detection of wrong QT versions.

Qt6 resource files during the migration phase in skills will be located under the "ui6" folder in skills, Qt5 resource files during the migration phase will continue to live under "ui" folder, whenever Qt5 support is fully dropped the "ui6" folder will replace the "ui" spec'd folder in skills.

Images / Setups targeting qt6 during the migration phase can simply add "qt_version: 6" to the GUI config under mycroft.conf to load qt6 resource files, PR for this is at OpenVoiceOS/OVOS-workshop#50

@AIIX
Copy link
Author

AIIX commented Feb 8, 2023

Also updating the issue as the timeline to switch / support Qt6 setups has shortened, KDE frameworks have fully switched all master branches to QT6 and will see a stable release in the coming weeks

What do these changes affect:

  • KF5 namespace has been updated to KF6, so compile targets for GUI need to be either KF5 or KF6 this will depend on what version of frameworks distributions ship
  • KF5 and KF6 are not compatible just as Qt5 QML and Qt6 QML resources are incompatible

Proposed changes for OVOS Shell:

  • the current OVOS Shell master branch will be tagged and released for QT5 targets, except for bug fixes, no new features to be added here.
  • OVOS Shell after tagging and release against QT5 will be rebased of QT6
  • Any new features and changes should be targeted only against the QT6 branch

@JarbasAl
Copy link
Member

JarbasAl commented Feb 8, 2023

conversation happening in other PRs, but here is a comment raising some points to keep issues connected

OpenVoiceOS/OVOS-workshop#50 (comment)

@AIIX
Copy link
Author

AIIX commented Feb 8, 2023

  • The above PR has been closed, as its non conclusive and I do not agree to mixing and matching of QT5 and QT6 resources into a single folder for technical reasons mentioned in the above closed PR.
  • Images / Platforms that need to package or support QT6 can use the QT6 branch of the skill until it replaces the normal branch, this means there will be no changes to the UI folder or Path going forward.
  • Mycroft-GUI being QT6 and OVOS-Shell being QT6 available will be marked as the start of when images can start packaging the QT6 branches of skill, if they wish to or they can simply use the QT5 release and continue packaging QT5 branches.
  • OSM can decide to add its own logic it choose the correct branch / version of skills to install.
  • Images are built by I and @j1nx and whoever else can choose to package what version of skills to target along with version of GUI and Shell, just like any distribution can decide to package a certain versions of any normal Linux package release.
  • The above now follows the same process as other Linux software releases.

@AIIX
Copy link
Author

AIIX commented Feb 9, 2023

Skills Port Status (To be updated here on every milestone):

@j1nx
Copy link
Member

j1nx commented Mar 14, 2023

Looked into the status of QT6 within Buildroot. Looks like it might take some time, so guess switching the Buildroot image over to QT6 will not happen until further down the road this year.

At the moment only some base QT6 packages are merged into the master branch;
https://github.com/buildroot/buildroot/tree/master/package/qt6

There is work going on, but I do not see to much new packages around the corner;
https://patchwork.ozlabs.org/project/buildroot/list/?series=&submitter=&state=*&q=qt6&archive=&delegate=

@JarbasAl
Copy link
Member

this is not yet completed.....

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

No branches or pull requests

3 participants