diff mbox series

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

Message ID 20240206140414.1134857-1-marcandre.lureau@redhat.com (mailing list archive)
State New, archived
Headers show
Series build-sys: add the D-Bus generated header to the dependency | expand

Commit Message

Marc-André Lureau Feb. 6, 2024, 2:04 p.m. UTC
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(-)

Comments

Marc-André Lureau Feb. 14, 2024, 8:07 a.m. UTC | #1
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
>
>
diff mbox series

Patch

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',