1

I'm installing OpenOCD on my Debian stretch system. When I run ./configure it reports it cannot find libusb.

...
checking for LIBUSB1... no
configure: WARNING: libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead
checking for LIBUSB0... no
...

I have the correct dependencies installed, but I still get the error.

libhidapi-libusb0/stable,now 0.8.0~rc1+git20140818.d17db57+dfsg-1 amd64 [installed,automatic]
libusb-1.0-0/stable,now 2:1.0.21-1 amd64 [installed,automatic]
libusb-1.0-0-dev/stable,now 2:1.0.21-1 amd64 [installed]

What gives?

1

The error message is unhelpful at best.

The OpenOCD README lists pkg-config as a dependency. As soon as pkg-config was installed, the ./configure script was able to find libusb-1.0-0-dev.

...
checking for LIBUSB1... yes
configure: libusb-1.0 header bug workaround: LIBUSB1_CFLAGS changed to "-isystem /usr/include/libusb-1.0"
checking for LIBUSB0... no
...

tl;dr

sudo apt-get install pkg-config
0
sudo aptitude install libusb-1.0-0

sudo aptitude install libhidapi-dev

sudo aptitude install libftdi-dev

./configure --prefix=/usr/local --enable-doxygen-pdf --enable-verbose --enable-verbose-usb-io --enable-verbose-usb-comms --enable-usbprog --enable-cmsis-dap LIBUSB1_CFLAGS="-isystem /usr/include/libusb-1.0"

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.