From nobody Thu May 9 15:52:57 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1706173148601658.7287782967918; Thu, 25 Jan 2024 00:59:08 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5E7EB19B1; Thu, 25 Jan 2024 03:59:07 -0500 (EST) Received: from lists.libvirt.org.85.43.8.in-addr.arpa (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 6D69019AB; Thu, 25 Jan 2024 03:57:34 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 719DE19A5; Thu, 25 Jan 2024 03:57:30 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 9218819A1 for ; Thu, 25 Jan 2024 03:57:26 -0500 (EST) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-367-LJtdmCHrPmWKboOP-AwO1w-1; Thu, 25 Jan 2024 03:57:24 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 47E6C2932480; Thu, 25 Jan 2024 08:57:24 +0000 (UTC) Received: from orkuz (unknown [10.43.2.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0979840C9444; Thu, 25 Jan 2024 08:57:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: LJtdmCHrPmWKboOP-AwO1w-1 From: Jiri Denemark To: devel@lists.libvirt.org Cc: Jim Fehlig Subject: [libvirt PATCH] build: Make daemons depend on generated *_protocol.[ch] Date: Thu, 25 Jan 2024 09:57:01 +0100 Message-ID: <97cac10de2ce641cf246d353e1f037c1472ceb13.1706172965.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: SSPP6OWHI5HNKEGT2QSDXMDRUKOFMRRH X-Message-ID-Hash: SSPP6OWHI5HNKEGT2QSDXMDRUKOFMRRH X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1706173151048100001 This should fix build failures when a daemon code is compiled before the included *_protocol.h headers are ready, such as: FAILED: src/virtqemud.p/remote_remote_daemon_config.c.o ../src/remote/remote_daemon_config.c: In function =E2=80=98daemonConfig= New=E2=80=99: ../src/remote/remote_daemon_config.c:111:30: error: =E2=80=98REMOTE_AUTH_POLKIT=E2=80=99 undeclared (first use in this = function) 111 | data->auth_unix_rw =3D REMOTE_AUTH_POLKIT; | ^~~~~~~~~~~~~~~~~~ ../src/remote/remote_daemon_config.c:111:30: note: each undeclared identifier is reported only once for each function it appears in ../src/remote/remote_daemon_config.c:115:30: error: =E2=80=98REMOTE_AUTH_NONE=E2=80=99 undeclared (first use in this fu= nction) 115 | data->auth_unix_rw =3D REMOTE_AUTH_NONE; | ^~~~~~~~~~~~~~~~ ../src/remote/remote_daemon_config.c: In function =E2=80=98daemonConfigLoadOptions=E2=80=99: ../src/remote/remote_daemon_config.c:252:31: error: =E2=80=98REMOTE_AUTH_POLKIT=E2=80=99 undeclared (first use in this = function) 252 | if (data->auth_unix_rw =3D=3D REMOTE_AUTH_POLKIT) { | ^~~~~~~~~~~~~~~~~~ or FAILED: src/virtqemud.p/remote_remote_daemon_dispatch.c.o In file included from ../src/remote/remote_daemon.h:28, from ../src/remote/remote_daemon_dispatch.c:26: src/remote/lxc_protocol.h:13:5: error: unknown type name =E2=80=98remote_nonnull_domain=E2=80=99 13 | remote_nonnull_domain dom; | ^~~~~~~~~~~~~~~~~~~~~ In file included from ../src/remote/remote_daemon.h:29, from ../src/remote/remote_daemon_dispatch.c:26: src/remote/qemu_protocol.h:13:5: error: unknown type name =E2=80=98remote_nonnull_domain=E2=80=99 13 | remote_nonnull_domain dom; | ^~~~~~~~~~~~~~~~~~~~~ src/remote/qemu_protocol.h:14:5: error: unknown type name =E2=80=98remote_nonnull_string=E2=80=99 14 | remote_nonnull_string cmd; | ^~~~~~~~~~~~~~~~~~~~~ ... Signed-off-by: Jiri Denemark Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Jim Fehlig --- Notes: I couldn't check this patch actually fixes the error because the build failure is non-deterministic and I cannot reproduce the failure now. po/meson.build | 1 + src/meson.build | 6 +++++- src/remote/meson.build | 15 +++++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/po/meson.build b/po/meson.build index a20877ad34..592b254447 100644 --- a/po/meson.build +++ b/po/meson.build @@ -20,6 +20,7 @@ potfiles_dep =3D [ access_gen_sources, admin_client_generated, admin_driver_generated, + remote_protocol_generated, remote_driver_generated, remote_daemon_generated, ] diff --git a/src/meson.build b/src/meson.build index 6538c43628..f52d2d5994 100644 --- a/src/meson.build +++ b/src/meson.build @@ -616,7 +616,11 @@ foreach daemon : virt_daemons bin =3D executable( daemon['name'], [ - daemon.get('sources', [ remote_daemon_sources, remote_daemon_generat= ed ]), + daemon.get('sources', [ + remote_protocol_generated, + remote_daemon_sources, + remote_daemon_generated + ]), dtrace_gen_objects, ], c_args: [ diff --git a/src/remote/meson.build b/src/remote/meson.build index 681c709823..831acaaa01 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -7,8 +7,6 @@ remote_driver_generated =3D [] =20 foreach name : [ 'remote', 'qemu', 'lxc' ] client_bodies_h =3D '@0@_client_bodies.h'.format(name) - protocol_c =3D '@0@_protocol.c'.format(name) - protocol_h =3D '@0@_protocol.h'.format(name) protocol_x =3D '@0@_protocol.x'.format(name) =20 remote_driver_generated +=3D custom_target( @@ -20,8 +18,16 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] ], capture: true, ) +endforeach =20 - remote_driver_generated +=3D custom_target( +remote_protocol_generated =3D [] + +foreach name : [ 'remote', 'qemu', 'lxc' ] + protocol_c =3D '@0@_protocol.c'.format(name) + protocol_h =3D '@0@_protocol.h'.format(name) + protocol_x =3D '@0@_protocol.x'.format(name) + + remote_protocol_generated +=3D custom_target( protocol_h, input: protocol_x, output: protocol_h, @@ -32,7 +38,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] ], ) =20 - remote_driver_generated +=3D custom_target( + remote_protocol_generated +=3D custom_target( protocol_c, input: protocol_x, output: protocol_c, @@ -143,6 +149,7 @@ if conf.has('WITH_REMOTE') remote_driver_lib =3D static_library( 'virt_remote_driver', [ + remote_protocol_generated, remote_driver_sources, remote_driver_generated, ], --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org