From patchwork Tue Aug 1 13:41:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 129792 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F41342FB2; Tue, 1 Aug 2023 15:41:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC4CE40F16; Tue, 1 Aug 2023 15:41:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id C031040A89 for ; Tue, 1 Aug 2023 15:41:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690897303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/0yvAhbwcYsHF7J1eFBwJtsuTnp69b1vPZgZQQj2yNo=; b=GBj5vIB5ab4vinUF9YhMwYb45OcjgQfHdL4nA4SNlAESxIOzZ8CJh1X/07k5xW434N5bt3 4mR9pd7n8DN0OW12tZY3rHhpVtAnfstNDXY8JMEhPBf31rjVyf60aFkx+E13jwfQ4JA3Tz C71wGIrjMkRVDTWNI/hQzjgbDCfIfb4= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-zsogD9q0OZ-y_zyRRxVQtA-1; Tue, 01 Aug 2023 09:41:37 -0400 X-MC-Unique: zsogD9q0OZ-y_zyRRxVQtA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 198942A59566; Tue, 1 Aug 2023 13:41:37 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3418F40C2063; Tue, 1 Aug 2023 13:41:36 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: bruce.richardson@intel.com, =?utf-8?q?Morten_Br=C3=B8rup?= Subject: [PATCH v2] build: check drivers class dependencies early Date: Tue, 1 Aug 2023 15:41:33 +0200 Message-ID: <20230801134133.2860104-1-david.marchand@redhat.com> In-Reply-To: <20230801085253.2447095-1-david.marchand@redhat.com> References: <20230801085253.2447095-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Drivers implementing a class of devices (for example, drivers/event) depend on the associated abstraction library (lib/eventdev). This dependency is expressed in the top level meson.build for this class (drivers/event/meson.build). As we are making more libraries optional, custom constructs referencing the class dependencies in some drivers meson.build (event/dlb2) may break. It would be possible to add more checks in those drivers meson.build but it is more straightforward to not even consider a driver meson.build when the class dependencies are not met. Signed-off-by: David Marchand Acked-by: Morten Brørup Acked-by: Bruce Richardson Acked-by: Tyler Retzlaff Acked-by: Bruce Richardson Acked-by: Tyler Retzlaff --- Changes since v1: - added break on the first missing dependency, - added logs for disabled drivers, --- drivers/meson.build | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/meson.build b/drivers/meson.build index 74ae8cb96b..c909070c30 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -70,6 +70,25 @@ foreach subpath:subdirs else class = subpath subdir(class) + skip_class = false + foreach d:std_deps + if not is_variable('shared_rte_' + d) + skip_class = true + reason = 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason += ' (deprecated lib)' + endif + message('Disabling @1@/* drivers: missing internal dependency "@0@"' + .format(d, class)) + break + endif + endforeach + if skip_class + drv_path = join_paths(class, '*') + dpdk_drvs_disabled += drv_path + set_variable(drv_path.underscorify() + '_disable_reason', reason) + continue + endif endif # save class name on first occurrence