From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org, Konstantin Kostiuk <kkostiuk@redhat.com>
Cc: qemu-trivial@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Michael Roth <michael.roth@amd.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] qga: Allow building of the guest agent without system emulators or tools
Date: Wed, 9 Nov 2022 22:56:56 +0100 [thread overview]
Message-ID: <b81930e5-9df7-a80a-5db4-09290a3b71f3@linaro.org> (raw)
In-Reply-To: <20221109173750.201615-1-thuth@redhat.com>
On 9/11/22 18:37, Thomas Huth wrote:
> If configuring with "--disable-system --disable-user --enable-guest-agent"
> the linking currently fails with:
>
> qga/qemu-ga.p/commands.c.o: In function `qmp_command_info':
> build/../../home/thuth/devel/qemu/qga/commands.c:70: undefined reference to `qmp_command_name'
> build/../../home/thuth/devel/qemu/qga/commands.c:71: undefined reference to `qmp_command_is_enabled'
> build/../../home/thuth/devel/qemu/qga/commands.c:72: undefined reference to `qmp_has_success_response'
> qga/qemu-ga.p/commands.c.o: In function `qmp_guest_info':
> build/../../home/thuth/devel/qemu/qga/commands.c:82: undefined reference to `qmp_for_each_command'
> qga/qemu-ga.p/commands.c.o: In function `qmp_guest_exec':
> build/../../home/thuth/devel/qemu/qga/commands.c:410: undefined reference to `qbase64_decode'
> qga/qemu-ga.p/channel-posix.c.o: In function `ga_channel_open':
> build/../../home/thuth/devel/qemu/qga/channel-posix.c:214: undefined reference to `unix_listen'
> build/../../home/thuth/devel/qemu/qga/channel-posix.c:228: undefined reference to `socket_parse'
> build/../../home/thuth/devel/qemu/qga/channel-posix.c:234: undefined reference to `socket_listen'
> qga/qemu-ga.p/commands-posix.c.o: In function `qmp_guest_file_write':
> build/../../home/thuth/devel/qemu/qga/commands-posix.c:527: undefined reference to `qbase64_decode'
>
> Let's make sure that we also compile and link the required files if
> the system emulators have not been enabled.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> qapi/meson.build | 2 +-
> stubs/meson.build | 2 +-
> util/meson.build | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
> diff --git a/util/meson.build b/util/meson.build
> index 59c1f467bb..b260539bd5 100644
> --- a/util/meson.build
> +++ b/util/meson.build
> @@ -68,7 +68,7 @@ if have_system
> util_ss.add(when: 'CONFIG_LINUX', if_true: files('userfaultfd.c'))
> endif
>
> -if have_block
> +if have_block or have_ga
> util_ss.add(files('aiocb.c', 'async.c', 'aio-wait.c'))
> util_ss.add(files('base64.c'))
> util_ss.add(files('buffer.c'))
This can be eventually reduced for 'have_ga':
-- 8< --
diff --git a/util/meson.build b/util/meson.build
index 59c1f467bbe..690e8be903e 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -68,28 +68,30 @@
util_ss.add(when: 'CONFIG_LINUX', if_true: files('userfaultfd.c'))
endif
-if have_block
+if have_block or have_ga
util_ss.add(files('aiocb.c', 'async.c', 'aio-wait.c'))
util_ss.add(files('base64.c'))
+
util_ss.add(files('coroutine-@0@.c'.format(config_host['CONFIG_COROUTINE_BACKEND'])))
+ util_ss.add(files('lockcnt.c'))
+ util_ss.add(files('main-loop.c'))
+ util_ss.add(files('qemu-coroutine.c', 'qemu-coroutine-lock.c',
'qemu-coroutine-io.c'))
+ util_ss.add(files('qemu-coroutine-sleep.c'))
+ util_ss.add(files('qemu-co-shared-resource.c'))
+ util_ss.add(files('qemu-co-timeout.c'))
+ util_ss.add(files('iov.c', 'qemu-sockets.c', 'uri.c'))
+ util_ss.add(files('thread-pool.c', 'qemu-timer.c'))
+endif
+if have_block
util_ss.add(files('buffer.c'))
util_ss.add(files('bufferiszero.c'))
-
util_ss.add(files('coroutine-@0@.c'.format(config_host['CONFIG_COROUTINE_BACKEND'])))
util_ss.add(files('hbitmap.c'))
util_ss.add(files('hexdump.c'))
util_ss.add(files('iova-tree.c'))
- util_ss.add(files('iov.c', 'qemu-sockets.c', 'uri.c'))
- util_ss.add(files('lockcnt.c'))
- util_ss.add(files('main-loop.c'))
util_ss.add(files('nvdimm-utils.c'))
- util_ss.add(files('qemu-coroutine.c', 'qemu-coroutine-lock.c',
'qemu-coroutine-io.c'))
util_ss.add(when: 'CONFIG_LINUX', if_true: [
files('vhost-user-server.c'), vhost_user
])
util_ss.add(files('block-helpers.c'))
- util_ss.add(files('qemu-coroutine-sleep.c'))
- util_ss.add(files('qemu-co-shared-resource.c'))
- util_ss.add(files('qemu-co-timeout.c'))
- util_ss.add(files('thread-pool.c', 'qemu-timer.c'))
util_ss.add(files('readline.c'))
util_ss.add(files('throttle.c'))
util_ss.add(files('timed-average.c'))
---
Regardless:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2022-11-09 21:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 17:37 [PATCH] qga: Allow building of the guest agent without system emulators or tools Thomas Huth
2022-11-09 17:50 ` Konstantin Kostiuk
2022-11-09 21:56 ` Philippe Mathieu-Daudé [this message]
2022-11-10 5:49 ` Markus Armbruster
2022-11-10 8:35 ` Thomas Huth
2022-11-10 9:49 ` Philippe Mathieu-Daudé
2022-11-10 9:57 ` Thomas Huth
2022-11-10 10:05 ` Daniel P. Berrangé
2022-11-10 8:31 ` Thomas Huth
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=b81930e5-9df7-a80a-5db4-09290a3b71f3@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=thuth@redhat.com \
/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).