Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/libxkbcommon: build libxkbregistry when libxml2 is available
@ 2026-08-07  0:21 Alsey Coleman Miller
  2026-08-07 12:33 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Alsey Coleman Miller @ 2026-08-07  0:21 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

libxkbregistry is the keyboard layout catalogue half of the library. It
parses the XML layout registry and so needs libxml2, which is presumably
why it was disabled unconditionally rather than wired to a dependency.

wine needs it. Its configure.ac requires XKBREGISTRY_LIBS alongside
wayland-client, wayland-scanner, xkbcommon and linux/input.h before it
will build the Wayland driver, and wine.mk passes --with-wayland for any
build with BR2_PACKAGE_WAYLAND - which turns that notice into a hard
error:

  checking for wayland-client.h... yes
  checking for wl_display_connect in -lwayland-client... yes
  checking for wayland-scanner... .../host/bin/wayland-scanner
  checking for xkb_context_new in -lxkbcommon... yes
  checking for wayland-egl.h... yes
  checking for wl_egl_window_create in -lwayland-egl... yes
  configure: error: Wayland development files not found, the Wayland
    driver won't be supported.
  This is an error since --with-wayland was requested.

Every other term of that test passes; only XKBREGISTRY_LIBS is empty, so
wine and wayland together could not be built on any architecture.

Gated on BR2_PACKAGE_LIBXML2 rather than turned on outright, because
meson.build takes dependency('libxml-2.0') unconditionally once
enable-xkbregistry is set, so a target without libxml2 would fail to
configure.

Signed-off-by: Alsey Coleman Miller <alseycmiller@gmail.com>
---
 package/libxkbcommon/libxkbcommon.mk | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/libxkbcommon/libxkbcommon.mk b/package/libxkbcommon/libxkbcommon.mk
index 21a2b937ef..406affe401 100644
--- a/package/libxkbcommon/libxkbcommon.mk
+++ b/package/libxkbcommon/libxkbcommon.mk
@@ -12,8 +12,14 @@ LIBXKBCOMMON_CPE_ID_VENDOR = xkbcommon
 LIBXKBCOMMON_INSTALL_STAGING = YES
 LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex
 LIBXKBCOMMON_CONF_OPTS = \
-	-Denable-docs=false \
-	-Denable-xkbregistry=false
+	-Denable-docs=false
+
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+LIBXKBCOMMON_CONF_OPTS += -Denable-xkbregistry=true
+LIBXKBCOMMON_DEPENDENCIES += libxml2
+else
+LIBXKBCOMMON_CONF_OPTS += -Denable-xkbregistry=false
+endif
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
 LIBXKBCOMMON_CONF_OPTS += -Denable-x11=true
-- 
2.47.3

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

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

* Re: [Buildroot] [PATCH] package/libxkbcommon: build libxkbregistry when libxml2 is available
  2026-08-07  0:21 [Buildroot] [PATCH] package/libxkbcommon: build libxkbregistry when libxml2 is available Alsey Coleman Miller
@ 2026-08-07 12:33 ` Thomas Petazzoni via buildroot
  2026-08-09 17:57   ` Alsey Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-07 12:33 UTC (permalink / raw)
  To: Alsey Coleman Miller; +Cc: buildroot

Hello Alsey,

On Thu, Aug 06, 2026 at 08:21:09PM -0400, Alsey Coleman Miller wrote:
> libxkbregistry is the keyboard layout catalogue half of the library. It
> parses the XML layout registry and so needs libxml2, which is presumably
> why it was disabled unconditionally rather than wired to a dependency.
> 
> wine needs it. Its configure.ac requires XKBREGISTRY_LIBS alongside
> wayland-client, wayland-scanner, xkbcommon and linux/input.h before it
> will build the Wayland driver, and wine.mk passes --with-wayland for any
> build with BR2_PACKAGE_WAYLAND - which turns that notice into a hard
> error:
> 
>   checking for wayland-client.h... yes
>   checking for wl_display_connect in -lwayland-client... yes
>   checking for wayland-scanner... .../host/bin/wayland-scanner
>   checking for xkb_context_new in -lxkbcommon... yes
>   checking for wayland-egl.h... yes
>   checking for wl_egl_window_create in -lwayland-egl... yes
>   configure: error: Wayland development files not found, the Wayland
>     driver won't be supported.
>   This is an error since --with-wayland was requested.
> 
> Every other term of that test passes; only XKBREGISTRY_LIBS is empty, so
> wine and wayland together could not be built on any architecture.
> 
> Gated on BR2_PACKAGE_LIBXML2 rather than turned on outright, because
> meson.build takes dependency('libxml-2.0') unconditionally once
> enable-xkbregistry is set, so a target without libxml2 would fail to
> configure.
> 
> Signed-off-by: Alsey Coleman Miller <alseycmiller@gmail.com>

The patch obviously looks good and relevant. However, I have two
comments:

- Shouldn't this be associated with a change in the wine package to
  select BR2_PACKAGE_LIBXML2 when wayland support is enabled?

