From: "Marc-André Lureau" <mlureau@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 01/20] tests: fix linking test-char on win32
Date: Fri, 6 Jan 2017 14:50:42 -0500 (EST) [thread overview]
Message-ID: <879157803.3629382.1483732242164.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <eb000893-3982-016f-e4dc-81ce0f50b6ce@redhat.com>
Hi
----- Original Message -----
> On 01/05/2017 10:53 AM, Marc-André Lureau wrote:
> > test-char.exe needs main-loop.o symbols, among others. Linking with
> > $(test-block-obj-y) brings what's necessary. We could try to eventually
> > strip to the minimum if needed.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > tests/Makefile.include | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Can I have a bit more background? I'm guessing this doesn't fix an
> actual failure at the moment (probably due to one of the other files
> dragging in stuff indirectly), but rather cleans up a latent problem
> that would otherwise be exposed with patches later in the series (where
> splitting files means the stuff is no longer dragged in indirectly, so
> we need to mention it explicitly)?
It does fix current linking failure:
x86_64-w64-mingw32-g++ -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/pixman-1 -I/home/elmarco/src/qemu/dtc/libfdt -Werror -mms-bitfields -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/glib-2.0 -I/usr/x86_64-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -m64 -mcx16 -mthreads -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN -DWINVER=0x501 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-shift-negative-value -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/home/elmarco/src/qemu/tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m64 -g -o tests/test-char.exe tests/test-char.o qemu-char.o qemu-timer.o io/channel.o io/channel-buffer.o io/channel-command.o io/channel-file.o io/channel-socket.o io/channel-tls.o io/channel-watch.o io/channel-websock.o io/channel-util.o io/task.o crypto/init.o crypto/hash.o crypto/hash-glib.o crypto/hmac.o crypto/hmac-glib.o crypto/aes.o crypto/desrfb.o crypto/cipher.o crypto/tlscreds.o crypto/tlscredsanon.o crypto/tlscredsx509.o crypto/tlssession.o crypto/secret.o crypto/random-platform.o crypto/pbkdf.o crypto/ivgen.o crypto/ivgen-essiv.o crypto/ivgen-plain.o crypto/ivgen-plain64.o crypto/afsplit.o crypto/xts.o crypto/block.o crypto/block-qcow.o crypto/block-luks.o qom/object.o qom/container.o qom/qom-qobject.o qom/object_interfaces.o libqemuutil.a libqemustub.a /home/elmarco/src/qemu/winb/version.o -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lgthread-2.0 -lglib-2.0 -lintl -lwinmm -lws2_32 -liphlpapi -lz -lz
qemu-char.o: In function `win_chr_free':
/home/elmarco/src/qemu/qemu-char.c:2149: undefined reference to `qemu_del_polling_cb'
/home/elmarco/src/qemu/qemu-char.c:2151: undefined reference to `qemu_del_polling_cb'
qemu-char.o: In function `win_stdio_thread':
/home/elmarco/src/qemu/qemu-char.c:2568: undefined reference to `qemu_del_wait_object'
qemu-char.o: In function `qemu_chr_open_stdio':
/home/elmarco/src/qemu/qemu-char.c:2661: undefined reference to `qemu_add_wait_object'
/home/elmarco/src/qemu/qemu-char.c:2646: undefined reference to `qemu_add_wait_object'
/home/elmarco/src/qemu/qemu-char.c:2696: undefined reference to `qemu_del_wait_object'
/home/elmarco/src/qemu/qemu-char.c:2691: undefined reference to `qemu_del_wait_object'
qemu-char.o: In function `win_chr_pipe_init':
/home/elmarco/src/qemu/qemu-char.c:2413: undefined reference to `qemu_add_polling_cb'
qemu-char.o: In function `win_chr_init':
/home/elmarco/src/qemu/qemu-char.c:2215: undefined reference to `qemu_add_polling_cb'
qemu-char.o: In function `win_stdio_wait_func':
/home/elmarco/src/qemu/qemu-char.c:2512: undefined reference to `qemu_del_wait_object'
collect2: error: ld returned 1 exit status
/home/elmarco/src/qemu/rules.mak:109: recipe for target 'tests/test-char.exe' failed
make: *** [tests/test-char.exe] Error 1
I can add this linking error to the commit log if it helps.
>
> Even mentioning _which_ main-loop.o symbol to be grepping for in
> test-char.c might be helpful to the review.
It's from qemu-char.c.
>
> >
> > diff --git a/tests/Makefile.include b/tests/Makefile.include
> > index 4841d582a1..a8f3d12e49 100644
> > --- a/tests/Makefile.include
> > +++ b/tests/Makefile.include
> > @@ -489,7 +489,7 @@ tests/check-qjson$(EXESUF): tests/check-qjson.o
> > $(test-util-obj-y)
> > tests/check-qom-interface$(EXESUF): tests/check-qom-interface.o
> > $(test-qom-obj-y)
> > tests/check-qom-proplist$(EXESUF): tests/check-qom-proplist.o
> > $(test-qom-obj-y)
> >
> > -tests/test-char$(EXESUF): tests/test-char.o qemu-char.o qemu-timer.o
> > $(test-util-obj-y) $(qtest-obj-y) $(test-io-obj-y)
> > +tests/test-char$(EXESUF): tests/test-char.o qemu-char.o qemu-timer.o
> > $(test-util-obj-y) $(qtest-obj-y) $(test-block-obj-y)
>
> At any rate, test-block-obj-y is simply test-io-obj-y plus the
> additional block-obj-y, so you're merely adding an additional dependency
> on block-obj-y files. While a nicer commit message may help, I don't
> see any technical problem in the change, so here's a weak:
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>
next prev parent reply other threads:[~2017-01-06 19:50 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 16:53 [Qemu-devel] [PATCH 00/20] chardev: qom-ify Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 01/20] tests: fix linking test-char on win32 Marc-André Lureau
2017-01-06 16:45 ` Eric Blake
2017-01-06 19:50 ` Marc-André Lureau [this message]
2017-01-06 20:26 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 02/20] qemu-options: stdio is available " Marc-André Lureau
2017-01-06 16:51 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 03/20] char: add qemu_chr_fe_add_watch() Returns description Marc-André Lureau
2017-01-06 16:54 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 04/20] doc: fix spelling Marc-André Lureau
2017-01-06 16:55 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 05/20] char: use a const CharDriver Marc-André Lureau
2017-01-06 18:01 ` Eric Blake
2017-01-06 22:43 ` Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 06/20] char: use a static array for backends Marc-André Lureau
2017-01-06 19:24 ` Eric Blake
2017-01-06 23:22 ` Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 07/20] char: move callbacks in CharDriver Marc-André Lureau
2017-01-06 21:36 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 08/20] char: fold single-user functions in caller Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 09/20] char: introduce generic qemu_chr_get_kind() Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 10/20] char: use a feature bit for replay Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 11/20] char: allocate CharDriverState as a single object Marc-André Lureau
2017-01-06 21:43 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 12/20] bt: use qemu_chr_alloc() Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 13/20] char: rename CharDriverState Chardev Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 14/20] char: rename TCPChardev and NetChardev Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 15/20] spice-char: improve error reporting Marc-André Lureau
2017-01-06 22:22 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 16/20] char: use error_report() Marc-André Lureau
2017-01-05 16:53 ` [Qemu-devel] [PATCH 17/20] gtk: overwrite the console.c char driver Marc-André Lureau
2017-01-06 22:24 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 18/20] baum: use a common prefix for chr callbacks Marc-André Lureau
2017-01-06 22:25 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 19/20] vc: " Marc-André Lureau
2017-01-06 22:26 ` Eric Blake
2017-01-05 16:53 ` [Qemu-devel] [PATCH 20/20] chardev: qom-ify Marc-André Lureau
2017-01-09 18:02 ` Eric Blake
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=879157803.3629382.1483732242164.JavaMail.zimbra@redhat.com \
--to=mlureau@redhat.com \
--cc=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.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).