<div dir="ltr"><div>This was indeed a false alarm: the file installed by default is libxkbcommon.so.0, while we are trying to dlopen("libxkbcommon.so"), which is usually absent unless you install the -dev package that provides a symlink libxkbcommon.so -> libxkbcommon.so.0</div><div>Mystery solved, I'll fix the code.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 23, 2022 at 11:57 AM Maxim Kartashev <<a href="mailto:maxim.kartashev@jetbrains.com">maxim.kartashev@jetbrains.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks, Jonas!</div><div><br></div><div>It seems that libxkbcommon.so *should* be there, I'm going to verify that again myself. It might be that by default it is not in the path known to the dynamic loader, which would explain dlopen() failing on those systems. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 22, 2022 at 5:24 PM Jonas Ådahl <<a href="mailto:jadahl@redhat.com" target="_blank">jadahl@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Nov 22, 2022 at 05:15:30PM +0300, Maxim Kartashev wrote:<br>
> Hi All,<br>
> <br>
> In the current version of the "pure" Wayland toolkit I introduced a "soft"<br>
> dependency on libxkbcommon.so that is dlopened at run time to convert<br>
> keystrokes into symbols. However, we have soon discovered that many modern<br>
> distros don't have the library installed by default.<br>
<br>
How did you discover this? I would assume all distributions that<br>
supports Wayland having libxkbcommon installed by default, as<br>
practically all Wayland clients that does keyboard input make use of it.<br>
<br>
> <br>
> As far as I can tell, gdk links with it statically. I wonder how practical<br>
> is it for OpenJDK to follow suit (xkbcommon is licensed under derivatives<br>
> of the MIT license)? Or else bring in the source code into OpenJDK? Any<br>
> other ideas?<br>
<br>
GDK doesn't link it statically. This is how it looks on my system:<br>
<br>
$ ldd /usr/lib64/libgdk-3.so.0 | grep xkbcommon<br>
libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007f160b2e7000)<br>
$ ldd /usr/lib64/libgtk-4.so | grep xkbcommon<br>
libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007f7aaae8c000)<br>
<br>
The same applies to Qt6:<br>
<br>
$ ldd /usr/lib64/libQt6WaylandClient.so.6 | grep xkbcommon<br>
libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007fc7f14a1000)<br>
<br>
So I suggest to link to it dynamically, not statically.<br>
<br>
<br>
Jonas<br>
<br>
</blockquote></div>
</blockquote></div>