Installing Software with Missing Library - libusb1.0

1

1

I'm installing software called bladeRF using cmake. The following error happens:

$ cmake -DCMAKE_INSTALL_PREFIX=~/user/local ../

CMake Error at host/libraries/libbladeRF/CMakeLists.txt:104 (message):
  No libbladeRF backends are enabled.  Please enable one or more backends.

So I tried adding some flags to cmake:

$ cmake -DCMAKE_INSTALL_PREFIX=~/user/local -DENABLE_BACKEND_USB=ON -DENABLE_BACKEND_LIBUSB=ON  ../

CMake Error at host/libraries/libbladeRF/CMakeLists.txt:203 (message):
  libusb-1.0 not found.  This is required to use the libbladeRF libusb
  backend.  For binary releases, try setting LIBUSB_PATH.

Then, I searched for the path to libusb1.0 using:

$ dpkg -L libusb-1.0-0
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libusb-1.0-0
/usr/share/doc/libusb-1.0-0/changelog.gz
/usr/share/doc/libusb-1.0-0/README
/usr/share/doc/libusb-1.0-0/changelog.Debian.gz
/usr/share/doc/libusb-1.0-0/copyright
/lib
/lib/arm-linux-gnueabihf
/lib/arm-linux-gnueabihf/libusb-1.0.so.0.1.0
/lib/arm-linux-gnueabihf/libusb-1.0.so.0

So libusb is installed. I then added another flag to cmake:

cmake -DCMAKE_INSTALL_PREFIX=~/user/local -DENABLE_BACKEND_USB=ON -DENABLE_BACKEND_LIBUSB=ON  -LIBUSB_PATH=/lib/arm-linux-gnueabihf ../

CMake Error at host/libraries/libbladeRF/CMakeLists.txt:203 (message):
  libusb-1.0 not found.  This is required to use the libbladeRF libusb
  backend.  For binary releases, try setting LIBUSB_PATH.

I even tried both of these:

export LIBUSB_PATH=/lib/arm-linux-gnueabihf
export PKG_CONFIG_PATH=/lib/arm-linux-gnueabihf

Those didn't work either. How do I help cmake find the path to libusb?

UPDATE: gcc -v seems to show that it is searching in /usr while libusb is installed in /lib. Is this on the right track?

Skiandtea

Posted 2016-11-28T21:19:03.377

Reputation: 23

Answers

1

Typically when building software, you need the development version of the libraries.

You want libusb-1.0-0-dev installed

Journeyman Geek

Posted 2016-11-28T21:19:03.377

Reputation: 119 122