Skip to content
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

issue with hidapi on github ci #33

Open
bout3fiddy opened this issue Nov 26, 2022 · 1 comment
Open

issue with hidapi on github ci #33

bout3fiddy opened this issue Nov 26, 2022 · 1 comment

Comments

@bout3fiddy
Copy link

Environment information

  • ape and plugin versions:

    "eth-ape>=0.5.2",
    "ape-hardhat>=0.5.1",
    "ape-alchemy>=0.5.0",
    "ape-solidity>=0.5.0",
    "ape-vyper>=0.5.0",
    "ape-ledger>=0.5.0",
    "ape-etherscan>=0.5.1",

  • Python Version: 3.10.4

  • OS: macOS/linux/win
    ubuntu-latest on github or ubuntu-22.04

What went wrong?

building 'hid' extension
      creating build
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/hidapi
      creating build/temp.linux-x86_64-3.10/hidapi/libusb
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/opt/hostedtoolcache/Python/3.10.4/x64/include/python3.10 -c hid.c -o build/temp.linux-x86_64-3.10/hid.o
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/opt/hostedtoolcache/Python/3.10.4/x64/include/python3.10 -c hidapi/libusb/hid.c -o build/temp.linux-x86_64-3.10/hidapi/libusb/hid.o
      hidapi/libusb/hid.c:47:10: fatal error: libusb.h: No such file or directory
         47 | #include <libusb.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> hidapi

note: This is an issue with the package mentioned above, not pip.

https://github.com/curvefi/curve-dao-operations/actions/runs/3554984959/jobs/5971413801

How can it be fixed?

the issue is with the package hidapi:

"hidapi==0.10.1",

i am not sure what's the best way to fix this here, because it seems to work just about fine one my MacBook, but github ci really doesn't like it.

Fill this in if you have ideas on how the bug could be fixed.

@ghost
Copy link

ghost commented Feb 28, 2023

@bout3fiddy hidapi requires libusb but doesn't seem to actually install it as part of the pip installation process it seems. Have you tried installing libusb-dev in your CI builds?

For macOS they already have compatible libraries installed, and I think quite a few Linux distributions do too but not all of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant