-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prebuilts for Linux are broken #268
Comments
Might want to unpublish 0.7.0+ If that is going to break for people? I was just trying to integrate iohooks and having issues, when I saw this issue pop up. If it helps anyone, here is here my config, and logs
iohook package.json config
npm rebuild output this seems strange, It seems like it should download the node72 and electron85, but only downloads one of them
Logs from trying to require iohook in node:
|
FWIW, latest Windows prebuilds do work fine - tested successfully on Win 10/Electron 11/iohook 0.7.1. Mac 0.7.1 prebuilds fail with error |
#269 fixes the Mac build issue as far as I can tell from my own testing on macOS 10.13 and 11.0. Linux issue looks like a totally different one. That being said the same lines I changed in the Mac build defs in #269 appear to be broken/malformed in the Linux defs too but maybe loading libs on Linux is smarter than on Mac so this has no effect (e.g. on Linux the loader's path is automatically used to search for the requested library file by default without having to specify it in the rpath as on Mac). For reference in case someone who knows Linux better than I wants to take a look, the lines in question are iohook/build_def/linux/uiohook.gyp Line 21 in e51a869
iohook/build_def/linux/binding.gyp Line 22 in e51a869
|
Linking with X11-xcb may be required for the undefined symbol XGetXCBConnection. #270 will fix the issue. |
@marcelblum I was able to reproduce on y macOS to. Merged and generating prebuilt now. @ykhwong Also merged your fix. @ericwooley I'll unpublish these versions from NPM later today if it doesn't work. |
v0.7.2 fixes prebuilds for macos, thanks a lot @marcelblum |
Yeah, having new prebuilts will be super nice for those of us who don't bother with building it :) |
If I don't want to use it in an Electron environment and only in a basic Node app, are there any available workarounds as of now? |
@abhijit-hota current status AFAIK from my own testing and other users' comments:
If you really need Node v15 support you could try using the iohook 0.6.6 codebase (pre node-gyp) and manually building for that target, it might "just work". |
Thanks for summarizing it @marcelblum . Windows environment checks out.
on_library_load [458]: XOpenDisplay failure!
load_input_helper [1918]: Using XFree86 keyboard layout.
load_input_helper [1920]: XKB support is required to accurately determine keyboard characters!
[1] 31701 segmentation fault node index.js |
⚠ Maybe not accurate. Need feedback. ⚠ Node Environment
[1] Suported upto Node 13.x Electron
|
It does not seem to have either libxkbcommon-x11-0 or libxkbcommon-x11-dev installed. Try again after installing it. |
@ykhwong Oh snap. I did install it but I get this error again: on_library_load [456]: XOpenDisplay failure!
load_input_helper [1907]: XkbGetKeyboard failed to locate a valid keyboard!
[1] 6149 segmentation fault node index.js |
X11 is a dependency of the Linux prebuilds, but WSL1 and WSL2 both do not have an X11 server by default. You can install a discrete X11 server software such as VcXsrv for Windows. Start the server on Windows and add the following line to $HOME/.bashrc:
After restarting the terminal, the XOpenDisplay failure message will disappear. Alternatively, for a non-production/testing purpose, a fake X11 called xvfb can be set up by typing
|
@ykhwong Thank you for the detailed steps. However, can I expect 0.7.2+ versions to support WSL2 without any manual tinkering like this? P.S. I really don't know how it all works so pardon me for stupid questions if any. |
@abhijit-hota The iohook depends on libuiohook that requires X11 for the Linux platform by nature. It is not a WSL-specific issue. You may encounter the situation on any non-GUI based Linux system without a proper X11 server configuration. Without X11 or the like, I have no idea how we can handle keyboard and mouse events via native hooks inside and outside your application. |
Oh I see. |
Hey @ykhwong , thanks for the explanation. Maybe we should just make it obvious in the README that it requires this on Linux. |
I agree. I hope you find the information useful. Thanks. :) |
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 wilix-team#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) ```
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 wilix-team#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) ```
stil iohook is broken? |
for linux |
I'm still having issues with Ubuntu 18.04.5 |
I assumed that after #279 was merged, we were really just waiting for a new release, since the binaries need to be rebuilt. But 0.9.0 was recently released and those binaries appear to also result in the same error. I am thinking this issue is not fixed. |
Same on my side using Arch (and X11) |
I debugged and look like I created #314 to update the bindings with this change. |
@catdad |
fixing linux prebuilds by linking xtst as well
@catdad Thanks, it worked for me too :) |
Just updated Node from 10.x to 14.x, & a previously working app broke with the "XKB support is required to accurately determine keyboard characters" error - it looks like a fix is in the works, but as the latest version on npm is still non-functional, I tried extracting the binaries in @catdad's prebuilds.zip/iohook-v0.9.0-node-v83-linux-x64.tar.gz into node_modules/iohook/node-v83-linux-x64. Unfortunately, the segmentation fault persists. It sounds like some were able to get this going, if you could provide any tips I'd greatly appreciate. I thought just extracting catdad's binaries to the mentioned paths would work, but it doesn't seem to in my case. |
Still seeing the same error as mentioned above in Linux |
Same here! Node: v14.15.0
|
Guess what's changed... absolutely nothing. Last time I tried this was April and it is STILL broken.
I guess iohook will STILL be left out of my project. /shrug |
yup, likewise... |
Yeah my project is on hold because I cant capture keypresses with either this package or others.... |
Since we merged the new build process (#258), we have Electron 9+ and node 12+ support, but the prebuilt are broken.
The text was updated successfully, but these errors were encountered: