Libusb-0.1 versus libusb-1.0

So after discovering that while I had libusb-devel-0.1 and
libusb1-devel-1.0.3 installed on my RHEL-6 machine here (and ubuntu),
gnuradio compiled against 0.1 despite 0.1 being “ancient and
unsupported”. I then removed libusb-devel and gnuradio fails to
configure.

[root@aurora gnuradio]# ls -lad /usr/lib64/libusb-1.0*
-rw-r–r--. 1 root root 81950 Nov 19 2009 /usr/lib64/libusb-1.0.a
lrwxrwxrwx. 1 root root 19 Jan 4 22:50 /usr/lib64/libusb-1.0.so ->
libusb-1.0.so.0.0.0
lrwxrwxrwx. 1 root root 19 Jan 2 17:59 /usr/lib64/libusb-1.0.so.0 ->
libusb-1.0.so.0.0.0
-rwxr-xr-x 1 root root 54976 Nov 19 2009
/usr/lib64/libusb-1.0.so.0.0.0

[root@aurora gnuradio]# rpm -qa | grep -i libusb
libusb1-static-1.0.3-1.el6.x86_64
libusb1-1.0.3-1.el6.x86_64
libusb1-devel-1.0.3-1.el6.x86_64
libusb-0.1.12-23.el6.x86_64

[root@aurora gnuradio]# ./configure --enable-docs --enable-grc
–enable-gnuradio-examples --enable-gr-utils --enable-gr-sounder
–enable-gr-qtgui --enable-gr-wxgui --enable-gr-video-sdl
–enable-gr-trellis --enable-gr-radio-astronomy --enable-gr-pager
–enable-gr-noaa --enable-gr-gsm-fr-vocoder --enable-gr-gpio
–enable-gr-cvsd-vocoder --enable-gr-atsc --enable-gr-audio-jack
–enable-gr-audio-alsa --enable-gr-usrp2 --enable-gr-usrp --enable-usrp2
–enable-usrp --enable-gnuradio-core --enable-gruel --enable-python
–enable-gr-uhd
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu


configure: Checking for LIBUSB version ‘libusb’
checking for USB… no
configure: Checking for LIBUSB version ‘libusb-legacy’
checking for USB… no
Unable to find dependency libusb.
checking for sdcc… sdcc -mmcs51 --no-xinit-opt
checking for asx8051… asx8051 -plosgff
checking sdcc_version “2.9.0”… 2.9.0
configure: error: Component usrp has errors; stopping.

So just what is the status with libusb. Should it be compiling against
libusb-0.1 or should it be compiling against libusb-1.0 and if so, why
isn’t configure finding libusb-1.0 on Ubuntu or RHEL-6?

So after discovering that while I had libusb-devel-0.1 and
libusb1-devel-1.0.3 installed on my RHEL-6 machine here (and ubuntu),
gnuradio compiled against 0.1 despite 0.1 being “ancient and
unsupported”. I then removed libusb-devel and gnuradio fails to configure.

I believe that Gnu Radio “classic” still uses libusb-0, while UHD uses
libusb-1. They are
different APIs

libusb1-1.0.3-1.el6.x86_64
–enable-gr-audio-alsa --enable-gr-usrp2 --enable-gr-usrp --enable-usrp2
Unable to find dependency libusb.


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


Principal Investigator
Shirleys Bay Radio Astronomy Consortium

I have never seen any issues regarding libusb and gnuradio.
GNURadio compliled using F9-14 without any probs (no uhd)

Mostlikely your machine is faulty?

Patrik

----- Original Message -----
From: “Marcus D. Leech” [email protected]
To: [email protected]
Sent: Friday, May 27, 2011 14:41
Subject: Re: [Discuss-gnuradio] libusb-0.1 versus libusb-1.0

The issue isn’t duration- its when the flowgraph shuts down- as the
other thread from someone else is experiencing- it seems to be when the
flowgraph calls lock()/unlock() and stop(). It also only occurs on
bi-directional flowgraphs. But I do agree that there’s an improper
shutdown- though I believe its due to some kind of bug. I can construct
a very very very simple flowgraph with a sig source and a scope and have
it crash when it shuts down “properly”.

You had mentioned that when you “CTRL+C” it worked OK, but when you
unceremoniously closed the window, it
didn’t.

I believe that Gnu Radio itself explicitly sets up a signal handler for
that case, to make sure that the destructors are called when you
explicitly ctrl-C out of a flow-graph.

But for “window close”, it may be the case that WxPython doesn’t signal
everything to “close thyself in a polite manner”.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Fri, May 27, 2011 at 1:08 AM, Brett L. Trotter [email protected]
wrote:

So after discovering that while I had libusb-devel-0.1 and
libusb1-devel-1.0.3 installed on my RHEL-6 machine here (and ubuntu),
gnuradio compiled against 0.1 despite 0.1 being “ancient and
unsupported”. I then removed libusb-devel and gnuradio fails to configure.

libusb-1.0 isn’t used unless specified.

./configure --with-fusb-tech=libusb1

So just what is the status with libusb. Should it be compiling against
libusb-0.1 or should it be compiling against libusb-1.0 and if so, why
isn’t configure finding libusb-1.0 on Ubuntu or RHEL-6?

Either (if not UHD). The differences are minor, though the reasons are
more subtle.

A quick search may reveal that libusb-1.0 supports asynchronous I/O
which is substantially faster than its predecessor, but this is
deceiving with regards to gnuradio. The libusrp driver worked around
limitations of libusb-0.1 through a hybrid case of using underlying -
platform specific - calls (usbfs in the case of Linux) where high
throughput was needed.

libusb-1.0 adds a layer on top of the kernel interfaces and the
platform specific calls are removed. Since the libusb-1.0 asynchronous
interface is largely modelled after the Linux kernel interface, this
layer is “thin” and the differences are negligible in the most cases.

Thomas