QT plugins from profile not found (QT_PLUGIN_PATH)

  • Done
  • quality assurance status badge
Details
5 participants
  • Morgan Smith
  • Antero Mejr
  • kiasoc5
  • Marek Pa?nikowski
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Morgan Smith
Severity
normal
M
M
Morgan Smith wrote on 11 Sep 2022 22:53
(address . bug-guix@gnu.org)(address . maxim.cournoyer@gmail.com)
DM5PR03MB3163C015FA2CEEB2027D8037C5459@DM5PR03MB3163.namprd03.prod.outlook.com
Hello!

Ever since commit 1f466ed6be932526fc69e72ffd50390691d0d382 we don't look
at the user's value of QT_PLUGIN_PATH. The comment says this is to
prevent plugin confusion between Qt5 and Qt6 stuff.

This is very unfortunate for me. I have qtwayland (qt5) installed in my
profile so QT programs can find the wayland plugin they need to display
themselves on wayland. Unfortunately, they no longer can.

Maybe we could make our own Guix environment variables like
GUIX_QT5_QT_PLUGIN_PATH and GUIX_QT6_QT_PLUGIN_PATH and then add those
to the wrapper? So like qtwayland would set GUIX_QT5_QT_PLUGIN_PATH and
then the wrapper in qt-utils.scm could read that? Just an idea, I have
no clue what a good solution for this issue looks like.

Thanks,

Morgan
M
M
Maxim Cournoyer wrote on 14 Sep 2022 16:17
(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)(address . 57742@debbugs.gnu.org)
87illq11il.fsf@gmail.com
[re-sending again, this time with debbugs in CC]

Hello,

Morgan Smith <Morgan.J.Smith@outlook.com> writes:

Toggle quote (6 lines)
> Hello!
>
> Ever since commit 1f466ed6be932526fc69e72ffd50390691d0d382 we don't look
> at the user's value of QT_PLUGIN_PATH. The comment says this is to
> prevent plugin confusion between Qt5 and Qt6 stuff.

Yes; unfortunately Qt doesn't seem to have thought about making that
variable usable with both Qt5 and Qt6 at the same time. It's probably
worth reporting the issue upstream.

Toggle quote (4 lines)
> This is very unfortunate for me. I have qtwayland (qt5) installed in my
> profile so QT programs can find the wayland plugin they need to display
> themselves on wayland. Unfortunately, they no longer can.

I see.

Toggle quote (6 lines)
> Maybe we could make our own Guix environment variables like
> GUIX_QT5_QT_PLUGIN_PATH and GUIX_QT6_QT_PLUGIN_PATH and then add those
> to the wrapper? So like qtwayland would set GUIX_QT5_QT_PLUGIN_PATH and
> then the wrapper in qt-utils.scm could read that? Just an idea, I have
> no clue what a good solution for this issue looks like.

That could work for qt-build-system built packages, yes. We could also
attempt to patch our Qt packages to honor these directly, if that's not
too difficult. Then straightforward search paths could be defined for
them, and the wrapper in qt-utils adjusted.

Thanks,

Maxim
M
M
Maxim Cournoyer wrote on 7 Oct 2022 21:39
Re: bug#57742: QT plugins from profile not found (QT_PLUGIN_PATH)
(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)(address . 57742@debbugs.gnu.org)
877d1b5sor.fsf@gmail.com
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (16 lines)
> [re-sending again, this time with debbugs in CC]
>
> Hello,
>
> Morgan Smith <Morgan.J.Smith@outlook.com> writes:
>
>> Hello!
>>
>> Ever since commit 1f466ed6be932526fc69e72ffd50390691d0d382 we don't look
>> at the user's value of QT_PLUGIN_PATH. The comment says this is to
>> prevent plugin confusion between Qt5 and Qt6 stuff.
>
> Yes; unfortunately Qt doesn't seem to have thought about making that
> variable usable with both Qt5 and Qt6 at the same time. It's probably
> worth reporting the issue upstream.


