qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH] meson: Propagate gnutls dependency


From: Peter Maydell
Subject: Re: [PATCH] meson: Propagate gnutls dependency
Date: Sat, 2 Jan 2021 13:25:07 +0000

On Sat, 2 Jan 2021 at 12:54, Roman Bolshakov <r.bolshakov@yadro.com> wrote:
>
> crypto/tlscreds.h includes GnuTLS headers if CONFIG_GNUTLS is set, but
> GNUTLS_CFLAGS, that describe include path, are not propagated
> transitively to all users of crypto and build fails if GnuTLS headers
> reside in non-standard directory (which is a case for homebrew on Apple
> Silicon).
>
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>

Ah, this is https://bugs.launchpad.net/qemu/+bug/1909256
-- thanks for finding a fix.

> ---
>  block/meson.build          | 2 +-
>  io/meson.build             | 2 +-
>  meson.build                | 5 +++--
>  storage-daemon/meson.build | 2 +-
>  tests/meson.build          | 6 +++---
>  ui/meson.build             | 2 +-
>  6 files changed, 10 insertions(+), 9 deletions(-)

> diff --git a/ui/meson.build b/ui/meson.build
> index 013258a01c..e6655c94a6 100644
> --- a/ui/meson.build
> +++ b/ui/meson.build
> @@ -29,7 +29,7 @@ vnc_ss.add(files(
>    'vnc-ws.c',
>    'vnc-jobs.c',
>  ))
> -vnc_ss.add(zlib, png, jpeg)
> +vnc_ss.add(zlib, png, jpeg, gnutls)
>  vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
>  softmmu_ss.add_all(when: vnc, if_true: vnc_ss)
>  softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c'))

Question to Paolo -- it seems pretty fragile to have to explicitly
list "these source files need these extra CFLAGS" in half a dozen
meson.build files, because it's pretty non-obvious that adding
eg '#include "block/nbd.h"' to a .c file means that you also
need to update the meson.build file to say "and now it needs these
extra CFLAGS". Isn't there some way we can just have the CFLAGS
added more globally so that if we use gnutls.h directly or
indirectly from more .c files in future it Just Works ?

If the build failed for the common Linux case then it would be
at least more obvious that you needed to update the meson.build
files. I think it's better to avoid "you need to do this special
thing that you'll only notice you're missing if you happen to test
on a somewhat obscure host configuration" where we can.

(We don't want to link helper binaries etc against gnutls if
they don't need it, but that's LDFLAGS, not CFLAGS.)

thanks
-- PMM



reply via email to

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