We sometimes meet the following parallel compililation issue, since remote_daemon depends on remote_protocol.h qemu_protocol.h and lxc_protocol.h, which are usually generated due to remote_driver . | FAILED: src/virtnetworkd.p/remote_remote_daemon_dispatch.c.o | x86_64-wrs-linux-gcc ... | In file included from ../libvirt-8.1.0/src/remote/remote_daemon_dispatch.c:26: | ../libvirt-8.1.0/src/remote/remote_daemon.h:30:10: fatal error: qemu_protocol.h: No such file or directory | 30 | #include "qemu_protocol.h" | | ^~~~~~~~~~~~~~~~~ | compilation terminated. This patch adds the headers as dependencies of remote_daemon to make sure they are always in place in advance. Signed-off-by: He Zhe <zhe.he@xxxxxxxxxxxxx> --- src/remote/meson.build | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/remote/meson.build b/src/remote/meson.build index eb4f7a0068..04525fb4a6 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -5,6 +5,15 @@ remote_driver_sources = [ remote_driver_generated = [] +remote_daemon_sources = files( + 'remote_daemon.c', + 'remote_daemon_config.c', + 'remote_daemon_dispatch.c', + 'remote_daemon_stream.c', +) + +remote_daemon_generated = [] + foreach name : [ 'remote', 'qemu', 'lxc' ] client_bodies_h = '@0@_client_bodies.h'.format(name) protocol_c = '@0@_protocol.c'.format(name) @@ -21,7 +30,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] capture: true, ) - remote_driver_generated += custom_target( + protocol_h_generated = custom_target( protocol_h, input: protocol_x, output: protocol_h, @@ -30,6 +39,9 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] ], ) + remote_driver_generated += protocol_h_generated + remote_daemon_generated += protocol_h_generated + remote_driver_generated += custom_target( protocol_c, input: protocol_x, @@ -42,15 +54,6 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] rpc_probe_files += files(protocol_x) endforeach -remote_daemon_sources = files( - 'remote_daemon.c', - 'remote_daemon_config.c', - 'remote_daemon_dispatch.c', - 'remote_daemon_stream.c', -) - -remote_daemon_generated = [] - virt_ssh_helper_sources = files( 'remote_sockets.c', 'remote_ssh_helper.c', -- 2.17.1