AnaviTechnology / anavi-docs

Documents for all ANAVI open source hardware products
http://anavi.technology/
64 stars 34 forks source link

"library/micronucleus_lib.h:35:10: fatal error: usb.h: No such file or directory" #39

Closed UNIVAC-Colonel-Panic closed 2 years ago

UNIVAC-Colonel-Panic commented 2 years ago

https://github.com/AnaviTechnology/anavi-docs/blob/master/anavi-macro-pad-2/anavi-macro-pad-2.md#prerequisites

On my Debian-based linux distro, I first needed to do:

sudo apt-get install libusb-dev

Without this step, the 'make install' fails:


$ sudo make install

     /bin/bash: libusb-config: command not found
     Building library: library/micronucleus_lib.c...
     gcc  -Ilibrary -O -g -D LINUX -c library/micronucleus_lib.c
     In file included from library/micronucleus_lib.c:32:
     library/micronucleus_lib.h:35:10: fatal error: usb.h: No such file or directory
      #include <usb.h>
               ^~~~~~~
     compilation terminated.
     make: *** [Makefile:72: micronucleus_lib.o] Error 1

The revised prerequisites becomes:

     sudo apt-get install libusb-dev
     git clone https://github.com/micronucleus/micronucleus.git
     cd micronucleus/commandline/
     sudo make install
leon-anavi commented 2 years ago

Hi @UNIVAC-Colonel-Panic,

Thank you! I've update the document with the suggested fix.

Following Linux Kernel convention for using a git trailer I have added your details in a Suggested-by: as part of the git message: https://github.com/AnaviTechnology/anavi-docs/commit/edcb87186a2a7925003bc21dc58cf0c72e7ad894

Thank you again for this fix and all these other suggestions and questions which help to significantly improve the docs!

Thanks, Leon