--
Thanks,
Maxim
K
K
kiasoc5 wrote on 30 Nov 2022 15:57
Re: QT plugins from profile not found (QT_PLUGIN_PATH)
(address . 57742@debbugs.gnu.org)
3774bc23-fd67-f782-f9b3-ae62e74b4450@disroot.org
Would it be possible to patch the wrapper before the Guix 1.4.0 release,
or at least document somewhere that qt wayland is blocked by this bug?
M
M
Marek Pa?nikowski wrote on 17 Feb 2023 17:25
QT plugins from profile not found (QT_PLUGIN_PATH)
(name . 57742@debbugs.gnu.org)(address . 57742@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
3ute5xnDM5UD0HqXD3VHDqCc9zQXNHZETniGVO1mc56DEPkTWcjTFix2FejNoCCw0TglygSUA831skPvkUQLxQxcTD5Ig1SeTRBEVh624ds=@protonmail.com
Hello.

I found a piece of QT documentation on handling of plugins [1].

Is it helpful to achieving working Plasma Desktop on Guix?

Maxim - I was able to only find your email address; I don't think the other participants of this Debbugs issue will receive a copy of this message.

Best Regards,
Marek Pa?nikowski

M
M
Maxim Cournoyer wrote on 7 Mar 2023 01:55
(name . Marek Pa?nikowski)(address . marekpasnikowski@protonmail.com)(name . 57742@debbugs.gnu.org)(address . 57742@debbugs.gnu.org)
87jzztz8fi.fsf@gmail.com
Hi,

Marek Pa?nikowski <marekpasnikowski@protonmail.com> writes:

Toggle quote (15 lines)
> Hello.
>
> I found a piece of QT documentation on handling of plugins [1].
>
> Is it helpful to achieving working Plasma Desktop on Guix?
>
> Maxim - I was able to only find your email address; I don't think the
> other participants of this Debbugs issue will receive a copy of this
> message.
>
> Best Regards,
> Marek Pa?nikowski
>
> [1]: https://doc.qt.io/qt-6.2/deployment-plugins.html#loading-and-verifying-plugins-dynamically

Thanks for the link. According to it, there shouldn't be a problem a
problem mixing various Qt versions on the same QT_PLUGIN_PATH, as Qt is
supposed to not load plugins that were linked against a newer version,
or older major version.

If this was so, then it seems like the problem/concern I reported
acknowledged and closed, but I'd like to have confirmation. I've sent a
comment to the above ticket, hopefully we can get such confirmation.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 7 Mar 2023 14:39
Re: bug#57742: QT plugins from profile not found (QT_PLUGIN_PATH)
(name . Marek Pa?nikowski)(address . marekpasnikowski@protonmail.com)(name . 57742@debbugs.gnu.org)(address . 57742@debbugs.gnu.org)
87o7p4y930.fsf@gmail.com
Hello,

Marek Pa?nikowski <marekpasnikowski@protonmail.com> writes:

Toggle quote (15 lines)
> Hello.
>
> I found a piece of QT documentation on handling of plugins [1].
>
> Is it helpful to achieving working Plasma Desktop on Guix?
>
> Maxim - I was able to only find your email address; I don't think the
> other participants of this Debbugs issue will receive a copy of this
> message.
>
> Best Regards,
> Marek Pa?nikowski
>
> [1]: https://doc.qt.io/qt-6.2/deployment-plugins.html#loading-and-verifying-plugins-dynamically

The upstream bug I had opened,
"Believed not to be a problem.", so it's indeed supposed to work.

I'll try looking into reverting some of the changes made when Qt 6 was
introduced; there may be warnings, if I recall correctly, but since it's
advertised as something supported, let's put it to the test!

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 29 Mar 2023 01:53
(name . Marek Pa?nikowski)(address . marekpasnikowski@protonmail.com)(name . 57742@debbugs.gnu.org)(address . 57742@debbugs.gnu.org)
871ql88mcc.fsf@gmail.com
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (27 lines)
> Hello,
>
> Marek Pa?nikowski <marekpasnikowski@protonmail.com> writes:
>
>> Hello.
>>
>> I found a piece of QT documentation on handling of plugins [1].
>>
>> Is it helpful to achieving working Plasma Desktop on Guix?
>>
>> Maxim - I was able to only find your email address; I don't think the
>> other participants of this Debbugs issue will receive a copy of this
>> message.
>>
>> Best Regards,
>> Marek Pa?nikowski
>>
>> [1]: https://doc.qt.io/qt-6.2/deployment-plugins.html#loading-and-verifying-plugins-dynamically
>
> The upstream bug I had opened,
> https://bugreports.qt.io/browse/QTBUG-107459, has now been closed as
> "Believed not to be a problem.", so it's indeed supposed to work.
>
> I'll try looking into reverting some of the changes made when Qt 6 was
> introduced; there may be warnings, if I recall correctly, but since it's
> advertised as something supported, let's put it to the test!

So I finally tried it in guix/build/qt-utils.scm:

Toggle snippet (13 lines)
@@ -87,9 +88,7 @@ (define exists? (match file-type
"/applications" "/cursors" "/fonts" "/icons" "/glib-2.0/schemas"
"/mime" "/sounds" "/themes" "/wallpapers")
'("XDG_CONFIG_DIRS" suffix directory "/etc/xdg")
- ;; We wrap exactly to avoid potentially mixing Qt5/Qt6 components, which
- ;; would cause warnings, perhaps problems.
- `("QT_PLUGIN_PATH" = directory
+ `("QT_PLUGIN_PATH" prefix directory
,(format #f "/lib/qt~a/plugins" qt-major-version))
`("QML2_IMPORT_PATH" = directory
,(format #f "/lib/qt~a/qml" qt-major-version))

And I see, as I had originally found:

Toggle snippet (70 lines)
$ ./pre-inst-env guix shell --pure qtwayland@5 qtbase@5 jami

[...]

[env]$ echo $QT_PLUGIN_PATH
/gnu/store/06r23gkwlkzgivf411sk231sbvy5ghcm-profile/lib/qt5/plugins
maxim@hurd ~/src/guix [env]$ jami
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforms/libqeglfs.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforms/libqlinuxfb.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforms/libqminimal.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforms/libqminimalegl.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforms/libqoffscreen.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforms/libqvnc.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/rpn3knqgk81c27va7bxrpayv0dv5s4kr-qtwayland-5.15.8/lib/qt5/plugins/platforms/libqwayland-egl.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/rpn3knqgk81c27va7bxrpayv0dv5s4kr-qtwayland-5.15.8/lib/qt5/plugins/platforms/libqwayland-generic.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/rpn3knqgk81c27va7bxrpayv0dv5s4kr-qtwayland-5.15.8/lib/qt5/plugins/platforms/libqwayland-xcomposite-egl.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/rpn3knqgk81c27va7bxrpayv0dv5s4kr-qtwayland-5.15.8/lib/qt5/plugins/platforms/libqwayland-xcomposite-glx.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforms/libqxcb.so:
Plugin uses incompatible Qt library (5.15.0) [release]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-maxim'
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platformthemes/libqgtk3.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platformthemes/libqxdgdesktopportal.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so:
Plugin uses incompatible Qt library (5.15.0) [release]
Using Qt runtime version: 6.3.2

(jami:9326): libnotify-WARNING **: 19:41:03.309: Failed to connect to proxy
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/imageformats/libqgif.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/imageformats/libqico.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/imageformats/libqjpeg.so:
Plugin uses incompatible Qt library (5.15.0) [release]
"Using locale: C"
19:41:03.438 os_core_unix.c !pjlib 2.12.1 for POSIX initialized
Daemon is running
No migration required
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/sqldrivers/libqsqlite.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/sqldrivers/libqsqlmysql.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/sqldrivers/libqsqlodbc.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/sqldrivers/libqsqlpsql.so:
Plugin uses incompatible Qt library (5.15.0) [release]
Syncing lrc accounts list with the daemon
Cannot find dbus interface for screen saver
qt.core.qobject.connect: QObject::connect(lrc::api::ContactModel, ContactAdapter): unique connections require a pointer to member function of a QObject subclass
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /gnu/store/047ay09ng8kvvbk2h51hbm5mf7x4garg-qtbase-5.15.8/lib/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so:
Plugin uses incompatible Qt library (5.15.0) [release]

[...]

But Jami runs fine anyway, so I guess it's noise we'll have to put up
with. I'm merging this change and others to the staging branch now, if
you want to try it out in a day or two it should be fully built for
x86_64.

--
Thanks,
Maxim
A
A
Antero Mejr wrote on 29 Mar 2023 02:05
[PATCH core-updates] build: qt-utils: Add prefix when wrapping QT_PLUGIN_PATH variable.
(address . 57742@debbugs.gnu.org)(address . maxim.cournoyer@gmail.com)
20230329000511.5277-1-antero@mailbox.org
This allows extension of QT_PLUGIN_PATH.
QT programs will now work under Wayland when qt-wayland is installed.

* guix/build/qt-utils.scm (variables-for-wrapping)[QT_PLUGIN_PATH]: Add prefix
value to 'wrap-program' procedure call for QT_PLUGIN_PATH variable.
---
Tested using Wayland and X (via XWayland), using plugin paths for QT5, QT6, or
both. In all cases, QT selects the correct plugin if it's present anywhere in
QT_PLUGIN_PATH.

guix/build/qt-utils.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm
index 2e47f1bc02..b503659521 100644
--- a/guix/build/qt-utils.scm
+++ b/guix/build/qt-utils.scm
@@ -89,7 +89,7 @@ (define exists? (match file-type
'("XDG_CONFIG_DIRS" suffix directory "/etc/xdg")
;; We wrap exactly to avoid potentially mixing Qt5/Qt6 components, which
;; would cause warnings, perhaps problems.
- `("QT_PLUGIN_PATH" = directory
+ `("QT_PLUGIN_PATH" prefix directory
,(format #f "/lib/qt~a/plugins" qt-major-version))
`("QML2_IMPORT_PATH" = directory
,(format #f "/lib/qt~a/qml" qt-major-version))
--
2.38.1
A
A
Antero Mejr wrote on 29 Mar 2023 02:15
(address . maxim.cournoyer@gmail.com)(address . 57742@debbugs.gnu.org)
874jq45s5k.fsf@mailbox.org
Please ignore the QT patch I just sent, it's exactly the same as yours,
and I sent it before I saw your message from 20 minutes ago. Sorry!

When I tested the patch I didn't get any of that noise about "Plugin
uses incompatible Qt library", although the program I tested with may
have configured QT to be less verbose.
M
M
Maxim Cournoyer wrote on 29 Mar 2023 02:21
Re: bug#57742: QT plugins from profile not found (QT_PLUGIN_PATH)
(name . Antero Mejr)(address . antero@mailbox.org)(address . 57742-done@debbugs.gnu.org)
87wn3076h4.fsf_-_@gmail.com
Hi,

Antero Mejr <antero@mailbox.org> writes:

Toggle quote (27 lines)
> This allows extension of QT_PLUGIN_PATH.
> QT programs will now work under Wayland when qt-wayland is installed.
>
> * guix/build/qt-utils.scm (variables-for-wrapping)[QT_PLUGIN_PATH]: Add prefix
> value to 'wrap-program' procedure call for QT_PLUGIN_PATH variable.
> ---
> Tested using Wayland and X (via XWayland), using plugin paths for QT5, QT6, or
> both. In all cases, QT selects the correct plugin if it's present anywhere in
> QT_PLUGIN_PATH.
>
> guix/build/qt-utils.scm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm
> index 2e47f1bc02..b503659521 100644
> --- a/guix/build/qt-utils.scm
> +++ b/guix/build/qt-utils.scm
> @@ -89,7 +89,7 @@ (define exists? (match file-type
> '("XDG_CONFIG_DIRS" suffix directory "/etc/xdg")
> ;; We wrap exactly to avoid potentially mixing Qt5/Qt6 components, which
> ;; would cause warnings, perhaps problems.
> - `("QT_PLUGIN_PATH" = directory
> + `("QT_PLUGIN_PATH" prefix directory
> ,(format #f "/lib/qt~a/plugins" qt-major-version))
> `("QML2_IMPORT_PATH" = directory
> ,(format #f "/lib/qt~a/qml" qt-major-version))

Already fixed on my staging :-).

I'll merge staging into master as soon as it catches up to master
according to https://ci.guix.gnu.org/. Help welcome!

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 57742@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57742
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch