input.rs icon indicating copy to clipboard operation
input.rs copied to clipboard

linker cannot find -linput on Ubuntu 22.04

Open ForwardFeed opened this issue 1 year ago • 2 comments

I tried the example, got blocked on the compiling. Because on debian based distribution, the package libinput is called "libinput10" and just no libinput So i had to create a symlink: sudo ln -s /usr/lib/x86_64-linux-gnu/libinput.so.10 /usr/lib/x86_64-linux-gnu/libinput.so

And the compiling error vanished. Since i couldn't find the answer anywhere and struggled to find the solution, i had to post the solution somewhere.

ForwardFeed avatar Jul 30 '23 15:07 ForwardFeed

The problem is the link-name specified here: https://github.com/Smithay/input.rs/blob/master/input-sys/src/lib.rs#L22

Which is very generic on purpose. I am not sure what would be the best way to make this configurable and thus more easily buildable on debian. :S

Drakulix avatar Jul 31 '23 09:07 Drakulix

I don't know either, i believe the issue isn't on the rust call end but more on the C end. But i really don't know much how it works. The issue cannot be fixed in the packet manager either. cf. https://unix.stackexchange.com/questions/679906/why-is-libinput-packaged-as-libinput10

ForwardFeed avatar Jul 31 '23 15:07 ForwardFeed