qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Howard Spoelstra <hsp.cat7@gmail.com>
To: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: lib-usb related linking error with msys2 build
Date: Wed, 24 Jun 2020 15:12:46 +0200	[thread overview]
Message-ID: <CABLmASGaZDBz_9dGeVi3kaePyRxv6YdwxUd2bBLhyQtsVaYi2Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]

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 <kraxel@redhat.com>
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.

    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Message-Id: <20200605125952.13113-1-kraxel@redhat.com>

 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

[-- Attachment #2: Type: text/html, Size: 3400 bytes --]

                 reply	other threads:[~2020-06-24 13:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABLmASGaZDBz_9dGeVi3kaePyRxv6YdwxUd2bBLhyQtsVaYi2Q@mail.gmail.com \
    --to=hsp.cat7@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).