Skip to contentSkip to conversation

hw/usb/host-libusb.c:1254:217: error: ‘LIBUSB_LOG_LEVEL_WARNING’ undeclared here (not in a function)

Qemu-devel Michael Tokarev 3 participants 3 messages Apr 18, 2013

lore
Share & tools
lore
#0 lore raw

The error in $subject is spewed when trying to compile current qemu code on my debian wheezy system.

/usr/include/libusb-1.0/libusb.h does not define any LIBUSB_LOG_LEVEL* constants. libusb-1.0-0 on my system is of version 1.0.11.

Should we define some minimum libusb-1.0 version requiriment, or conditionally compile the 'loglevel' property? Which minimum version is needed?

Thanks,

/mjt

#1 lore raw
Quoted 9 lines · Michael Tokarev

The error in $subject is spewed when trying to compile current qemu code on my debian wheezy system.

/usr/include/libusb-1.0/libusb.h does not define any LIBUSB_LOG_LEVEL* constants. libusb-1.0-0 on my system is of version 1.0.11.

Should we define some minimum libusb-1.0 version requiriment, or conditionally compile the 'loglevel' property? Which minimum version is needed?

I think it would be sufficient for QEMU to use a hardcoded '2' rather than the symbolic constant -- AFAICT older libusb provides the functions for setting log level and the same set of options, it just doesn't provide an enum for them.

(In particular we already rely on the integer values having well defined and stable meanings across different libusb versions, because we're exposing access to them to the user via a pure integer property...)

-- PMM

#2 lore raw
In reply to Michael Tokarev
Quoted 9 lines · Michael Tokarev

The error in $subject is spewed when trying to compile current qemu code on my debian wheezy system.

/usr/include/libusb-1.0/libusb.h does not define any LIBUSB_LOG_LEVEL* constants. libusb-1.0-0 on my system is of version 1.0.11.

Should we define some minimum libusb-1.0 version requiriment, or conditionally compile the 'loglevel' property? Which minimum version is needed?

I think we should go for a minimum version requirement. Dunno which version the loglevels where added, Hans?

cheers,
Gerd