From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 74496424F0; Mon, 4 Sep 2023 15:38:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 104B4402C1; Mon, 4 Sep 2023 15:38:33 +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 AEC05402BC for ; Mon, 4 Sep 2023 15:38:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693834711; 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=RpgBCxRjYHUm7EJZaLcv4IEkWZzgPALLPuAes6ABo6s=; b=Q10ZpYqg4W47tEq4HOkmt2FZBWwt+QgcLmEB4q/9HwpT7s93gh9XqjC890wDfryyyQH04Q szb4glpEushpzX1M2FqDlBzjwDhcD2qFtYvD5CNLJfYKfNuxMUq4RxzZetYJE7pygw7uDW /gFp60sNOmoc9gmQo00uI4orSvuTrCo= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-550-YuZ7YQuVNZKXmzml0A4dsw-1; Mon, 04 Sep 2023 09:38:29 -0400 X-MC-Unique: YuZ7YQuVNZKXmzml0A4dsw-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2bceb2b3024so14173871fa.0 for ; Mon, 04 Sep 2023 06:38:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693834708; x=1694439508; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RpgBCxRjYHUm7EJZaLcv4IEkWZzgPALLPuAes6ABo6s=; b=FyR3uWZGVZVKjzubD31UT3hOfUP53HqeSpPR/ha81CkCK+JwuUxer/Xz8lmr3aOV2v KQjcElMnoy38Ai8vSgiZqin1EUW3qeaN//x3euleUSEd+52QNhJ5RhNzs+cfHkznczWX KgggYu+FKM5yWlgGt2zwNryMBallJi3p/KcbKr6V8HAX/QFn75vCk1JXKfvJbmLnBBsD LXpQf5IxrXj806paVWmM2zcs0+mIQmvkQ7eXwyC4GgWmOZISiyk/vUCAGRWhLgO0Q3L5 iLdwKtbHga0xjgjrQd2AXj4ulMmi4CtIquSD8icnlW8NR57cCL2WkvFwDHRuiOYkAT2N RZbw== X-Gm-Message-State: AOJu0YzZ7EP/vnHBJxS++UJ0G6vJ9rlwv73F7VGaNBvBkQ1bUB07seYC WJ1+GazXodbT/JZpsyArr3/YFj7NmzK9UpX4Lxga9p4+R8XmX59fnwu4VaeQQbkfPOsVKJkR7XE /LYHSVw8l9G+O1b0aw/0= X-Received: by 2002:a2e:b793:0:b0:2bb:bdf0:caf2 with SMTP id n19-20020a2eb793000000b002bbbdf0caf2mr6505454ljo.25.1693834708271; Mon, 04 Sep 2023 06:38:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSJP5StFnrQT2GiKBsZ0idv1rulxVYAlHhzj9Nz1ldyOfKOTlqvoQsMLQOdns7SmyDYpfJWWinuz1TyTL0I0w= X-Received: by 2002:a2e:b793:0:b0:2bb:bdf0:caf2 with SMTP id n19-20020a2eb793000000b002bbbdf0caf2mr6505442ljo.25.1693834707938; Mon, 04 Sep 2023 06:38:27 -0700 (PDT) MIME-Version: 1.0 References: <20230901142332.588856-1-bruce.richardson@intel.com> In-Reply-To: From: David Marchand Date: Mon, 4 Sep 2023 15:38:16 +0200 Message-ID: Subject: Re: [PATCH 1/2] build: fail if explicitly requested lib is unbuildable To: Bruce Richardson Cc: dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Fri, Sep 1, 2023 at 4:44=E2=80=AFPM Bruce Richardson wrote: > > On Fri, Sep 01, 2023 at 04:30:56PM +0200, David Marchand wrote: > > On Fri, Sep 1, 2023 at 4:29=E2=80=AFPM David Marchand wrote: > > > > > > On Fri, Sep 1, 2023 at 4:23=E2=80=AFPM Bruce Richardson > > > wrote: > > > > > > > > When the user passes a list of desired libraries to build via the > > > > "enable_libs" option, the expectation is that those libraries shoul= d be > > > > part of the build. However, if those libs have either external or > > > > internal dependencies, they still may be silently disabled, for exa= mple: > > > > running "meson setup -Denable_libs=3Dsecurity build" will successfu= lly > > > > run, but the security lib will not be configured as "cryptodev" is > > > > missing. > > > > > > > > We can fix this by setting a flag to indicate when the libraries ar= e > > > > specified via an enable_libs flag. If so, then we error out when a > > > > library is unbuildable, giving a suitable error message. For the ab= ove > > > > example case, the "meson setup" run fails with: > > > > > > > > Message: Disabling security [lib/security]: missing internal depend= ency "cryptodev" > > > > > > > > lib/meson.build:218:16: ERROR: Problem encountered: Cannot build ex= plicitly requested lib "security". > > > > Please add missing dependency "cryptodev" to "enable_libs" = option > > > > > > > > Signed-off-by: Bruce Richardson > > > > > > I remember setting a enable_drivers=3Dnet/af_xdp on a system lacking > > > libbpf-devel and not getting warned about its absence. > > > So I suspect enable_drivers is affected by the same issue. > > > > Arf sorry, did not see it was a two patch series :-). > > > No problem. > > At least your response confirms to me that this is indeed a common issue, > that could do with a solution. As I explain in patch 2, fixing for driver= s > is a little trickier than for libs, as for drivers we really need to take > account of wildcards to avoid breaking people's existing builds. [Or, at > minimum, my own builds! :-)]. > > BTW: while we could look to handle wildcards for libs, I think their use = is > probably much more limited there, and I decided to go with the simplest > possible solution instead. We have categories (classes) of drivers, and for them, I can imagine people using wildcards. But for libraries, I don't see how wildcards could be used, so I think we can ignore them for now (until proven wrong ;-). Thanks Bruce, this series is also enhancing the situation for a user. Like when wanting to enable explicity a driver or a library: the explicit error message on the missing dependency is easier to catch than scrolling back/parsing meson output. I did not review in detail, but it lgtm for my few tests. For the series, Acked-by: David Marchand --=20 David Marchand