qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	"Willian Rampazzo" <willianr@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v2 1/2] meson: Select 'have_system' when virtiofsd is enabled
Date: Fri, 30 Apr 2021 09:45:35 +0200	[thread overview]
Message-ID: <743ac449-06c1-1e0e-3e9f-5e367c593a47@redhat.com> (raw)
In-Reply-To: <CAFEAcA-ROOwxAg5oF3hK=Qh-mBcyp3d=sb4pNuxG1ZBNLruEig@mail.gmail.com>

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	other threads:[~2021-04-30  7:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  8:33 [PATCH v2 0/2] virtiofsd: Meson build fix Philippe Mathieu-Daudé
2021-04-29  8:33 ` [PATCH v2 1/2] meson: Select 'have_system' when virtiofsd is enabled Philippe Mathieu-Daudé
2021-04-29  8:44   ` Peter Maydell
2021-04-30  7:45     ` Paolo Bonzini [this message]
2021-04-29 13:50   ` Connor Kuehl
2021-04-29 15:15     ` Philippe Mathieu-Daudé
2021-04-29 15:18       ` Dr. David Alan Gilbert
2021-04-29  8:33 ` [PATCH v2 2/2] gitlab-ci: Add a job to build virtiofsd standalone Philippe Mathieu-Daudé
2021-04-29  8:43   ` Daniel P. Berrangé
2021-04-29  9:41     ` Philippe Mathieu-Daudé
2021-04-29 13:16   ` Wainer dos Santos Moschetta
2021-04-29 13:22     ` Philippe Mathieu-Daudé

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=743ac449-06c1-1e0e-3e9f-5e367c593a47@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=ma.mandourr@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    --cc=willianr@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).