All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon
@ 2022-03-28 11:14 Quentin Schulz
  2022-03-28 11:14 ` [Buildroot] [PATCH 2/2] package/qt5wayland: fix compilation when libxkbcommon is disabled Quentin Schulz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Quentin Schulz @ 2022-03-28 11:14 UTC (permalink / raw)
  To: buildroot
  Cc: Joshua Henderson, Quentin Schulz, Peter Seiderer, Julien Corjon,
	Quentin Schulz

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

qt5wayland package currently has a bug if the xkbcommon Qt config is not
enabled which highlighted a race issues between qt5base, libxkbcommon
and qt5wayland.

qt5wayland has a dependency on libxkbcommon package if it's enabled.
qt5base only has a dependency on libxkbcommon if xcb support is to be
enabled.

If libxkbcommon package is built before qt5base, qt5base will detect it
during its configure step and enable the Qt config accordingly. This
will make it available to qt5wayland afterwards, even if xcb support is
not enabled in Buildroot Kconfig.

However, if qt5base is built before libxkbcommon is, qt5base will not
advertise support of xbcommon feature to qt5wayland (which will fail its
build because of a bug in the source code).

Since the package build order should not impact the outcome of the
build, let's explicit the dependency if and only if libxkbcommon package
is to be compiled at some point in time so that at least this feature is
not susceptible to races.

Cc: Quentin Schulz <foss+buildroot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 package/qt5/qt5base/qt5base.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index 4418f0d3ba..891635ad35 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -168,6 +168,11 @@ QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
 QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),directfb)
 
+ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
+QT5BASE_CONFIGURE_OPTS += -xkbcommon
+QT5BASE_DEPENDENCIES   += libxkbcommon
+endif
+
 ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
 QT5BASE_CONFIGURE_OPTS += -xcb
 QT5BASE_CONFIGURE_OPTS += -xkbcommon
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] package/qt5wayland: fix compilation when libxkbcommon is disabled
  2022-03-28 11:14 [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon Quentin Schulz
@ 2022-03-28 11:14 ` Quentin Schulz
  2022-04-04 12:30   ` Peter Korsgaard
  2022-03-28 19:54 ` [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon Arnout Vandecappelle
  2022-04-04 12:30 ` Peter Korsgaard
  2 siblings, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2022-03-28 11:14 UTC (permalink / raw)
  To: buildroot
  Cc: Joshua Henderson, Quentin Schulz, Peter Seiderer, Julien Corjon,
	Quentin Schulz

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

When libxkbcommon is disabled, QT_CONFIG(xkbcommon) is not defined which
means the variable and function pointer in this patch are compiled out
from the header, but the cpp code actually still made use of it. This
patch fixes the build issue when libxkbcommon package is not to be
built.

This patch was taken from (merged):
https://codereview.qt-project.org/c/qt/qtwayland/+/344916

Cc: Quentin Schulz <foss+buildroot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 .../0001-Add-missing-define-guards.patch      | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/qt5/qt5wayland/0001-Add-missing-define-guards.patch

diff --git a/package/qt5/qt5wayland/0001-Add-missing-define-guards.patch b/package/qt5/qt5wayland/0001-Add-missing-define-guards.patch
new file mode 100644
index 0000000000..adad3768b2
--- /dev/null
+++ b/package/qt5/qt5wayland/0001-Add-missing-define-guards.patch
@@ -0,0 +1,35 @@
+From 05658e127dedfff65789860415537c6920ec574d Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@qt.io>
+Date: Thu, 22 Apr 2021 15:29:56 +0300
+Subject: [PATCH] Add missing define guards
+
+Ammend cca1b94190a094b5d1d7ce492b6533e2d330c5e8 to use m_composeState
+only if xcbcommon is available.
+
+Pick-to: 5.15
+Change-Id: I48332b15def3282c5bda3e1c7c393ea7e9849cbe
+Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
+[Backported from: 05658e127dedfff65789860415537c6920ec574d]
+Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
+---
+ src/client/qwaylandinputcontext.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp
+index 16e03ea1..cbf63cde 100644
+--- a/src/client/qwaylandinputcontext.cpp
++++ b/src/client/qwaylandinputcontext.cpp
+@@ -408,8 +408,10 @@ bool QWaylandInputContext::isValid() const
+ void QWaylandInputContext::reset()
+ {
+     qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
++#if QT_CONFIG(xkbcommon)
+     if (m_composeState)
+         xkb_compose_state_reset(m_composeState);
++#endif
+ 
+     QPlatformInputContext::reset();
+ 
+-- 
+2.35.1
+
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon
  2022-03-28 11:14 [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon Quentin Schulz
  2022-03-28 11:14 ` [Buildroot] [PATCH 2/2] package/qt5wayland: fix compilation when libxkbcommon is disabled Quentin Schulz
@ 2022-03-28 19:54 ` Arnout Vandecappelle
  2022-04-04 12:30 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2022-03-28 19:54 UTC (permalink / raw)
  To: Quentin Schulz, buildroot
  Cc: Peter Seiderer, Quentin Schulz, Joshua Henderson, Julien Corjon



On 28/03/2022 13:14, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> 
> qt5wayland package currently has a bug if the xkbcommon Qt config is not
> enabled which highlighted a race issues between qt5base, libxkbcommon
> and qt5wayland.
> 
> qt5wayland has a dependency on libxkbcommon package if it's enabled.
> qt5base only has a dependency on libxkbcommon if xcb support is to be
> enabled.
> 
> If libxkbcommon package is built before qt5base, qt5base will detect it
> during its configure step and enable the Qt config accordingly. This
> will make it available to qt5wayland afterwards, even if xcb support is
> not enabled in Buildroot Kconfig.
> 
> However, if qt5base is built before libxkbcommon is, qt5base will not
> advertise support of xbcommon feature to qt5wayland (which will fail its
> build because of a bug in the source code).
> 
> Since the package build order should not impact the outcome of the
> build, let's explicit the dependency if and only if libxkbcommon package
> is to be compiled at some point in time so that at least this feature is
> not susceptible to races.
> 
> Cc: Quentin Schulz <foss+buildroot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
>   package/qt5/qt5base/qt5base.mk | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index 4418f0d3ba..891635ad35 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -168,6 +168,11 @@ QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-
>   QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
>   QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),directfb)
>   
> +ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
> +QT5BASE_CONFIGURE_OPTS += -xkbcommon
> +QT5BASE_DEPENDENCIES   += libxkbcommon
> +endif
> +
>   ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
>   QT5BASE_CONFIGURE_OPTS += -xcb
>   QT5BASE_CONFIGURE_OPTS += -xkbcommon

  The existing entries should be removed.

  Applied both to master with that fixed, thanks.

  Regards,
  Arnout


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon
  2022-03-28 11:14 [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon Quentin Schulz
  2022-03-28 11:14 ` [Buildroot] [PATCH 2/2] package/qt5wayland: fix compilation when libxkbcommon is disabled Quentin Schulz
  2022-03-28 19:54 ` [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon Arnout Vandecappelle
@ 2022-04-04 12:30 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2022-04-04 12:30 UTC (permalink / raw)
  To: Quentin Schulz
  Cc: Peter Seiderer, Quentin Schulz, Joshua Henderson, Julien Corjon,
	buildroot

>>>>> "Quentin" == Quentin Schulz <foss+buildroot@0leil.net> writes:

 > From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
 > qt5wayland package currently has a bug if the xkbcommon Qt config is not
 > enabled which highlighted a race issues between qt5base, libxkbcommon
 > and qt5wayland.

 > qt5wayland has a dependency on libxkbcommon package if it's enabled.
 > qt5base only has a dependency on libxkbcommon if xcb support is to be
 > enabled.

 > If libxkbcommon package is built before qt5base, qt5base will detect it
 > during its configure step and enable the Qt config accordingly. This
 > will make it available to qt5wayland afterwards, even if xcb support is
 > not enabled in Buildroot Kconfig.

 > However, if qt5base is built before libxkbcommon is, qt5base will not
 > advertise support of xbcommon feature to qt5wayland (which will fail its
 > build because of a bug in the source code).

 > Since the package build order should not impact the outcome of the
 > build, let's explicit the dependency if and only if libxkbcommon package
 > is to be compiled at some point in time so that at least this feature is
 > not susceptible to races.

 > Cc: Quentin Schulz <foss+buildroot@0leil.net>
 > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/qt5wayland: fix compilation when libxkbcommon is disabled
  2022-03-28 11:14 ` [Buildroot] [PATCH 2/2] package/qt5wayland: fix compilation when libxkbcommon is disabled Quentin Schulz
@ 2022-04-04 12:30   ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2022-04-04 12:30 UTC (permalink / raw)
  To: Quentin Schulz
  Cc: Peter Seiderer, Quentin Schulz, Joshua Henderson, Julien Corjon,
	buildroot

>>>>> "Quentin" == Quentin Schulz <foss+buildroot@0leil.net> writes:

 > From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
 > When libxkbcommon is disabled, QT_CONFIG(xkbcommon) is not defined which
 > means the variable and function pointer in this patch are compiled out
 > from the header, but the cpp code actually still made use of it. This
 > patch fixes the build issue when libxkbcommon package is not to be
 > built.

 > This patch was taken from (merged):
 > https://codereview.qt-project.org/c/qt/qtwayland/+/344916

 > Cc: Quentin Schulz <foss+buildroot@0leil.net>
 > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-04-04 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 11:14 [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon Quentin Schulz
2022-03-28 11:14 ` [Buildroot] [PATCH 2/2] package/qt5wayland: fix compilation when libxkbcommon is disabled Quentin Schulz
2022-04-04 12:30   ` Peter Korsgaard
2022-03-28 19:54 ` [Buildroot] [PATCH 1/2] package/qt5base: fix race with libxkbcommon Arnout Vandecappelle
2022-04-04 12:30 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.