Package: gambas3-gb-qt6-ext
Version: 3.20.2-1
Severity: important
Tags: upstream patch fixed-upstream
X-Debbugs-Cc: [email protected]
Dear Maintainer,
On Debian 13 (trixie), gambas3-gb-qt6-ext cannot be loaded at runtime
because it requests the gb.qt5 component interface -- which is not
present on systems that install only the Qt6 stack (as is the case on
trixie, where no gambas3-gb-qt5 package is provided).
Steps to reproduce
==================
1. Install gambas3, gambas3-gb-qt6 and gambas3-gb-qt6-ext on a clean
Debian 13 system. Do NOT install any gb.qt5 component.
2. Create or open any Gambas 3 project whose .project declares:
Component=gb.qt6
Component=gb.qt6.ext
3. Run it (gbx3, or "Run" from the IDE). The runtime aborts with:
** OOPS! INTERNAL ERROR. Program aborting, sorry! :-(
** Cannot find interface of library 'gb.qt5'
** ERROR: #27: Cannot load component 'gb.qt5': cannot find component
The crash happens before any user code runs, on component load.
Diagnosis
=========
The .component metadata file shipped with the binary correctly states
the dependency:
$ cat /usr/lib/gambas3/gb.qt6.ext.component
[Component]
Author=Benoit Minisini
Require=gb.qt6
However, the compiled shared library hardcodes a request for the
gb.qt5 interface:
$ strings /usr/lib/gambas3/gb.qt6.ext.so | grep '^gb\.'
gb.qt5
This is a leftover from when gb.qt6.ext was created by copying the
sources of gb.qt5.ext: the .component file was updated, but the
GB.GetInterface() call in src/ext/main.cpp was not. The result is a
binary that -- on any system where gb.qt5 is absent -- is unusable.
Affected source location (upstream tree, tag 3.20.2):
gb.qt6/src/ext/main.cpp:57
GB.GetInterface("gb.qt5", QT_INTERFACE_VERSION, &QT);
Upstream fix
============
The issue was fixed upstream on 2025-04-02 in commit eb1318a1,
"Load the correct component interface and do not crash anymore.":
https://gitlab.com/gambas/gambas/-/commit/eb1318a1
The change is a one-line typo fix:
--- a/gb.qt6/src/ext/main.cpp
+++ b/gb.qt6/src/ext/main.cpp
@@ -54,7 +54,7 @@ GB_DESC *GB_CLASSES[] EXPORT =
int EXPORT GB_INIT(void)
{
- GB.GetInterface("gb.qt5", QT_INTERFACE_VERSION, &QT);
+ GB.GetInterface("gb.qt6", QT_INTERFACE_VERSION, &QT);
return 0;
}
The fix is present in upstream tags 3.20.3 and 3.20.4, and the
3.20.4-1 package already in unstable/testing is therefore not
affected.
Suggested action
================
As trixie's 3.20.2-1 is the version most users will encounter for the
lifetime of the release, would the Debian Gambas Team consider
proposing this fix for inclusion in a trixie point release (or via
trixie-backports)?
The patch is minimal, strictly scoped to one source file in the
gb.qt6.ext leaf component, and has been validated by two subsequent
upstream releases. Without it, gb.qt6.ext is effectively unusable on
trixie, which prevents any Gambas 3 project that depends on the
extended Qt widgets (Dial, LCDNumber, TextEdit) from running with the
Qt6 toolkit.
Workaround
==========
Removing "Component=gb.qt6.ext" from the project's .project file is a
viable workaround when the affected widgets aren't required (notably,
GridView has migrated to gb.form in Gambas 3 and no longer needs the
extension component).
Thanks for maintaining Gambas in Debian.