Linux packages: require libxkbcommon-x11, which winit dlopens on X11 (#2320)

The binaries load their windowing libraries at run time, and xkbcommon's X11
keyboard module is a separate library from the core one. Nothing declared it,
so a package installed on a system without it crashes before opening a window:

  thread 'main' panicked at xkbcommon-dl-0.4.2/src/x11.rs:59:28:
  Library libxkbcommon-x11.so could not be loaded.

winit's X11 backend cannot fall back, so the dependency is required for deb,
rpm and Arch rather than recommended.
This commit is contained in:
Dylan M. Taylor authored and GitHub committed 2026-11-04 13:57:08 -05:00
1 parent fb630909c4
commit f3bcc886dc
1 file changed
+5 -1
+5 -1
View File
@@ -24,13 +24,15 @@ description: |-
# The binaries link only glibc and libgcc_s directly. Windowing (X11/Wayland, xkbcommon) and the
# GPU (Vulkan, EGL/GL) are loaded at runtime, so they are dependencies/recommendations here
# rather than ELF NEEDED entries.
# rather than ELF NEEDED entries. The X11 keyboard module is a separate library from the core
# xkbcommon one, and winit's X11 backend panics without it, so it is required next to it.
overrides:
deb:
depends:
- libc6 (>= 2.35)
- libgcc-s1
- libxkbcommon0
- libxkbcommon-x11-0
- libvulkan1 | libegl1
recommends:
- libwayland-client0
@@ -51,6 +53,7 @@ overrides:
- libm.so.6(GLIBC_2.35)(64bit)
- libgcc_s.so.1()(64bit)
- libxkbcommon.so.0()(64bit)
- libxkbcommon-x11.so.0()(64bit)
- (libvulkan.so.1()(64bit) or libEGL.so.1()(64bit))
recommends:
- libwayland-client
@@ -71,6 +74,7 @@ overrides:
- gcc-libs
- hicolor-icon-theme
- libxkbcommon
- libxkbcommon-x11
- vulkan-icd-loader
provides:
- designcraft