Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487810 - =app-emulation/qemu-1.5.3 - Automagic dependency on dev-libs/libusbx
Summary: =app-emulation/qemu-1.5.3 - Automagic dependency on dev-libs/libusbx
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-12 20:27 UTC by Alexander Tsoy
Modified: 2014-04-20 02:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2013-10-12 20:27:00 UTC
If dev-libs/libusbx is installed, then build system automagically enables libusb and qemu get linked with it.

$ ldd /usr/bin/qemu-system-x86_64 | grep usb
        libusb-1.0.so.0 => /usr/lib64/libusb-1.0.so.0 (0x0000031da1570000)

From configure:
> # check for libusb
> if test "$libusb" != "no" ; then
>     if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
>         libusb="yes"

How about IUSE="usb" or "libusb" to control this dependency? It should be added to the package.use.stable.mask until dev-libs/libusbx is stabilized.
Comment 1 Oleh 2013-11-07 11:50:18 UTC
in 1.6.1 version usb flag explicitly enables libusbx (a fork) what's the rationale behind it? What if system has libusb-1.0.x and libusb-0.1.x installed.
Comment 2 Alexander Tsoy 2013-11-07 12:10:44 UTC
(In reply to Oleg from comment #1)
> in 1.6.1 version usb flag explicitly enables libusbx (a fork) what's the
> rationale behind it? What if system has libusb-1.0.x and libusb-0.1.x
> installed.

See configure:

if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
Comment 3 Oleh 2013-11-07 12:23:03 UTC
is that means qemu now require libusbx? There is no information about this switch, I want to understand why libusbx, a fork of libusb. THis doesn't look good as libusb-compat doesn't built with libusbx.
Comment 4 Alexander Tsoy 2013-11-07 12:41:52 UTC
Support for libusb was added in 1.5 [1]. I have no idea, why they set the minimum required version to 1.0.13 (last release of the original libusb is 1.0.9).

@cardoe:
Doug, according to changelog, USB device passthroug can work wothout libusb. Does this mean that "usb" use flag should be renamed to "libusb"?

[1] http://wiki.qemu.org/ChangeLog/1.5
Comment 5 Oleh 2013-11-07 13:57:09 UTC
also, it would be good to know why libusbx set
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2013-11-07 13:59:44 UTC
(In reply to Oleg from comment #5)
> also, it would be good to know why libusbx set

Oleg, look at the responses you've gotten. The configure script requires libusb 1.0.13 or greater. libusb only goes up to 1.0.9 and libusbx took over to provide higher version numbers. So yes, only libusbx will work.
Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2013-11-07 14:08:39 UTC
(In reply to Alexander Tsoy from comment #4)
> Support for libusb was added in 1.5 [1]. I have no idea, why they set the
> minimum required version to 1.0.13 (last release of the original libusb is
> 1.0.9).
> 
> @cardoe:
> Doug, according to changelog, USB device passthroug can work wothout libusb.
> Does this mean that "usb" use flag should be renamed to "libusb"?
> 
> [1] http://wiki.qemu.org/ChangeLog/1.5

Its for hot plugging during the life of the VM. Without it the USB device must be attached when QEMU is started. So the feature is "hot plugging-usb-passthrough" which makes for a bad USE flag. I'm not going to play with USE flag silliness like "libusb" so people can avoid the depend if they want "usb" set globally. When "usb" is set people expect all USB to work in packages, not to have to find that they have to enable "libusb" for some packages.
Comment 8 Oleh 2013-11-07 14:40:47 UTC
(In reply to Doug Goldstein from comment #6)
> (In reply to Oleg from comment #5)
> > also, it would be good to know why libusbx set
> 
> Oleg, look at the responses you've gotten. The configure script requires
> libusb 1.0.13 or greater. libusb only goes up to 1.0.9 and libusbx took over
> to provide higher version numbers. So yes, only libusbx will work.
That is obvious, no problem with it. Is there reply from qemu upstream why libusbx chosen? For example you can't build libusb-compat with libusbx as it doesn't support 0.1.x version.
Comment 9 Alexander Tsoy 2013-11-07 15:18:58 UTC
(In reply to Oleg from comment #8)
> For example you can't build libusb-compat with libusbx as it
> doesn't support 0.1.x version.

I have no problems with building libusb-compat against libusbx. You should open a separate bug then. Moreover, libusbx will be stabilized soon (bug 488708).
Comment 10 Mike Gilbert gentoo-dev 2014-02-09 18:15:33 UTC
A significant update here: as of version 1.0.18, libusbx has been merged back into libusb.

The qemu ebuild should be adjusted with an || dep, or a dependency on an appropriate version of virtual/libusb (an appropriate version does not exist as of this writing).
Comment 11 SpanKY gentoo-dev 2014-04-20 02:09:15 UTC
qemu depends on >=dev-libs/libusb-1.0.18, so i don't think there's anything left to do here