Skip to content

Remove false dependency on VirtualKeyboard#88

Merged
FlorentRevest merged 1 commit intoAsteroidOS:masterfrom
beroset:fix-keyboard-dependency
Apr 14, 2026
Merged

Remove false dependency on VirtualKeyboard#88
FlorentRevest merged 1 commit intoAsteroidOS:masterfrom
beroset:fix-keyboard-dependency

Conversation

@beroset
Copy link
Copy Markdown
Member

@beroset beroset commented Mar 23, 2026

This application doesn't need the VirtualKeyboard ECM to compile, so it is removed. See also AsteroidOS/meta-asteroid#232 for the corresponding bitbake recipe change.

@MagneFire
Copy link
Copy Markdown
Member

The goal is also for runtime checking. i.e. to ensure that the QML module to avoid runtime issues (https://api.kde.org/ecm/module/ECMFindQmlModule.html)

That's why I think this makes sense to have, but maybe we should keep it as a warning as this check doesn't make much sense when cross compiling.

@beroset
Copy link
Copy Markdown
Member Author

beroset commented Mar 23, 2026

The RDEPENDS dependency is still here. Does that meet the purpose you have in mind?

@PureTryOut
Copy link
Copy Markdown
Contributor

Yes, QML modules in general are only needed at runtime and the check is there to make the packager not forget about it. I would very much keep the check.
I think the real issue here is that the module is a bit different for Qt5 and the current check can't find it for some reason.

I'm not in favor of removing the check, we should just fix it for Qt5 (or not bother and go Qt6 only).

@PureTryOut
Copy link
Copy Markdown
Contributor

I just checked, and Qt5VirtualKeyboard does seem to provide the module with the name we're requesting it for.

$ cat /usr/lib/qt5/qml/QtQuick/VirtualKeyboard/qmldir 
module QtQuick.VirtualKeyboard
plugin qtquickvirtualkeyboardplugin
classname QtQuickVirtualKeyboardPlugin
typeinfo plugins.qmltypes
depends QtQuick 2.0
depends QtQuick.Window 2.2
depends QtQuick.Layouts 1.0
depends Qt.labs.folderlistmodel 2.1
depends QtQuick.VirtualKeyboard.Settings 2.2
depends QtQuick.VirtualKeyboard.Styles 2.2

That is the same we're requesting: ecm_find_qmlmodule(QtQuick.VirtualKeyboard 2.1 REQUIRED).

Then again perhaps 2.1 is not the right version, I'm not sure where the version comes from and how I should know what version to request.

@FlorentRevest
Copy link
Copy Markdown
Member

ecm_find_qmlmodule uses qmlplugindump on the qml module directory. That tool tries to link against the QML module to determine some values. In a cross compilation setup this fails to link the target shared-object, eg:

$ ./recipe-sysroot-native/usr/bin/qmlplugindump -path ./recipe-sysroot/usr/lib/qml/QtQuick/VirtualKeyboard/
QQmlComponent: Component is not ready
file:///home/user/asteroid/build/tmp/work/armv7vehf-neon-oe-linux-gnueabi/qml-asteroid/+git/recipe-sysroot/usr/lib/qml/QtQuick/VirtualKeyboard/qmldir: plugin cannot be loaded for module "": '/home/user/asteroid/build/tmp/work/armv7vehf-neon-oe-linux-gnueabi/qml-asteroid/+git/recipe-sysroot/usr/lib/qml/QtQuick/VirtualKeyboard/libqtquickvirtualkeyboardplugin.so' is an invalid ELF object (wrong cpu architecture)

At some point, upstream ECM fixed this by skipping the call to qmlplugindump when cross compiling KDE/extra-cmake-modules@ba7492f

However, they only fixed the Qt6 path. The Qt5 path still calls qmlplugindump unconditionally...


The version of extra-cmake-modules we ship https://github.com/AsteroidOS/meta-asteroid/blob/master/recipes-devtools/cmake/extra-cmake-modules_git.bb#L6 lacks the above fix but even if we bump it up

--- a/recipes-devtools/cmake/extra-cmake-modules_git.bb
+++ b/recipes-devtools/cmake/extra-cmake-modules_git.bb
@@ -3,8 +3,8 @@ LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING-CMAKE-SCRIPTS;md5=54c7042be62e169199200bc6477f04d1"

 SRC_URI = "git://invent.kde.org/frameworks/extra-cmake-modules.git;protocol=https;branch=master"
-SRCREV = "0064cf77e96acda8a99c0eba4cc89f83768b65d3"
-PV = "5.96.0"
+SRCREV = "e10d4a6fe97c7ea51d9ed48c2a62f4205eb4c1fa"
+PV = "6.25.0"
 S = "${WORKDIR}/git"

 ALLOW_EMPTY:${PN} = "1"
@@ -14,3 +14,7 @@ EXTRA_OECMAKE += "-DBUILD_TESTING=off -DBUILD_HTML_DOCS=OFF -DBUILD_QTHELP_DOCS=
 inherit cmake

 FILES:${PN}-dev += "${datadir}/ECM"
+
+# the dep of /usr/share/ECM/kde-modules/kde-git-commit-hooks/json-schema.py
+# on /usr/bin/python3 is a false positive
+INSANE_SKIP:${PN}-dev = "file-rdeps"

It's still broken on Qt5.

@FlorentRevest
Copy link
Copy Markdown
Member

Let's not bother fixing up upstream ECM since no one cares about Qt5 anymore anyway.

Let's move that

ecm_find_qmlmodule(QtQuick.VirtualKeyboard 2.1 REQUIRED)

line to the Qt6 block, next to the

    ecm_find_qmlmodule(Qt5Compat.GraphicalEffects 1.0 REQUIRED)

And bump our extra-cmake-modules so it's ready when we switch over to Qt6

@MagneFire
Copy link
Copy Markdown
Member

Let's not bother fixing up upstream ECM since no one cares about Qt5 anymore anyway.

Let's move that

ecm_find_qmlmodule(QtQuick.VirtualKeyboard 2.1 REQUIRED)

line to the Qt6 block, next to the

    ecm_find_qmlmodule(Qt5Compat.GraphicalEffects 1.0 REQUIRED)

And bump our extra-cmake-modules so it's ready when we switch over to Qt6

We can also keep the check a warning for Qt5 as it was before. Making it required for Qt6 seems sensible to me as well.

@FlorentRevest
Copy link
Copy Markdown
Member

Yep, sgtm

@PureTryOut
Copy link
Copy Markdown
Contributor

That sounds fine to me!

With Qt5, the VirtualKeyboard ECM does not correctly detect the
VirtualKeyboard, but it does with Qt6, so this moves that check to be
Qt6 only.

Signed-off-by: Ed Beroset <beroset@ieee.org>
@beroset beroset force-pushed the fix-keyboard-dependency branch from e6b78ce to 78e2bb4 Compare April 13, 2026 22:29
@beroset
Copy link
Copy Markdown
Member Author

beroset commented Apr 13, 2026

OK, I've updated this PR according to my understanding of the consensus view. Thanks, all!

@PureTryOut
Copy link
Copy Markdown
Contributor

PureTryOut commented Apr 14, 2026

I'd still do the check on Qt5 too, just without making it required there. Qt5 still has that runtime dependency and it's still good to inform the packager about it, even if lying about it's requiredness.

@FlorentRevest
Copy link
Copy Markdown
Member

I think at this point we just want to unblock the build to actually start the Qt6 migration system-wide so i'll just merge this as is. Let's not overthink the Qt5 case since it's going away soon anyway.

@FlorentRevest FlorentRevest merged commit 02fe287 into AsteroidOS:master Apr 14, 2026
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.

4 participants