From 0f88b1ec485ef95474ce85889b55931f5fac8442 Mon Sep 17 00:00:00 2001 From: Zach Banks Date: Tue, 29 Dec 2020 15:13:54 -0500 Subject: [PATCH] Linux: Add `-lxkbcommon-x11 -lxkbcommon` lflags These flags were determined from `pkg-config --libs xkbcommon-x11` on my system. This enables resolving the `xkb_x11_get_core_keyboard_device_id` symbol and others. I think this commit will fix #268. --- Before: ``` $ ldd build/Release/uiohook.so linux-vdso.so.1 => (0x00007ffc3efc9000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f5d1fb94000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f5d1f992000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5d1f775000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5d1f3ab000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f5d1f189000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5d1ef85000) /lib64/ld-linux-x86-64.so.2 (0x00007f5d200d7000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f5d1ed81000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f5d1eb7b000) ``` After, now with references to `libxkbcommon-x11.so` & `libxkbcommon.so`: ``` $ ldd build/Release/uiohook.so linux-vdso.so.1 => (0x00007ffc6fdd3000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa47cd5c000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fa47cb5a000) libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007fa47c952000) libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fa47c713000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa47c4f6000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa47c12c000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa47bf0a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa47bd06000) libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007fa47baeb000) /lib64/ld-linux-x86-64.so.2 (0x00007fa47d29f000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa47b8e7000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa47b6e1000) ``` --- build_def/linux/uiohook.gyp | 4 +++- docs/manual-build.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build_def/linux/uiohook.gyp b/build_def/linux/uiohook.gyp index 5a5fad72..03b4fa49 100644 --- a/build_def/linux/uiohook.gyp +++ b/build_def/linux/uiohook.gyp @@ -21,7 +21,9 @@ "-Wl,-rpath,