qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/2] meson: Select 'have_system' when virtiofsd is enabled


From: Paolo Bonzini
Subject: Re: [PATCH v2 1/2] meson: Select 'have_system' when virtiofsd is enabled
Date: Fri, 30 Apr 2021 09:45:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 29/04/21 10:44, Peter Maydell wrote:
On Thu, 29 Apr 2021 at 09:33, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

When not explicitly select a sysemu target and building virtiofsd,
the seccomp/cap-ng libraries are not resolved, leading to this error:

   $ configure --target-list=i386-linux-user --disable-tools --enable-virtiofsd
   tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires 
libcap-ng-devel and seccomp-devel

Fix by enabling sysemu (have_system) when virtiofsd is built.

Reported-by: Mahmoud Mandour <ma.mandourr@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
  meson.build | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/meson.build b/meson.build
index c6f4b0cf5e8..f858935ad95 100644
--- a/meson.build
+++ b/meson.build
@@ -51,6 +51,8 @@
    have_system = have_system or target.endswith('-softmmu')
  endforeach
  have_tools = 'CONFIG_TOOLS' in config_host
+# virtiofsd depends on sysemu
+have_system = have_system or not get_option('virtiofsd').disabled()

This looks odd. The natural assumption is that "have_system" ought to mean
"we are building a system emulator", not "we are building a system emulator
or virtiofsd".

I agree this is a bit jarring.

If virtiofsd requires libcap-ng-devel and seccomp-devel, those tests only should use

  have_system or not get_option('virtiofsd').disabled()

instead of just have_system. (The reason why we have those complicated expressions is to avoid getting warnings on static builds, for libraries that are only available as shared libraries. There are plans to make it look a bit nicer in upstream Meson which the maintainers have already accepted; however, I haven't been able to contribute much to it lately).

Thanks,

Paolo




reply via email to

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