lib-usb related linking error with msys2 build
Hi all,
I get the following error compiling qemu-system-ppc from current master with msys2 (fully updated)
./configure --cross-prefix=x86_64-w64-mingw32- --target-list=ppc-softmmu --enable-gtk --enable-sdl
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:../hw/usb/host-libusb.o: in function `usb_host_open':
C:\msys64\home\hsp\src\qemu-master/hw/usb/host-libusb.c:913: undefined
reference to `libusb_wrap_sys_device'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:208: qemu-system-ppcw.exe] Error 1
make: *** [Makefile:527: ppc-softmmu/all] Error 2
I tracked it down to commit:
$ git bisect bad 9f815e83e983d247a3cd67579d2d9c1765adc644 is the first bad commit commit 9f815e83e983d247a3cd67579d2d9c1765adc644 Author: Gerd Hoffmann <[email protected]> Date: Fri Jun 5 14:59:52 2020 +0200
usb: add hostdevice property to usb-host
The new property allows to specify usb host device name. Uses standard qemu_open(), so both file system path (/dev/bus/usb/$bus/$dev on linux) and file descriptor passing can be used.
Requires libusb 1.0.23 or newer. The hostdevice property is only present in case qemu is compiled against a new enough library version, so the presence of the property can be used for feature detection.
Message-Id: <[email protected]>
hw/usb/host-libusb.c | 75 ++++++++++++++++++++++++++++++++++++++++++---------- hw/usb/trace-events | 1 + 2 files changed, 62 insertions(+), 14 deletions(-)
According to msys2, the following libusb is provided:
Group(s):Repo(s)mingw32, mingw64 Version: 1.0.23-1Upstream URL:
https://libusb.info/Arch Linux:1.0.23 GIT Version:1.0.23-1 License(s)LGPLBinary Packages:mingw-w64-i686-libusbmingw-w64-x86_64-libusb
Thanks for looking into this.
Best,
Howard