* Re: [dpdk-stable] [PATCH] install: fix flattening of examples directory
2020-11-10 17:08 [dpdk-stable] [PATCH] install: fix flattening of examples directory Bruce Richardson
@ 2020-11-10 17:09 ` Bruce Richardson
2020-11-10 17:14 ` David Marchand
2020-11-10 17:33 ` David Marchand
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2020-11-10 17:09 UTC (permalink / raw)
To: dev; +Cc: david.marchand, stable
Using correct address for David. :-(
On Tue, Nov 10, 2020 at 05:08:09PM +0000, Bruce Richardson wrote:
> By installing the examples one-by-one in a loop in the examples
> meson.build file we effectively flatted out the structure of the examples
> folder and omitted some common and shared subfolders that were never
> directly built. Instead, we can remove the loop and just have the whole
> "examples" folder installed as-is in a single statement, preserving its
> directory structure, and thereby fixing the build of a number of the
> examples.
>
> Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> examples/meson.build | 7 -------
> meson.build | 3 +++
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/examples/meson.build b/examples/meson.build
> index f17995532..46ec80919 100644
> --- a/examples/meson.build
> +++ b/examples/meson.build
> @@ -47,13 +47,6 @@ all_examples = [
> 'vm_power_manager/guest_cli',
> 'vmdq', 'vmdq_dcb',
> ]
> -# install all example code on install - irrespective of whether the example in
> -# question is to be built as part of this build or not.
> -foreach ex:all_examples
> - install_subdir(ex,
> - install_dir: get_option('datadir') + '/dpdk/examples',
> - exclude_files: 'meson.build')
> -endforeach
>
> if get_option('examples') == ''
> subdir_done()
> diff --git a/meson.build b/meson.build
> index 61d9a4f5f..45d974cd2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -59,6 +59,9 @@ subdir('doc')
> # build any examples explicitly requested - useful for developers - and
> # install any example code into the appropriate install path
> subdir('examples')
> +install_subdir('examples',
> + install_dir: get_option('datadir') + '/dpdk',
> + exclude_files: 'meson.build')
>
> # build kernel modules if enabled
> if get_option('enable_kmods')
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-stable] [PATCH] install: fix flattening of examples directory
2020-11-10 17:08 [dpdk-stable] [PATCH] install: fix flattening of examples directory Bruce Richardson
2020-11-10 17:09 ` Bruce Richardson
@ 2020-11-10 17:33 ` David Marchand
2020-11-10 17:42 ` Bruce Richardson
2020-11-11 15:56 ` [dpdk-stable] [PATCH v2 1/2] examples: fix flattening directory layout on install Bruce Richardson
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: David Marchand @ 2020-11-10 17:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, dpdk stable, Thomas Monjalon
On Tue, Nov 10, 2020 at 6:08 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> By installing the examples one-by-one in a loop in the examples
> meson.build file we effectively flatted out the structure of the examples
flattened*
> folder and omitted some common and shared subfolders that were never
> directly built. Instead, we can remove the loop and just have the whole
> "examples" folder installed as-is in a single statement, preserving its
> directory structure, and thereby fixing the build of a number of the
> examples.
It seems wrong to provide all examples without looking at all_examples.
We would provide examples that can't link against the available dpdk libraries.
--
David Marchand
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-stable] [PATCH] install: fix flattening of examples directory
2020-11-10 17:33 ` David Marchand
@ 2020-11-10 17:42 ` Bruce Richardson
0 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2020-11-10 17:42 UTC (permalink / raw)
To: David Marchand; +Cc: dev, dpdk stable, Thomas Monjalon
On Tue, Nov 10, 2020 at 06:33:03PM +0100, David Marchand wrote:
> On Tue, Nov 10, 2020 at 6:08 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > By installing the examples one-by-one in a loop in the examples
> > meson.build file we effectively flatted out the structure of the examples
>
> flattened*
>
> > folder and omitted some common and shared subfolders that were never
> > directly built. Instead, we can remove the loop and just have the whole
> > "examples" folder installed as-is in a single statement, preserving its
> > directory structure, and thereby fixing the build of a number of the
> > examples.
>
> It seems wrong to provide all examples without looking at all_examples.
> We would provide examples that can't link against the available dpdk libraries.
>
Yes, let me think on this a bit about what is best to do, or how to manage
it. I'll try and get a v2 tomorrow.
For older releases with "make" buildsystem, did we provide an installation
method for examples, because I can't think of how we handled this fact
there?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] [PATCH v2 1/2] examples: fix flattening directory layout on install
2020-11-10 17:08 [dpdk-stable] [PATCH] install: fix flattening of examples directory Bruce Richardson
2020-11-10 17:09 ` Bruce Richardson
2020-11-10 17:33 ` David Marchand
@ 2020-11-11 15:56 ` Bruce Richardson
2020-11-11 17:48 ` [dpdk-stable] [PATCH v3 1/4] " Bruce Richardson
[not found] ` <20201112094142.1781861-1-bruce.richardson@intel.com>
4 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2020-11-11 15:56 UTC (permalink / raw)
To: dev; +Cc: david.marchand, Bruce Richardson, stable
By installing the examples one-by-one in a loop in the examples
meson.build file we effectively flattened out the structure of the examples
folder and omitted some common and shared subfolders that were never
directly built. Instead, we can remove the loop and just have the whole
"examples" folder installed as-is in a single statement, preserving its
directory structure, and thereby fixing the build of a number of the
examples.
Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/meson.build | 7 -------
meson.build | 3 +++
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/examples/meson.build b/examples/meson.build
index f179955325..46ec80919e 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -47,13 +47,6 @@ all_examples = [
'vm_power_manager/guest_cli',
'vmdq', 'vmdq_dcb',
]
-# install all example code on install - irrespective of whether the example in
-# question is to be built as part of this build or not.
-foreach ex:all_examples
- install_subdir(ex,
- install_dir: get_option('datadir') + '/dpdk/examples',
- exclude_files: 'meson.build')
-endforeach
if get_option('examples') == ''
subdir_done()
diff --git a/meson.build b/meson.build
index 61d9a4f5fa..45d974cd2c 100644
--- a/meson.build
+++ b/meson.build
@@ -59,6 +59,9 @@ subdir('doc')
# build any examples explicitly requested - useful for developers - and
# install any example code into the appropriate install path
subdir('examples')
+install_subdir('examples',
+ install_dir: get_option('datadir') + '/dpdk',
+ exclude_files: 'meson.build')
# build kernel modules if enabled
if get_option('enable_kmods')
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] [PATCH v3 1/4] examples: fix flattening directory layout on install
2020-11-10 17:08 [dpdk-stable] [PATCH] install: fix flattening of examples directory Bruce Richardson
` (2 preceding siblings ...)
2020-11-11 15:56 ` [dpdk-stable] [PATCH v2 1/2] examples: fix flattening directory layout on install Bruce Richardson
@ 2020-11-11 17:48 ` Bruce Richardson
2020-11-11 17:48 ` [dpdk-stable] [PATCH v3 2/4] examples/l2fwd-keepalive: skip build when no librt Bruce Richardson
[not found] ` <20201112094142.1781861-1-bruce.richardson@intel.com>
4 siblings, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2020-11-11 17:48 UTC (permalink / raw)
To: dev; +Cc: david.marchand, Bruce Richardson, stable
By installing the examples one-by-one in a loop in the examples
meson.build file we effectively flattened out the structure of the examples
folder and omitted some common and shared subfolders that were never
directly built. Instead, we can remove the loop and just have the whole
"examples" folder installed as-is in a single statement, preserving its
directory structure, and thereby fixing the build of a number of the
examples.
Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/meson.build | 7 -------
meson.build | 3 +++
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/examples/meson.build b/examples/meson.build
index f17995532..46ec80919 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -47,13 +47,6 @@ all_examples = [
'vm_power_manager/guest_cli',
'vmdq', 'vmdq_dcb',
]
-# install all example code on install - irrespective of whether the example in
-# question is to be built as part of this build or not.
-foreach ex:all_examples
- install_subdir(ex,
- install_dir: get_option('datadir') + '/dpdk/examples',
- exclude_files: 'meson.build')
-endforeach
if get_option('examples') == ''
subdir_done()
diff --git a/meson.build b/meson.build
index 61d9a4f5f..45d974cd2 100644
--- a/meson.build
+++ b/meson.build
@@ -59,6 +59,9 @@ subdir('doc')
# build any examples explicitly requested - useful for developers - and
# install any example code into the appropriate install path
subdir('examples')
+install_subdir('examples',
+ install_dir: get_option('datadir') + '/dpdk',
+ exclude_files: 'meson.build')
# build kernel modules if enabled
if get_option('enable_kmods')
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] [PATCH v3 2/4] examples/l2fwd-keepalive: skip build when no librt
2020-11-11 17:48 ` [dpdk-stable] [PATCH v3 1/4] " Bruce Richardson
@ 2020-11-11 17:48 ` Bruce Richardson
0 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2020-11-11 17:48 UTC (permalink / raw)
To: dev; +Cc: david.marchand, Bruce Richardson, stable
When librt is not present on a system, processing the meson.build file
for this example application causes an error. Make the library
non-mandatory and just mark the example as unbuildable if it is
not present.
Fixes: 89f0711f9ddf ("examples: build some samples with meson")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/l2fwd-keepalive/meson.build | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index d678a8ddd..a56d67967 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -7,7 +7,13 @@
# DPDK instance, use 'make'
allow_experimental_apis = true
-ext_deps += cc.find_library('rt')
+librt = cc.find_library('rt', required: false)
+if not librt.found()
+ build = false
+ subdir_done()
+endif
+
+ext_deps += librt
deps += 'timer'
sources = files(
'main.c', 'shm.c'
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <20201112094142.1781861-1-bruce.richardson@intel.com>]
* [dpdk-stable] [PATCH v4 1/4] examples: fix flattening directory layout on install
[not found] ` <20201112094142.1781861-1-bruce.richardson@intel.com>
@ 2020-11-12 9:41 ` Bruce Richardson
2020-11-12 9:41 ` [dpdk-stable] [PATCH v4 2/4] examples/l2fwd-keepalive: skip build when no librt Bruce Richardson
1 sibling, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2020-11-12 9:41 UTC (permalink / raw)
To: dev; +Cc: david.marchand, Bruce Richardson, stable
By installing the examples one-by-one in a loop in the examples
meson.build file we effectively flattened out the structure of the examples
folder and omitted some common and shared subfolders that were never
directly built. Instead, we can remove the loop and just have the whole
"examples" folder installed as-is in a single statement, preserving its
directory structure, and thereby fixing the build of a number of the
examples.
Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/meson.build | 7 -------
meson.build | 3 +++
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/examples/meson.build b/examples/meson.build
index f17995532..46ec80919 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -47,13 +47,6 @@ all_examples = [
'vm_power_manager/guest_cli',
'vmdq', 'vmdq_dcb',
]
-# install all example code on install - irrespective of whether the example in
-# question is to be built as part of this build or not.
-foreach ex:all_examples
- install_subdir(ex,
- install_dir: get_option('datadir') + '/dpdk/examples',
- exclude_files: 'meson.build')
-endforeach
if get_option('examples') == ''
subdir_done()
diff --git a/meson.build b/meson.build
index 61d9a4f5f..45d974cd2 100644
--- a/meson.build
+++ b/meson.build
@@ -59,6 +59,9 @@ subdir('doc')
# build any examples explicitly requested - useful for developers - and
# install any example code into the appropriate install path
subdir('examples')
+install_subdir('examples',
+ install_dir: get_option('datadir') + '/dpdk',
+ exclude_files: 'meson.build')
# build kernel modules if enabled
if get_option('enable_kmods')
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] [PATCH v4 2/4] examples/l2fwd-keepalive: skip build when no librt
[not found] ` <20201112094142.1781861-1-bruce.richardson@intel.com>
2020-11-12 9:41 ` [dpdk-stable] [PATCH v4 1/4] examples: fix flattening directory layout on install Bruce Richardson
@ 2020-11-12 9:41 ` Bruce Richardson
1 sibling, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2020-11-12 9:41 UTC (permalink / raw)
To: dev; +Cc: david.marchand, Bruce Richardson, stable
When librt is not present on a system, processing the meson.build file
for this example application causes an error. Make the library
non-mandatory and just mark the example as unbuildable if it is
not present.
Fixes: 89f0711f9ddf ("examples: build some samples with meson")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/l2fwd-keepalive/meson.build | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index d678a8ddd..a56d67967 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -7,7 +7,13 @@
# DPDK instance, use 'make'
allow_experimental_apis = true
-ext_deps += cc.find_library('rt')
+librt = cc.find_library('rt', required: false)
+if not librt.found()
+ build = false
+ subdir_done()
+endif
+
+ext_deps += librt
deps += 'timer'
sources = files(
'main.c', 'shm.c'
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread