Hi Michael

On Sat, Feb 3, 2024 at 5:41 PM Michael Tokarev <[email protected]> wrote:
>
> Doing a build of just a single target with --enable modules results in build
> error:
>
>
>   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.
>
>
> When building without modules, or when not specifying a single target,
> the build succeeded.  So I'm concluding not all deps for ui/dbus-display1.h
> are specified, - dbus_ss should depend on this file I guess..

It looks like this can help, but I am not sure this is correct, as we
don't want dbus_display1 sources to be included in the targets.

-  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)

I have also opened a bug for meson,
https://github.com/mesonbuild/meson/issues/12814 ("Dependencies should
be built before any files of the target (?)")


Reply via email to