qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] qga: Allow building of the guest agent without system emulat


From: Thomas Huth
Subject: Re: [PATCH] qga: Allow building of the guest agent without system emulators or tools
Date: Thu, 10 Nov 2022 09:31:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 09/11/2022 22.56, Philippe Mathieu-Daudé wrote:
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'))

Thanks for the idea! By breaking up the lines that contain multiple files, it seems that it can even be refined further.
I'll send a v2.

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]