Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#67103 - [python-hidapi] hid_get_input_report not present in hidapi (dependency mismatch)

Attached to Project: Community Packages
Opened by Richard Steinmetz (str) - Thursday, 25 June 2020, 09:25 GMT
Last edited by Morten Linderud (Foxboron) - Monday, 06 July 2020, 10:55 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Morten Linderud (Foxboron)
Filipe LaĆ­ns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:
This package has an incorrect dependency. python-hidapi v0.9.0.3 corresponds to v0.9.0.post3 from upstream. python-hidapi v0.9.0.post3 upstream builds against the hidapi master [1] but the arch
package depends on hidapi v0.9.0 which is roughly 60 commits behind master. This breaks all
packages that require the function hid_get_input_report because it is implemented in
python-hidapi v0.9.0.post3 [2] but not in the current hidapi version from arch [3]. Check the header
/usr/include/hidapi/hidapi.h of hidapi v0.9.0 [4] (it does not contain hid_get_input_report).

Additional info:
[1] https://github.com/trezor/cython-hidapi/commit/38ecebbafc985ba06e8e826f88b3627c351b01b4
[2] https://github.com/trezor/cython-hidapi/commit/cd2b2878b4299d4be63e090b6eaf572276f6e4f1
[3] https://github.com/libusb/hidapi/tree/hidapi-0.9.0
[4] https://www.archlinux.org/packages/community/x86_64/hidapi/

Steps to reproduce:
1. Install python-hidapi v0.9.0.3 (current version)
2. Install any package that uses hid_get_input_report (e.g. liquidctl from AUR)
3. The package may not run properly and may produce the following error message:
ImportError: /usr/lib/python3.8/site-packages/hid.cpython-38-x86_64-linux-gnu.so: undefined symbol: hid_get_input_report
This task depends upon

Closed by  Morten Linderud (Foxboron)
Monday, 06 July 2020, 10:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with 0.9.0.3-5
Comment by Andrew A (andrew-wja) - Thursday, 25 June 2020, 11:36 GMT
Found this bug report by searching for the linker error message and just want to confirm it is also happening for me after a pacman -Syu pulled the latest hidapi

Edit: this bug is also present in hidapi-0.9.0-1 which is the only version available on archive.archlinux.org -- this means there is *no* available version of the hidapi package that does not exhibit this error
Comment by Jonas Malaco Filho (jonasmalaco) - Thursday, 25 June 2020, 15:02 GMT
Actually, this breaks simply importing the module in Python.

python -c "import hid"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /usr/lib/python3.8/site-packages/hid.cpython-38-x86_64-linux-gnu.so: undefined symbol: hid_get_input_report
Comment by Jonas Malaco Filho (jonasmalaco) - Thursday, 25 June 2020, 21:23 GMT
Also filed a bug upstream,[1] although I'm not sure if it's actually actionable there.

[1] https://github.com/trezor/cython-hidapi/issues/90
Comment by Jonas Malaco Filho (jonasmalaco) - Sunday, 05 July 2020, 21:14 GMT
What can I do help here?

Morten, in the upstream issue you seemed to be leaning toward patching hid_get_input_report out. Filipe had mentioned the same thing in the liquidctl issue.

Can I send you guys a patch that does that + adds a basic test?
Comment by Morten Linderud (Foxboron) - Sunday, 05 July 2020, 21:18 GMT
Yes, essentially just reverting the one commit added between the versions. I have been busy the past week so haven't had time to fix this, almost forgot it even :p

Feel free to attach a patch for the changes!
Comment by Morten Linderud (Foxboron) - Sunday, 05 July 2020, 23:06 GMT
You can also send a patch to my github repo if it's easier for you

https://github.com/Foxboron/archlinux-pkgbuilds/tree/master/python-hidapi
Comment by Jonas Malaco Filho (jonasmalaco) - Monday, 06 July 2020, 03:21 GMT
I figured : )
Sent a PR to your GitHub repo.

Loading...