unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping
@ 2020-09-16 11:16 Brendan Tildesley
  2020-10-04 10:46 ` bug#43446: EGL-Wayland Raghav Gururajan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Brendan Tildesley @ 2020-09-16 11:16 UTC (permalink / raw)
  To: 43446

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

qt-build-system wraps variables such as QT_PLUGIN_PATH  with  '= instead 
of prefix, so when qtwayland is installed in a profile or included in 
the environment, the application fails to see it. Programs run with 
export QT_QPA_PLATFORM=wayland-egl will fail to launch.

We could:

 1. Use 'prefix so that the parent environment's variables are appended
    and users have to manually install qtwayland them selves.
 2. Include qtwayland as an input to every qt package somehow. Can the
    build system do that? Considering that Wayland seems to be the
    future, I feel that Qt GUI applications should support it by
    default. I mean, wayland is in the closure of qtbase anyway.
 3. Both? Why is '= used anyway?

How should this be done?




[-- Attachment #2: Type: text/html, Size: 1061 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#43446: EGL-Wayland
  2020-09-16 11:16 bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Brendan Tildesley
@ 2020-10-04 10:46 ` Raghav Gururajan
  2020-10-04 11:23 ` bug#43446: [PATCH] guix: qt-build-system: Fix search-path wrapping Brendan Tildesley
  2020-10-04 12:43 ` bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Ricardo Wurmus
  2 siblings, 0 replies; 5+ messages in thread
From: Raghav Gururajan @ 2020-10-04 10:46 UTC (permalink / raw)
  To: 43446

Hello Brendan!

I think you are missing 'egl-wayland'.
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=8d82df1376f50bb1e32fa82e943b0f5c837658b6

Not sure if, Qt packages or Qt apps or both, requires rebuilding with egl-wayland as input.

Regards,
RG.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#43446: [PATCH] guix: qt-build-system: Fix search-path wrapping.
  2020-09-16 11:16 bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Brendan Tildesley
  2020-10-04 10:46 ` bug#43446: EGL-Wayland Raghav Gururajan
@ 2020-10-04 11:23 ` Brendan Tildesley
  2020-10-04 12:43 ` bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Ricardo Wurmus
  2 siblings, 0 replies; 5+ messages in thread
From: Brendan Tildesley @ 2020-10-04 11:23 UTC (permalink / raw)
  To: 43446

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0001-guix-qt-build-system-Fix-search-path-wrapping.patch --]
[-- Type: text/x-patch, Size: 1158 bytes --]

From 9c1d5b76c70ebf9942f6bb891677d260fe16cb62 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Sun, 4 Oct 2020 21:58:08 +1100
Subject: [PATCH] guix: qt-build-system: Fix search-path wrapping.

* guix/build/qt-build-system.scm: (variables-for-wrapping): Modify
qt-build-system's wrap-all-programs phase to prefix all wrapped
search-path variables instead of overwriting them with =. This allows Qt
applications to find plugins available in the environment.
---
 guix/build/qt-build-system.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm
index 005157b0a4..93f512b5d6 100644
--- a/guix/build/qt-build-system.scm
+++ b/guix/build/qt-build-system.scm
@@ -60,7 +60,7 @@
    (lambda (var-to-wrap) (not (null? (last var-to-wrap))))
    (map
     (lambda (var-spec)
-      `(,(first var-spec) = ,(collect-sub-dirs base-directories (last var-spec))))
+      `(,(first var-spec) prefix ,(collect-sub-dirs base-directories (last var-spec))))
     (list
      ;; these shall match the search-path-specification for Qt and KDE
      ;; libraries
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping
  2020-09-16 11:16 bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Brendan Tildesley
  2020-10-04 10:46 ` bug#43446: EGL-Wayland Raghav Gururajan
  2020-10-04 11:23 ` bug#43446: [PATCH] guix: qt-build-system: Fix search-path wrapping Brendan Tildesley
@ 2020-10-04 12:43 ` Ricardo Wurmus
  2020-10-05  6:39   ` Brendan Tildesley
  2 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2020-10-04 12:43 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: 43446


Brendan Tildesley <mail@brendan.scot> writes:

> qt-build-system wraps variables such as QT_PLUGIN_PATH  with  '=
> instead of prefix, so when qtwayland is installed in a profile or
> included in the environment, the application fails to see it. Programs
> run with export QT_QPA_PLATFORM=wayland-egl will fail to launch.
>
> We could:
>
> 1. Use 'prefix so that the parent environment's variables are appended
>    and users have to manually install qtwayland them selves.
> 2. Include qtwayland as an input to every qt package somehow. Can the
>    build system do that? Considering that Wayland seems to be the
>    future, I feel that Qt GUI applications should support it by
>    default. I mean, wayland is in the closure of qtbase anyway.
> 3. Both? Why is '= used anyway?

I can’t say why the Qt build system does this, but in other cases we
know that 'prefix causes problems because the application may end up
loading incompatible binaries leading to a crash.  That’s especially the
case on foreign distros, e.g. when the Guix-installed graphical
application loads a plugin from the system’s XDG_* directories.

-- 
Ricardo




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping
  2020-10-04 12:43 ` bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Ricardo Wurmus