- We would need your commit log to be extended to indicate since when
  this problem exists. Indeed, since your change is a fix, we will
  have to figure out whether we need to backport it to our LTS branch
  2025.02.x. And for that, we need to understand if 2025.02.x is
  affected by the problem or not.

Thanks a lot in advance for your feedback!

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/libxkbcommon: build libxkbregistry when libxml2 is available
  2026-08-07 12:33 ` Thomas Petazzoni via buildroot
@ 2026-08-09 17:57   ` Alsey Miller
  0 siblings, 0 replies; 3+ messages in thread
From: Alsey Miller @ 2026-08-09 17:57 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot


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

Hi Thomas,

Thanks for the review.

> Shouldn't this be associated with a change in the wine package to select BR2_PACKAGE_LIBXML2 when wayland support is enabled?

Yes — and it turns out wine needs a bit more than that: wine.mk has no dependency on libxkbcommon at all, so wine + wayland without libxkbcommon fails on the XKBCOMMON_LIBS term of the very same configure test. v2 adds a second patch that selects both BR2_PACKAGE_LIBXKBCOMMON and BR2_PACKAGE_LIBXML2 when BR2_PACKAGE_WAYLAND is enabled, and adds libxkbcommon to WINE_DEPENDENCIES. libxml2 is only selected, not added to WINE_DEPENDENCIES, since wine does not link against it — it only has to be in the configuration so libxkbcommon builds libxkbregistry.

> We would need your commit log to be extended to indicate since when this problem exists.

Done in v2. Short version: libxkbcommon has passed -Denable-xkbregistry=false since 1791bc30a5 (1.0.1, Buildroot 2020.11), wine's configure gained the XKBREGISTRY_LIBS term in its Wayland test in wine 9.0 (upstream d64ea8e4a6c9, Nov 2023), and wine.mk started passing --with-wayland in 7cb49e7712 ("package/wine: bump to version 9.19", Oct 2024) — which is what turns the notice into a hard error.

So the breakage dates from 2024.11. 2025.02.x is affected: it has wine 10.0 (XKBREGISTRY_LIBS check present), --with-wayland in wine.mk, and libxkbcommon 1.9.2 with xkbregistry disabled. 2025.05.x and 2025.08.x are in the same state. A backport to 2025.02.x is needed.

Best regards,
Alsey Coleman Miller IV

> On Aug 7, 2026, at 8:33 AM, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 
> Hello Alsey,
> 
> On Thu, Aug 06, 2026 at 08:21:09PM -0400, Alsey Coleman Miller wrote:
>> libxkbregistry is the keyboard layout catalogue half of the library. It
>> parses the XML layout registry and so needs libxml2, which is presumably
>> why it was disabled unconditionally rather than wired to a dependency.
>> 
>> wine needs it. Its configure.ac requires XKBREGISTRY_LIBS alongside
>> wayland-client, wayland-scanner, xkbcommon and linux/input.h before it
>> will build the Wayland driver, and wine.mk passes --with-wayland for any
>> build with BR2_PACKAGE_WAYLAND - which turns that notice into a hard
>> error:
>> 
>>  checking for wayland-client.h... yes
>>  checking for wl_display_connect in -lwayland-client... yes
>>  checking for wayland-scanner... .../host/bin/wayland-scanner
>>  checking for xkb_context_new in -lxkbcommon... yes
>>  checking for wayland-egl.h... yes
>>  checking for wl_egl_window_create in -lwayland-egl... yes
>>  configure: error: Wayland development files not found, the Wayland
>>    driver won't be supported.
>>  This is an error since --with-wayland was requested.
>> 
>> Every other term of that test passes; only XKBREGISTRY_LIBS is empty, so
>> wine and wayland together could not be built on any architecture.
>> 
>> Gated on BR2_PACKAGE_LIBXML2 rather than turned on outright, because
>> meson.build takes dependency('libxml-2.0') unconditionally once
>> enable-xkbregistry is set, so a target without libxml2 would fail to
>> configure.
>> 
>> Signed-off-by: Alsey Coleman Miller <alseycmiller@gmail.com>
> 
> The patch obviously looks good and relevant. However, I have two
> comments:
> 
> - Shouldn't this be associated with a change in the wine package to
>  select BR2_PACKAGE_LIBXML2 when wayland support is enabled?
> 
> - We would need your commit log to be extended to indicate since when
>  this problem exists. Indeed, since your change is a fix, we will
>  have to figure out whether we need to backport it to our LTS branch
>  2025.02.x. And for that, we need to understand if 2025.02.x is
>  affected by the problem or not.
> 
> Thanks a lot in advance for your feedback!
> 
> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com <https://bootlin.com/>

[-- Attachment #1.2: Type: text/html, Size: 21943 bytes --]

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

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

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

end of thread, other threads:[~2026-08-09 17:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07  0:21 [Buildroot] [PATCH] package/libxkbcommon: build libxkbregistry when libxml2 is available Alsey Coleman Miller
2026-08-07 12:33 ` Thomas Petazzoni via buildroot
2026-08-09 17:57   ` Alsey Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox