[PATCH] build-sys: add the D-Bus generated header to the dependency

marcandre.lureau@redhat.com posted 1 patch 9 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240206140414.1134857-1-marcandre.lureau@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>
ui/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH] build-sys: add the D-Bus generated header to the dependency
Posted by marcandre.lureau@redhat.com 9 months, 3 weeks ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Fixes:
   rm -rf b; cd b
  ../configure --enable-modules --target-list=x86_64-softmmu
  ninja qemu-system-x86_64

   In file included from ../ui/dbus-chardev.c:34:
  ../ui/dbus.h:34:10: fatal error: ui/dbus-display1.h: No such file or directory
     34 | #include "ui/dbus-display1.h"
        |          ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.

See also:
https://github.com/mesonbuild/meson/issues/12814

Reported-by: Tokarev, Michael <mjt@tls.msk.ru>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ui/meson.build b/ui/meson.build
index 376e0d771b..fa47360830 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -91,7 +91,9 @@ if dbus_display
                                           '--c-namespace', 'QemuDBus',
                                           '--generate-c-code', '@BASENAME@'])
   dbus_display1_lib = static_library('dbus-display1', dbus_display1, dependencies: gio)
-  dbus_display1_dep = declare_dependency(link_with: dbus_display1_lib, include_directories: include_directories('.'))
+  dbus_display1_dep = declare_dependency(link_with: dbus_display1_lib,
+                                         include_directories: include_directories('.'),
+                                         sources: dbus_display1[0])
   dbus_ss.add(when: [gio, dbus_display1_dep],
               if_true: [files(
                 'dbus-chardev.c',
-- 
2.43.0


Re: [PATCH] build-sys: add the D-Bus generated header to the dependency
Posted by Marc-André Lureau 9 months, 2 weeks ago
Hi

On Tue, Feb 6, 2024 at 6:06 PM <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Fixes:
>    rm -rf b; cd b
>   ../configure --enable-modules --target-list=x86_64-softmmu
>   ninja qemu-system-x86_64
>
>    In file included from ../ui/dbus-chardev.c:34:
>   ../ui/dbus.h:34:10: fatal error: ui/dbus-display1.h: No such file or directory
>      34 | #include "ui/dbus-display1.h"
>         |          ^~~~~~~~~~~~~~~~~~~~
>   compilation terminated.
>
> See also:
> https://github.com/mesonbuild/meson/issues/12814
>
> Reported-by: Tokarev, Michael <mjt@tls.msk.ru>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

turns out Akihiko sent the same fix earlier:
https://lore.kernel.org/all/20231215-dbus-v2-0-1e2e6aa02115@daynix.com/

> ---
>  ui/meson.build | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ui/meson.build b/ui/meson.build
> index 376e0d771b..fa47360830 100644
> --- a/ui/meson.build
> +++ b/ui/meson.build
> @@ -91,7 +91,9 @@ if dbus_display
>                                            '--c-namespace', 'QemuDBus',
>                                            '--generate-c-code', '@BASENAME@'])
>    dbus_display1_lib = static_library('dbus-display1', dbus_display1, dependencies: gio)
> -  dbus_display1_dep = declare_dependency(link_with: dbus_display1_lib, include_directories: include_directories('.'))
> +  dbus_display1_dep = declare_dependency(link_with: dbus_display1_lib,
> +                                         include_directories: include_directories('.'),
> +                                         sources: dbus_display1[0])
>    dbus_ss.add(when: [gio, dbus_display1_dep],
>                if_true: [files(
>                  'dbus-chardev.c',
> --
> 2.43.0
>
>


-- 
Marc-André Lureau