@ 2020-10-05  6:39   ` Brendan Tildesley
  0 siblings, 0 replies; 5+ messages in thread
From: Brendan Tildesley @ 2020-10-05  6:39 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 43446

On 4/10/20 10:43 pm, Ricardo Wurmus wrote:
> Brendan Tildesley <mail@brendan.scot> writes:
>
>> qt-build-system wraps variables such as QT_PLUGIN_PATH  with  '=
>> instead of prefix, so when qtwayland is installed in a profile or
>> included in the environment, the application fails to see it. Programs
>> run with export QT_QPA_PLATFORM=wayland-egl will fail to launch.
>>
>> We could:
>>
>> 1. Use 'prefix so that the parent environment's variables are appended
>>     and users have to manually install qtwayland them selves.
>> 2. Include qtwayland as an input to every qt package somehow. Can the
>>     build system do that? Considering that Wayland seems to be the
>>     future, I feel that Qt GUI applications should support it by
>>     default. I mean, wayland is in the closure of qtbase anyway.
>> 3. Both? Why is '= used anyway?
> I can’t say why the Qt build system does this, but in other cases we
> know that 'prefix causes problems because the application may end up
> loading incompatible binaries leading to a crash.  That’s especially the
> case on foreign distros, e.g. when the Guix-installed graphical
> application loads a plugin from the system’s XDG_* directories.
>
Thanks for pointing that out. But, currently a Guix Qt program is unable 
to see plugins available in the environment/profile even if the variable 
is set because the wrapper just deletes that in its local environment. 
It can only see what's in it's inputs. How else can that be fixed?

cat `which nheko`|grep QT;

export 
QT_PLUGIN_PATH="/gnu/store/swqnld90m4gmmc1qaf4lg1psvf6q0rr0-qttools-5.14.2/lib/qt5/plugins:/gnu/store/j0b10r3djln34avx4qxh1kxzg70fn04r-qtbase-5.14.2/lib/qt5/plugins:/gnu/store/lh2yq7dlw3cfaf613h787drpy6f146n3-qtdeclarative-5.14.2/lib/qt5/plugins:/gnu/store/cz6lfbphrdqvgrbhgdq0hd7a50015i5h-qtmultimedia-5.14.2/lib/qt5/plugins:/gnu/store/r4h7w3zw02nc33bi7bjlqbl9b8kilh9r-qtsvg-5.14.2/lib/qt5/plugins"






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-05  6:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 11:16 bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Brendan Tildesley
2020-10-04 10:46 ` bug#43446: EGL-Wayland Raghav Gururajan
2020-10-04 11:23 ` bug#43446: [PATCH] guix: qt-build-system: Fix search-path wrapping Brendan Tildesley
2020-10-04 12:43 ` bug#43446: Qt Apps cant make use of qtwayland due to QT_PLUGIN_PATH '= wrapping Ricardo Wurmus
2020-10-05  6:39   ` Brendan Tildesley

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).