Dependency on xkbcommon

Jonas Ådahl jadahl at redhat.com
Tue Nov 22 14:23:58 UTC 2022


On Tue, Nov 22, 2022 at 05:15:30PM +0300, Maxim Kartashev wrote:
> Hi All,
> 
> In the current version of the "pure" Wayland toolkit I introduced a "soft"
> dependency on libxkbcommon.so that is dlopened at run time to convert
> keystrokes into symbols. However, we have soon discovered that many modern
> distros don't have the library installed by default.

How did you discover this? I would assume all distributions that
supports Wayland having libxkbcommon installed by default, as
practically all Wayland clients that does keyboard input make use of it.

> 
> As far as I can tell, gdk links with it statically. I wonder how practical
> is it for OpenJDK to follow suit (xkbcommon is licensed under derivatives
> of the MIT license)? Or else bring in the source code into OpenJDK? Any
> other ideas?

GDK doesn't link it statically. This is how it looks on my system:

$ ldd /usr/lib64/libgdk-3.so.0 | grep xkbcommon
	libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007f160b2e7000)
$ ldd /usr/lib64/libgtk-4.so | grep xkbcommon
	libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007f7aaae8c000)

The same applies to Qt6:

$ ldd /usr/lib64/libQt6WaylandClient.so.6 | grep xkbcommon
	libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007fc7f14a1000)

So I suggest to link to it dynamically, not statically.


Jonas



More information about the wakefield-dev mailing list