[Make] Libusb error
See original GitHub issueHello,
Can’t make because of libusb :
pierrearnoud@macbook-pro-de-pierre usbboot % make
cc -Wall -Wextra -g -o rpiboot main.c -lusb-1.0
main.c:1:10: fatal error: 'libusb-1.0/libusb.h' file not found
#include <libusb-1.0/libusb.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
I have libusb insatlled
pierrearnoud@macbook-pro-de-pierre usbboot % brew info libusb
libusb: stable 1.0.24 (bottled), HEAD
Library for USB device access
https://libusb.info/
/opt/homebrew/Cellar/libusb/1.0.24 (22 files, 560.5KB) *
Poured from bottle on 2021-05-30 at 18:06:35
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libusb.rb
License: LGPL-2.1-or-later
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 64,482 (30 days), 211,215 (90 days), 813,259 (365 days)
install-on-request: 6,988 (30 days), 19,139 (90 days), 77,925 (365 days)
build-error: 0 (30 days)
I’m working on MacBook Pro :
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Libusb error while running make · Issue #12 - GitHub
It's as I suspected you have a (probably older) libusb installation in /usr/local which is used instead of the correct official version. This ......
Read more >fatal error: libusb/libusb.h: No such file or directory librtlsdr ...
... I suspect my problem was actually that I hadn't installed gr-osmosdr with ... cd rtl-sdr mkdir build cd build cmake .. sudo...
Read more >gcc: error: /usr/lib/libusb-1.0.so: No such file or directory
First install the dev package: sudo apt update sudo apt install libusb-1.0-0-dev. Next, we can locate the file by listing all the files...
Read more >libusb-1.0 API Reference
Error handling. libusb functions typically return 0 on success or a negative error code on failure. These negative error codes relate to LIBUSB_ERROR...
Read more >[libusb] compile error with libusb-1.0 - SourceForge
I am trying to make a flightgear program using a usb input device (LS1208). I have compiled and run the program before on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank for your answer. Finally I just figured out how solutions my problem ! You was right, we need to include homebrew libusb : we can juste modify the Makefile with this :
Or the main.c and MakeFile for greater durability : Makefile :
main.c :
@Parnoud @Radek-Suski I have made PR https://github.com/raspberrypi/usbboot/pull/107, which fixes this issue.