[PATCH] meson: tools: depend on keycode generated sources

Roman Bogorodskiy bogorodskiy at gmail.com
Wed Mar 3 04:12:05 UTC 2021


Tools depend on keycode generated sources, so declare that as an
explicit dependency, otherwise it might fail with:

../tools/virsh-completer-domain.c:35:10: fatal error: 'virkeynametable_linux.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
---
I noticed that build failure on FreeBSD 11.x. For some reason, it
doesn't show up on newer versions. This is strange, but as the fix appears
to be straight-forward, I didn't spend much time figuring out the
reason.

In case you're interested, a full failing build log is here:

 https://people.freebsd.org/~novel/misc/libvirt-7.1.0.log

It doesn't seem to even try to generate these files. When I inspected
filesystem state, these files were missing.


 src/util/meson.build | 2 ++
 tools/meson.build    | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/util/meson.build b/src/util/meson.build
index 0080825bd0..cd3fe18524 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -168,6 +168,8 @@ foreach name : keyname_list
   )
 endforeach
 
+keycode_dep = declare_dependency(sources: keycode_gen_sources)
+
 io_helper_sources = [
   'iohelper.c',
 ]
diff --git a/tools/meson.build b/tools/meson.build
index b8c6802f0a..42dc609439 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -186,6 +186,7 @@ executable(
     tools_dep,
     readline_dep,
     thread_dep,
+    keycode_dep,
   ],
   link_args: [
     coverage_flags,
-- 
2.30.0




More information about the libvir-list mailing list