DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC] build: allow build DPDK as a meson submodule
Date: Thu, 4 Nov 2021 08:59:19 +0000	[thread overview]
Message-ID: <YYOg56i9p2bckcp6@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20211103221205.63175-1-stephen@networkplumber.org>

On Wed, Nov 03, 2021 at 03:12:05PM -0700, Stephen Hemminger wrote:
> Some other projects using meson may not be able to use DPDK
> using the standard distribution pkg-config mechanism.
> Meson supports a way to handle this via the subproject
>   https://mesonbuild.com/Subprojects.html
> 
> This patch adds the necessary depedency to follow the
> "Naming convention for depedency variables" from the documentation.
> It has no impact if subproject is not being used.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Thanks for this Stephen. Couple of comments inline below.

/Bruce

> ---
>  meson.build | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index 12cb6e0e83f3..6ce5eda2779f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -97,6 +97,16 @@ configure_file(output: build_cfg,
>  # build pkg-config files for dpdk
>  subdir('buildtools/pkg-config')
>  
> +# If DPDK is being built as subproject then define
> +# varialble with the dependency convention
> +if meson.is_subproject()

I wonder if we should just omit this check. Defining the extra variable in
case of non-subproject should just be harmless.

> +    libdpdk_dep = declare_dependency(
> +        version: meson.project_version(),
> +        compile_args : pkg_extra_cflags,
> +        dependencies: shared_deps
> +    )

"shared_deps" is almost certainly not the correct variable to use here
without additional changes to guarantee its value. That variable is used in
lib and driver meson.build files to hold the libraries to link for each
shared object, so at this point in the build, it will likely contain only
the dependencies of the final driver built, rather than all the DPDK
libraries. I think it would be safer to define "dpdk_shared_deps" global
variable at the top of this meson.build file and add to that from
lib/meson.build as each library dependency is defined.

> +endif
> +


  reply	other threads:[~2021-11-04  8:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 22:12 Stephen Hemminger
2021-11-04  8:59 ` Bruce Richardson [this message]
2021-11-05  0:01 ` [dpdk-dev] [PATCH] " Stephen Hemminger
2021-11-05 14:58   ` Bruce Richardson
2021-11-05 16:17     ` Stephen Hemminger
2021-11-05 17:22 ` [dpdk-dev] [PATCH v2] build: add definitions for use as meson subproject Stephen Hemminger
2021-11-05 18:11   ` Bruce Richardson
2022-02-02 20:59     ` Thomas Monjalon
2022-05-06 14:06   ` Bruce Richardson
2022-05-06 14:43 ` [PATCH v3] " Bruce Richardson
2022-05-21  0:54   ` Ben Magistro
2022-06-07 16:05     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YYOg56i9p2bckcp6@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).