From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Bernhard Beschow <shentey@gmail.com>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH] meson: Add most 3rd-party includes as system includes
Date: Fri, 11 Jul 2025 12:26:39 +0200 [thread overview]
Message-ID: <0434d08c-b3c6-488f-8ceb-3c36e23770c1@linaro.org> (raw)
In-Reply-To: <20250617203435.41490-1-shentey@gmail.com>
On 17/6/25 22:34, Bernhard Beschow wrote:
> When compiling QEMU against fuse3-3.17.1 with --enable-werror the build fails
> with:
>
> In file included from ../src/block/export/fuse.c:33:
> /usr/include/fuse3/fuse.h:959:5: error: redundant redeclaration of ‘fuse_main_real_versioned’ [-Werror=redundant-decls]
> 959 | int fuse_main_real_versioned(int argc, char *argv[],
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/fuse3/fuse.h:885:5: note: previous declaration of ‘fuse_main_real_versioned’ with type ‘int(int, char **, const struct fuse_operations *, size_t, struct libfuse_version *, void *)’ {aka ‘int(int, char **, const struct fuse_operations *, long unsigned int, struct libfuse_version *, void *)’}
> 885 | int fuse_main_real_versioned(int argc, char *argv[],
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> That is, a fuse header triggers a warning within itself. Since QEMU adds the
> fuse3 include path via `-I`, the compiler thinks that the header is part of the
> QEMU project, and thus raises a warning. The compiler can be told to ignore
> warnings within 3rd party headers by adding these paths via `-isystem`. Fix the
> above build failure by marking fuse as system dependency. While at it mark
> every 3rd-party dependency as system dependency to prevent similar issues in the
> future but skip glib since that results in glib include paths to be omitted from
> bindgen in case of a Rust build.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> meson.build | 160 ++++++++++++++++++++++++++--------------------------
> 1 file changed, 80 insertions(+), 80 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 34729c2a3d..694cf95f6f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -826,7 +826,7 @@ endif
> #####################################
>
> libm = cc.find_library('m', required: false)
> -threads = dependency('threads')
> +threads = dependency('threads', include_type: 'system')
> util = cc.find_library('util', required: false)
> winmm = []
> socket = []
> @@ -859,11 +859,11 @@ if host_os == 'windows'
> include_directories: include_directories('.'))
> host_dsosuf = '.dll'
> elif host_os == 'darwin'
> - coref = dependency('appleframeworks', modules: 'CoreFoundation')
> - iokit = dependency('appleframeworks', modules: 'IOKit', required: false)
> + coref = dependency('appleframeworks', modules: 'CoreFoundation', include_type: 'system')
> + iokit = dependency('appleframeworks', modules: 'IOKit', required: false, include_type: 'system')
> host_dsosuf = '.dylib'
> pvg = dependency('appleframeworks', modules: ['ParavirtualizedGraphics', 'Metal'],
> - required: get_option('pvg'))
> + required: get_option('pvg'), include_type: 'system')
> elif host_os == 'sunos'
> socket = [cc.find_library('socket'),
> cc.find_library('nsl'),
> @@ -899,7 +899,7 @@ endif
> hvf = not_found
> if get_option('hvf').allowed()
> hvf = dependency('appleframeworks', modules: 'Hypervisor',
> - required: get_option('hvf'))
> + required: get_option('hvf'), include_type: 'system')
> if hvf.found()
> accelerators += 'CONFIG_HVF'
> endif
To the best of my meson knowledge:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2025-07-11 10:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 20:34 [PATCH] meson: Add most 3rd-party includes as system includes Bernhard Beschow
2025-07-03 6:25 ` Bernhard Beschow
2025-07-10 17:54 ` Bernhard Beschow
2025-07-11 10:26 ` Philippe Mathieu-Daudé [this message]
2025-07-11 10:45 ` Peter Maydell
2025-07-11 11:00 ` Daniel P. Berrangé
2025-07-15 13:45 ` Daniel P. Berrangé
2025-07-16 8:13 ` Bernhard Beschow
2025-07-16 9:17 ` Daniel P. Berrangé
2025-07-14 10:35 ` Bernhard Beschow
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=0434d08c-b3c6-488f-8ceb-3c36e23770c1@linaro.org \
--to=philmd@linaro.org \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shentey@gmail.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).