joycontrol icon indicating copy to clipboard operation
joycontrol copied to clipboard

Issue with libhidapi-libusb.so

Open wispii opened this issue 2 years ago • 9 comments

Been trying to use joycontrol on my linux PC, but I keep encountering this Issue

Traceback (most recent call last): File "./run_controller_cli.py", line 10, in from joycontrol import logging_default as log, utils File "/home/z-r1nwoomy/joycontrol/joycontrol/utils.py", line 5, in import hid File "/usr/local/lib/python3.8/dist-packages/hid/init.py", line 83, in hidapi.hid_get_input_report.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_size_t] File "/usr/lib/python3.8/ctypes/init.py", line 386, in getattr func = self.getitem(name) File "/usr/lib/python3.8/ctypes/init.py", line 391, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libhidapi-libusb.so: undefined symbol: hid_get_input_report

I have tried re-installing all the modules needed, as well as building hidapi manually, but nothing has helped.

wispii avatar Aug 22 '22 14:08 wispii

Hi, please give this solution a try. https://github.com/Poohl/joycontrol/issues/17#issuecomment-1140315862

darrenchang avatar Aug 22 '22 16:08 darrenchang

This issue is a duplicate of https://github.com/Poohl/joycontrol/issues/17#issue-1213491745

darrenchang avatar Aug 22 '22 16:08 darrenchang

Hi, please give this solution a try. #17 (comment)

I've tried the soluton, but now i'm getting this error: Traceback (most recent call last): File "./run_controller_cli.py", line 10, in from joycontrol import logging_default as log, utils File "/home/z-r1nwoomy/joycontrol/joycontrol/utils.py", line 5, in import hid File "/usr/local/lib/python3.8/dist-packages/hid/init.py", line 30, in raise ImportError(error) ImportError: Unable to load any of the following libraries:libhidapi-hidraw.so libhidapi-hidraw.so.0 libhidapi-libusb.so libhidapi-libusb.so.0 libhidapi-iohidmanager.so libhidapi-iohidmanager.so.0 libhidapi.dylib hidapi.dll libhidapi-0.dll

wispii avatar Aug 22 '22 16:08 wispii

What is your OS version?

darrenchang avatar Aug 22 '22 16:08 darrenchang

What is your OS version?

Linux Mint 20.3

wispii avatar Aug 22 '22 16:08 wispii

Did you make sure to move your compiled libhidapi-hidraw.so.0 to /usr/lib/arm-linux-gnueabihf/libhidapi-hidraw.so.0? And make sure you change the architecture. Mine is arm-linux. yours might my x86_64_<something>

darrenchang avatar Aug 22 '22 16:08 darrenchang

Yeah, I made sure it was X86_64-linux-gnu when doing the copy commands.

wispii avatar Aug 22 '22 16:08 wispii

That's strange. Do you have a raspberry pi that you try this on? I'm using pi 3 and it works flawless. I have to compile my own libhidapi-hidraw.so.0 on pi 3 as well.

darrenchang avatar Aug 22 '22 16:08 darrenchang

Sadly no.

wispii avatar Aug 22 '22 17:08 wispii