package/libxkbcommon: build libxkbregistry when libxml2 is available
PATCH v2 1/2 package/libxkbcommon: build libxkbregistry when libxml2 is available
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.
Regarding since when this is broken, three pieces had to come together:
- libxkbcommon has passed -Denable-xkbregistry=false since commit 1791bc30a5 ("package/libxkbcommon: bump version to 1.0.1", Sep 2020), i.e. Buildroot 2020.11. libxkbregistry has therefore never been built in Buildroot.
- wine's configure gained the XKBREGISTRY_LIBS term in its Wayland test in wine 9.0, with upstream commit d64ea8e4a6c9 ("winewayland.drv: Enumerate Xkb layouts and create matching HKL.", Nov 2023).
- wine.mk started passing --with-wayland in commit 7cb49e7712 ("package/wine: bump to version 9.19", Oct 2024), which is what turns the missing XKBREGISTRY_LIBS from a notice into a hard error.
The breakage therefore dates from Buildroot 2024.11, and every branch since is affected, including the LTS one: 2025.02.x carries wine 10.0, whose configure has the XKBREGISTRY_LIBS check, together with libxkbcommon 1.9.2 built with -Denable-xkbregistry=false, and its wine.mk passes --with-wayland. 2025.05.x and 2025.08.x are in the same state. A backport to 2025.02.x is thus needed.
---
Notes:
Changes since v1:
- Extend the commit log to document since when the problem exists, and whether the 2025.02.x LTS branch is affected (suggested by Thomas Petazzoni). No change to the code.
package/libxkbcommon/libxkbcommon.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
package/libxkbcommon/libxkbcommon.mk +8 -2
@@ -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
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/2 package/wine: select libxkbcommon and libxml2 for the Wayland driver
wine.mk passes --with-wayland whenever BR2_PACKAGE_WAYLAND is enabled, but nothing guarantees the rest of what wine's Wayland test needs is in the configuration. That test is:
WINE_NOTICE_WITH(wayland, [test -z "$WAYLAND_CLIENT_LIBS" \
-o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" \
-o -z "$XKBREGISTRY_LIBS" -o "$ac_cv_header_linux_input_h" = "no"], ...)and because --with-wayland is passed explicitly, WINE_NOTICE_WITH turns into AC_MSG_ERROR rather than a notice.
So wine needs libxkbcommon, and it needs the libxkbregistry part of it, which is only built when libxml2 is available. Select both when Wayland support is enabled, and add libxkbcommon to the build dependencies.
Note that libxml2 is not a direct dependency of wine, it only has to be in the configuration so that libxkbcommon builds libxkbregistry; the build ordering is handled by libxkbcommon's own dependency on libxml2.
---
Notes:
New patch in v2, following Thomas Petazzoni's review of v1.
package/wine/Config.in | 5 +++++ package/wine/wine.mk | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
package/wine/Config.in +5 -0
@@ -17,6 +17,11 @@ config BR2_PACKAGE_WINE depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL select BR2_PACKAGE_ALSA_LIB_SEQ if BR2_PACKAGE_ALSA_LIB select BR2_PACKAGE_ALSA_LIB_RAWMIDI if BR2_PACKAGE_ALSA_LIB + # The Wayland driver needs libxkbcommon, including its + # libxkbregistry part, which is only built when libxml2 is + # available. + select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_LIBXML2 if BR2_PACKAGE_WAYLAND help Wine is a compatibility layer capable of running Windows applications on Linux. Instead of simulating internal
package/wine/wine.mk +1 -1
@@ -189,7 +189,7 @@ endif ifeq ($(BR2_PACKAGE_WAYLAND),y) WINE_CONF_OPTS += --with-wayland -WINE_DEPENDENCIES += wayland +WINE_DEPENDENCIES += wayland libxkbcommon else WINE_CONF_OPTS += --without-wayland endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/2] package/wine: select libxkbcommon and libxml2 for the Wayland driver
Hello,
Quoted 15 lines · Alsey Coleman Miller
wine.mk passes --with-wayland whenever
BR2_PACKAGE_WAYLANDis enabled, but nothing guarantees the rest of what wine's Wayland test needs is in the configuration. That test is:WINE_NOTICE_WITH(wayland, [test -z "$WAYLAND_CLIENT_LIBS" \ -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" \ -o -z "$XKBREGISTRY_LIBS" -o "$ac_cv_header_linux_input_h" = "no"], ...)and because --with-wayland is passed explicitly,
WINE_NOTICE_WITHturns intoAC_MSG_ERRORrather than a notice.So wine needs libxkbcommon, and it needs the libxkbregistry part of it, which is only built when libxml2 is available. Select both when Wayland support is enabled, and add libxkbcommon to the build dependencies.
Quoted 5 lines
Note that libxml2 is not a direct dependency of wine, it only has to be in the configuration so that libxkbcommon builds libxkbregistry; the build ordering is handled by libxkbcommon's own dependency on libxml2.
Signed-off-by Alsey Coleman Miller <[email protected]>
Thanks for this new iteration!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 44 lines · Alsey Coleman Miller
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_LIBSalongside wayland-client, wayland-scanner, xkbcommon andlinux/input.hbefore it will build the Wayland driver, and wine.mk passes --with-wayland for any build withBR2_PACKAGE_WAYLAND- which turns that notice into a hard error:checking for
wayland-client.h... yes
checking forwl_display_connectin -lwayland-client... yes checking for wayland-scanner... .../host/bin/wayland-scanner checking forxkb_context_newin -lxkbcommon... yes checking forwayland-egl.h... yes
checking forwl_egl_window_createin -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_LIBSis empty, so wine and wayland together could not be built on any architecture.Gated on
BR2_PACKAGE_LIBXML2rather 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.Regarding since when this is broken, three pieces had to come together:
- libxkbcommon has passed -Denable-xkbregistry=false since commit
1791bc30a5("package/libxkbcommon: bump version to 1.0.1", Sep 2020), i.e. Buildroot 2020.11. libxkbregistry has therefore never been built in Buildroot.- wine's configure gained the
XKBREGISTRY_LIBSterm in its Wayland test in wine 9.0, with upstream commitd64ea8e4a6c9("winewayland.drv: Enumerate Xkb layouts and create matching HKL.", Nov 2023).- wine.mk started passing --with-wayland in commit
7cb49e7712("package/wine: bump to version 9.19", Oct 2024), which is what turns the missingXKBREGISTRY_LIBSfrom a notice into a hard error.
Quoted 8 lines
The breakage therefore dates from Buildroot 2024.11, and every branch since is affected, including the LTS one: 2025.02.x carries wine 10.0, whose configure has the
XKBREGISTRY_LIBScheck, together with libxkbcommon 1.9.2 built with -Denable-xkbregistry=false, and its wine.mk passes --with-wayland. 2025.05.x and 2025.08.x are in the same state. A backport to 2025.02.x is thus needed.Signed-off-by Alsey Coleman Miller <[email protected]>
Thanks for this new iteration!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi,
For information, I've provided a similar fix here:
https://lore.kernel.org/buildroot/[email protected]/ earlier this summer.
Romain stated that xkbregistry had been disabled on purpose[1] and to which my question has remained unanswered in this time of holidays.
Best regards,
Raphaël
[1] https://lore.kernel.org/buildroot/[email protected]/
Le 09/08/2026 à 22:14, Alsey Coleman Miller a écrit :
Quoted 74 lines
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_LIBSalongside wayland-client, wayland-scanner, xkbcommon andlinux/input.hbefore it will build the Wayland driver, and wine.mk passes --with-wayland for any build withBR2_PACKAGE_WAYLAND- which turns that notice into a hard error:checking for
wayland-client.h... yes
checking forwl_display_connectin -lwayland-client... yes checking for wayland-scanner... .../host/bin/wayland-scanner checking forxkb_context_newin -lxkbcommon... yes checking forwayland-egl.h... yes
checking forwl_egl_window_createin -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_LIBSis empty, so wine and wayland together could not be built on any architecture.Gated on
BR2_PACKAGE_LIBXML2rather 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.Regarding since when this is broken, three pieces had to come together:
- libxkbcommon has passed -Denable-xkbregistry=false since commit
1791bc30a5("package/libxkbcommon: bump version to 1.0.1", Sep 2020), i.e. Buildroot 2020.11. libxkbregistry has therefore never been built in Buildroot.- wine's configure gained the
XKBREGISTRY_LIBSterm in its Wayland test in wine 9.0, with upstream commitd64ea8e4a6c9("winewayland.drv: Enumerate Xkb layouts and create matching HKL.", Nov 2023).- wine.mk started passing --with-wayland in commit
7cb49e7712("package/wine: bump to version 9.19", Oct 2024), which is what turns the missingXKBREGISTRY_LIBSfrom a notice into a hard error.The breakage therefore dates from Buildroot 2024.11, and every branch since is affected, including the LTS one: 2025.02.x carries wine 10.0, whose configure has the
XKBREGISTRY_LIBScheck, together with libxkbcommon 1.9.2 built with -Denable-xkbregistry=false, and its wine.mk passes --with-wayland. 2025.05.x and 2025.08.x are in the same state. A backport to 2025.02.x is thus needed.Signed-off-by Alsey Coleman Miller <[email protected]>---
Notes:
Changes since v1:
- Extend the commit log to document since when the problem exists, and whether the 2025.02.x LTS branch is affected (suggested by Thomas Petazzoni). No change to the code.package/libxkbcommon/libxkbcommon.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)package/libxkbcommon/libxkbcommon.mk +1
-2@@ -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
package/libxkbcommon/libxkbcommon.mk LIBXKBCOMMON_CPE_ID_VENDOR = xkbcommon · line 25
Quoted 10 lines
package/libxkbcommon/libxkbcommon.mk +7
-0+ +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
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
@Thomas Petazzoni <[email protected]> Is there anything else I can provide to get this merged?
Quoted 104 lines · Raphaël Gallais-Pou
Hi,
For information, I've provided a similar fix here:
https://lore.kernel.org/buildroot/[email protected]/
earlier this summer.Romain stated that xkbregistry had been disabled on purpose[1] and to which my question has remained unanswered in this time of holidays.
Best regards,
Raphaël[1]
https://lore.kernel.org/buildroot/[email protected]/
Quoted 40 lines · Alsey Coleman Miller
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_LIBSalongside wayland-client, wayland-scanner, xkbcommon andlinux/input.hbefore it will build the Wayland driver, and wine.mk passes --with-wayland for any build withBR2_PACKAGE_WAYLAND- which turns that notice into a hard error:checking for
wayland-client.h... yes
checking forwl_display_connectin -lwayland-client... yes checking for wayland-scanner... .../host/bin/wayland-scanner checking forxkb_context_newin -lxkbcommon... yes checking forwayland-egl.h... yes
checking forwl_egl_window_createin -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_LIBSis empty, so wine and wayland together could not be built on any architecture.Gated on
BR2_PACKAGE_LIBXML2rather 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.Regarding since when this is broken, three pieces had to come together:
- libxkbcommon has passed -Denable-xkbregistry=false since commit
1791bc30a5("package/libxkbcommon: bump version to 1.0.1", Sep 2020), i.e. Buildroot 2020.11. libxkbregistry has therefore never been built in Buildroot.- wine's configure gained the
XKBREGISTRY_LIBSterm in its Wayland test in wine 9.0, with upstream commitd64ea8e4a6c9("winewayland.drv: Enumerate Xkb layouts and create matching HKL.", Nov 2023).Quoted 8 lines
- wine.mk started passing --with-wayland in commit
7cb49e7712("package/wine: bump to version 9.19", Oct 2024), which is what turns the missingXKBREGISTRY_LIBSfrom a notice into a hard error.The breakage therefore dates from Buildroot 2024.11, and every branch since is affected, including the LTS one: 2025.02.x carries wine 10.0, whose configure has the
XKBREGISTRY_LIBScheck, together with libxkbcommon 1.9.2 built with -Denable-xkbregistry=false, and itswine.mk
Quoted 9 lines
passes --with-wayland. 2025.05.x and 2025.08.x are in the same state. A backport to 2025.02.x is thus needed.
Signed-off-by Alsey Coleman Miller <[email protected]>---
Notes:
Changes since v1:
- Extend the commit log to document since when the problem exists,and
Review
Quoted 7 lines
whether the 2025.02.x LTS branch is affected (suggested by Thomas Petazzoni). No change to the code.
package/libxkbcommon/libxkbcommon.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/package/libxkbcommon/libxkbcommon.mkQuoted 18 lines
index
21a2b937ef..406affe401100644package/libxkbcommon/libxkbcommon.mk +8
-2@@ -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
Quoted 4 lines
package/libxkbcommon/libxkbcommon.mk LIBXKBCOMMON_CPE_ID_VENDOR = xkbcommon · line 25
Quoted 2 lines
package/libxkbcommon/libxkbcommon.mk +0
-0ifeq ($(BR2_PACKAGE_XORG7),y) LIBXKBCOMMON_CONF_OPTS += -Denable-x11=true
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Raphaël,
Quoted 6 lines · Raphaël Gallais-Pou
For information, I've provided a similar fix here:
https://lore.kernel.org/buildroot/[email protected]/
earlier this summer.Romain stated that xkbregistry had been disabled on purpose[1] and to which my question has remained unanswered in this time of holidays.
Thanks for your message. On my side, the change looked good. I applied the version from Alsey, as their version had a more documented commit message.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 44 lines · Alsey Coleman Miller
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_LIBSalongside wayland-client, wayland-scanner, xkbcommon andlinux/input.hbefore it will build the Wayland driver, and wine.mk passes --with-wayland for any build withBR2_PACKAGE_WAYLAND- which turns that notice into a hard error:checking for
wayland-client.h... yes
checking forwl_display_connectin -lwayland-client... yes checking for wayland-scanner... .../host/bin/wayland-scanner checking forxkb_context_newin -lxkbcommon... yes checking forwayland-egl.h... yes
checking forwl_egl_window_createin -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_LIBSis empty, so wine and wayland together could not be built on any architecture.Gated on
BR2_PACKAGE_LIBXML2rather 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.Regarding since when this is broken, three pieces had to come together:
- libxkbcommon has passed -Denable-xkbregistry=false since commit
1791bc30a5("package/libxkbcommon: bump version to 1.0.1", Sep 2020), i.e. Buildroot 2020.11. libxkbregistry has therefore never been built in Buildroot.- wine's configure gained the
XKBREGISTRY_LIBSterm in its Wayland test in wine 9.0, with upstream commitd64ea8e4a6c9("winewayland.drv: Enumerate Xkb layouts and create matching HKL.", Nov 2023).- wine.mk started passing --with-wayland in commit
7cb49e7712("package/wine: bump to version 9.19", Oct 2024), which is what turns the missingXKBREGISTRY_LIBSfrom a notice into a hard error.
Quoted 8 lines
The breakage therefore dates from Buildroot 2024.11, and every branch since is affected, including the LTS one: 2025.02.x carries wine 10.0, whose configure has the
XKBREGISTRY_LIBScheck, together with libxkbcommon 1.9.2 built with -Denable-xkbregistry=false, and its wine.mk passes --with-wayland. 2025.05.x and 2025.08.x are in the same state. A backport to 2025.02.x is thus needed.Signed-off-by Alsey Coleman Miller <[email protected]>
Thanks a lot, series applied!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot