DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
@ 2019-04-23 22:06 Bruce Richardson
  2019-04-23 22:06 ` Bruce Richardson
                   ` (7 more replies)
  0 siblings, 8 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

As part of the meson build, a pkg-config file for libdpdk is created, which
allows apps to be compiled and linked against DPDK by taking the cflags and
lib parameter from pkgconfig. The example app makefiles have been reworked
to take account of this support, but the build of them against the .pc file
was not regularly tested.

To rectify this, and give us greater confidence in the correctness of the
.pc file, this set adds in the sample apps to the installation set for
"ninja install" and then builds a subset of those apps against the
pkg-config file to test it. In the process a small error when compiling
the cmdline sample app using the .pc file was fixed.

Bruce Richardson (4):
  examples: install examples as part of ninja install
  examples: simplify getting list of all examples
  devtools/test-meson-builds: add testing of pkg-config file
  build: add libbsd to pkg-config file if enabled

 config/meson.build            | 10 ++++------
 devtools/test-meson-builds.sh | 17 +++++++++++++++++
 examples/meson.build          | 17 +++++++++++++----
 meson.build                   |  2 ++
 4 files changed, 36 insertions(+), 10 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
@ 2019-04-23 22:06 ` Bruce Richardson
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install Bruce Richardson
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

As part of the meson build, a pkg-config file for libdpdk is created, which
allows apps to be compiled and linked against DPDK by taking the cflags and
lib parameter from pkgconfig. The example app makefiles have been reworked
to take account of this support, but the build of them against the .pc file
was not regularly tested.

To rectify this, and give us greater confidence in the correctness of the
.pc file, this set adds in the sample apps to the installation set for
"ninja install" and then builds a subset of those apps against the
pkg-config file to test it. In the process a small error when compiling
the cmdline sample app using the .pc file was fixed.

Bruce Richardson (4):
  examples: install examples as part of ninja install
  examples: simplify getting list of all examples
  devtools/test-meson-builds: add testing of pkg-config file
  build: add libbsd to pkg-config file if enabled

 config/meson.build            | 10 ++++------
 devtools/test-meson-builds.sh | 17 +++++++++++++++++
 examples/meson.build          | 17 +++++++++++++----
 meson.build                   |  2 ++
 4 files changed, 36 insertions(+), 10 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
  2019-04-23 22:06 ` Bruce Richardson
@ 2019-04-23 22:06 ` Bruce Richardson
  2019-04-23 22:06   ` Bruce Richardson
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples Bruce Richardson
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

When we install dpdk onto a system, we want to put the examples into
the /usr/share/dpdk (or /usr/local/share/dpdk) directory for reference.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index e4babf6bf..1a6134f12 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,12 +8,20 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-allow_skips = true # don't flag an error if we can't build an app
+all_examples = run_command('sh', '-c',
+	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+	).stdout().split()
+# 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').to_lower() == 'all'
-	dirs = run_command('sh', '-c',
-		'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done')
-	examples = dirs.stdout().split()
+	examples = all_examples
+	allow_skips = true # don't flag an error if we can't build an app
 else
 	examples = get_option('examples').split(',')
 	allow_skips = false # error out if we can't build a requested app
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install Bruce Richardson
@ 2019-04-23 22:06   ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

When we install dpdk onto a system, we want to put the examples into
the /usr/share/dpdk (or /usr/local/share/dpdk) directory for reference.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index e4babf6bf..1a6134f12 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,12 +8,20 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-allow_skips = true # don't flag an error if we can't build an app
+all_examples = run_command('sh', '-c',
+	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+	).stdout().split()
+# 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').to_lower() == 'all'
-	dirs = run_command('sh', '-c',
-		'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done')
-	examples = dirs.stdout().split()
+	examples = all_examples
+	allow_skips = true # don't flag an error if we can't build an app
 else
 	examples = get_option('examples').split(',')
 	allow_skips = false # error out if we can't build a requested app
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
  2019-04-23 22:06 ` Bruce Richardson
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install Bruce Richardson
@ 2019-04-23 22:06 ` Bruce Richardson
  2019-04-23 22:06   ` Bruce Richardson
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Using find rather than shelling out to a one-liner script is easier to
read and understand, as well as allowing shorter lines in the code.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 1a6134f12..19f2686b2 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,8 +8,9 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-all_examples = run_command('sh', '-c',
-	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+all_examples = run_command('find', meson.current_source_dir(),
+	'-maxdepth', '1', '-mindepth', '1',
+	'-type', 'd', '-printf', '%f '
 	).stdout().split()
 # install all example code on install - irrespective of whether the example in
 # question is to be built as part of this build or not.
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples Bruce Richardson
@ 2019-04-23 22:06   ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Using find rather than shelling out to a one-liner script is easier to
read and understand, as well as allowing shorter lines in the code.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 1a6134f12..19f2686b2 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,8 +8,9 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-all_examples = run_command('sh', '-c',
-	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+all_examples = run_command('find', meson.current_source_dir(),
+	'-maxdepth', '1', '-mindepth', '1',
+	'-type', 'd', '-printf', '%f '
 	).stdout().split()
 # install all example code on install - irrespective of whether the example in
 # question is to be built as part of this build or not.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
                   ` (2 preceding siblings ...)
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples Bruce Richardson
@ 2019-04-23 22:06 ` Bruce Richardson
  2019-04-23 22:06   ` Bruce Richardson
  2019-04-24  9:22   ` Luca Boccassi
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The pkg-config file generated as part of the build of DPDK should allow
applications to be built with an installed DPDK. We can test this as
part of the build by doing an install of DPDK to a temporary directory
within the build folder, and by then compiling up a few sample apps
using make working off that directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 630a1a6fe..dfba2a782 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
 			$use_shared --cross-file $f
 	done
 fi
+
+##############
+# Test installation of the x86-default target, to be used for checking
+# the sample apps build using the pkg-config file for cflags and libs
+###############
+build_path=build-x86-default
+DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
+PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ; export PKG_CONFIG_PATH
+$ninja_cmd -C $build_path install
+
+# rather than hacking our environment, just edit the .pc file prefix value
+sed -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
+
+for example in helloworld l2fwd l3fwd skeleton timer; do
+	echo "## Building $example"
+	make -C $DESTDIR/usr/local/share/dpdk/examples/$example
+done
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
@ 2019-04-23 22:06   ` Bruce Richardson
  2019-04-24  9:22   ` Luca Boccassi
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The pkg-config file generated as part of the build of DPDK should allow
applications to be built with an installed DPDK. We can test this as
part of the build by doing an install of DPDK to a temporary directory
within the build folder, and by then compiling up a few sample apps
using make working off that directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 630a1a6fe..dfba2a782 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
 			$use_shared --cross-file $f
 	done
 fi
+
+##############
+# Test installation of the x86-default target, to be used for checking
+# the sample apps build using the pkg-config file for cflags and libs
+###############
+build_path=build-x86-default
+DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
+PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ; export PKG_CONFIG_PATH
+$ninja_cmd -C $build_path install
+
+# rather than hacking our environment, just edit the .pc file prefix value
+sed -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
+
+for example in helloworld l2fwd l3fwd skeleton timer; do
+	echo "## Building $example"
+	make -C $DESTDIR/usr/local/share/dpdk/examples/$example
+done
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
                   ` (3 preceding siblings ...)
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
@ 2019-04-23 22:06 ` Bruce Richardson
  2019-04-23 22:06   ` Bruce Richardson
  2019-04-23 23:04 ` [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Stephen Hemminger
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.

To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.

To verify this builds correctly, the cmdline sample app is added to the
list of examples compiled by test-meson-builds. Without this change
compilation fails if libbsd is present on the system

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build            | 10 ++++------
 devtools/test-meson-builds.sh |  2 +-
 meson.build                   |  2 ++
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index f8aded6ed..64e2315dd 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -125,12 +125,10 @@ if numa_dep.found() and cc.has_header('numaif.h')
 	dpdk_extra_ldflags += '-lnuma'
 endif
 
-# check for strlcpy
-if is_linux
-	libbsd = dependency('libbsd', required: false)
-	if libbsd.found()
-		dpdk_conf.set('RTE_USE_LIBBSD', 1)
-	endif
+# check for libbsd
+libbsd = dependency('libbsd', required: false)
+if libbsd.found()
+	dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
 # add -include rte_config to cflags
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index dfba2a782..41080353b 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -103,7 +103,7 @@ $ninja_cmd -C $build_path install
 # rather than hacking our environment, just edit the .pc file prefix value
 sed -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
 
-for example in helloworld l2fwd l3fwd skeleton timer; do
+for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
 	echo "## Building $example"
 	make -C $DESTDIR/usr/local/share/dpdk/examples/$example
 done
diff --git a/meson.build b/meson.build
index a96486597..3c173a587 100644
--- a/meson.build
+++ b/meson.build
@@ -77,6 +77,8 @@ pkg.generate(name: meson.project_name(),
 	libraries: dpdk_libraries,
 	libraries_private: dpdk_drivers + dpdk_static_libraries +
 			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
+	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
+	                  # if libbsd is not enabled, then this is blank
 	description: '''The Data Plane Development Kit (DPDK).
 Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
@ 2019-04-23 22:06   ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-23 22:06 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.

To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.

To verify this builds correctly, the cmdline sample app is added to the
list of examples compiled by test-meson-builds. Without this change
compilation fails if libbsd is present on the system

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build            | 10 ++++------
 devtools/test-meson-builds.sh |  2 +-
 meson.build                   |  2 ++
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index f8aded6ed..64e2315dd 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -125,12 +125,10 @@ if numa_dep.found() and cc.has_header('numaif.h')
 	dpdk_extra_ldflags += '-lnuma'
 endif
 
-# check for strlcpy
-if is_linux
-	libbsd = dependency('libbsd', required: false)
-	if libbsd.found()
-		dpdk_conf.set('RTE_USE_LIBBSD', 1)
-	endif
+# check for libbsd
+libbsd = dependency('libbsd', required: false)
+if libbsd.found()
+	dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
 # add -include rte_config to cflags
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index dfba2a782..41080353b 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -103,7 +103,7 @@ $ninja_cmd -C $build_path install
 # rather than hacking our environment, just edit the .pc file prefix value
 sed -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
 
-for example in helloworld l2fwd l3fwd skeleton timer; do
+for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
 	echo "## Building $example"
 	make -C $DESTDIR/usr/local/share/dpdk/examples/$example
 done
diff --git a/meson.build b/meson.build
index a96486597..3c173a587 100644
--- a/meson.build
+++ b/meson.build
@@ -77,6 +77,8 @@ pkg.generate(name: meson.project_name(),
 	libraries: dpdk_libraries,
 	libraries_private: dpdk_drivers + dpdk_static_libraries +
 			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
+	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
+	                  # if libbsd is not enabled, then this is blank
 	description: '''The Data Plane Development Kit (DPDK).
 Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
                   ` (4 preceding siblings ...)
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
@ 2019-04-23 23:04 ` Stephen Hemminger
  2019-04-23 23:04   ` Stephen Hemminger
  2019-04-24  8:54   ` Bruce Richardson
  2019-04-26 16:11 ` Luca Boccassi
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
  7 siblings, 2 replies; 88+ messages in thread
From: Stephen Hemminger @ 2019-04-23 23:04 UTC (permalink / raw)
  To: dev

On Tue, 23 Apr 2019 23:06:40 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:

> As part of the meson build, a pkg-config file for libdpdk is created, which
> allows apps to be compiled and linked against DPDK by taking the cflags and
> lib parameter from pkgconfig. The example app makefiles have been reworked
> to take account of this support, but the build of them against the .pc file
> was not regularly tested.
> 
> To rectify this, and give us greater confidence in the correctness of the
> .pc file, this set adds in the sample apps to the installation set for
> "ninja install" and then builds a subset of those apps against the
> pkg-config file to test it. In the process a small error when compiling
> the cmdline sample app using the .pc file was fixed.
> 
> Bruce Richardson (4):
>   examples: install examples as part of ninja install
>   examples: simplify getting list of all examples
>   devtools/test-meson-builds: add testing of pkg-config file
>   build: add libbsd to pkg-config file if enabled
> 
>  config/meson.build            | 10 ++++------
>  devtools/test-meson-builds.sh | 17 +++++++++++++++++
>  examples/meson.build          | 17 +++++++++++++----
>  meson.build                   |  2 ++
>  4 files changed, 36 insertions(+), 10 deletions(-)
> 

My experiments with Ubuntu 18.04 showed the default version of meson
was too old (broken) and generated bad cflags.

Getting later one for Debian stable-backports worked.

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-23 23:04 ` [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Stephen Hemminger
@ 2019-04-23 23:04   ` Stephen Hemminger
  2019-04-24  8:54   ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Stephen Hemminger @ 2019-04-23 23:04 UTC (permalink / raw)
  To: dev

On Tue, 23 Apr 2019 23:06:40 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:

> As part of the meson build, a pkg-config file for libdpdk is created, which
> allows apps to be compiled and linked against DPDK by taking the cflags and
> lib parameter from pkgconfig. The example app makefiles have been reworked
> to take account of this support, but the build of them against the .pc file
> was not regularly tested.
> 
> To rectify this, and give us greater confidence in the correctness of the
> .pc file, this set adds in the sample apps to the installation set for
> "ninja install" and then builds a subset of those apps against the
> pkg-config file to test it. In the process a small error when compiling
> the cmdline sample app using the .pc file was fixed.
> 
> Bruce Richardson (4):
>   examples: install examples as part of ninja install
>   examples: simplify getting list of all examples
>   devtools/test-meson-builds: add testing of pkg-config file
>   build: add libbsd to pkg-config file if enabled
> 
>  config/meson.build            | 10 ++++------
>  devtools/test-meson-builds.sh | 17 +++++++++++++++++
>  examples/meson.build          | 17 +++++++++++++----
>  meson.build                   |  2 ++
>  4 files changed, 36 insertions(+), 10 deletions(-)
> 

My experiments with Ubuntu 18.04 showed the default version of meson
was too old (broken) and generated bad cflags.

Getting later one for Debian stable-backports worked.

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-23 23:04 ` [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Stephen Hemminger
  2019-04-23 23:04   ` Stephen Hemminger
@ 2019-04-24  8:54   ` Bruce Richardson
  2019-04-24  8:54     ` Bruce Richardson
  2019-04-24  9:00     ` Bruce Richardson
  1 sibling, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24  8:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On Tue, Apr 23, 2019 at 04:04:49PM -0700, Stephen Hemminger wrote:
> On Tue, 23 Apr 2019 23:06:40 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > As part of the meson build, a pkg-config file for libdpdk is created, which
> > allows apps to be compiled and linked against DPDK by taking the cflags and
> > lib parameter from pkgconfig. The example app makefiles have been reworked
> > to take account of this support, but the build of them against the .pc file
> > was not regularly tested.
> > 
> > To rectify this, and give us greater confidence in the correctness of the
> > .pc file, this set adds in the sample apps to the installation set for
> > "ninja install" and then builds a subset of those apps against the
> > pkg-config file to test it. In the process a small error when compiling
> > the cmdline sample app using the .pc file was fixed.
> > 
> > Bruce Richardson (4):
> >   examples: install examples as part of ninja install
> >   examples: simplify getting list of all examples
> >   devtools/test-meson-builds: add testing of pkg-config file
> >   build: add libbsd to pkg-config file if enabled
> > 
> >  config/meson.build            | 10 ++++------
> >  devtools/test-meson-builds.sh | 17 +++++++++++++++++
> >  examples/meson.build          | 17 +++++++++++++----
> >  meson.build                   |  2 ++
> >  4 files changed, 36 insertions(+), 10 deletions(-)
> > 
> 
> My experiments with Ubuntu 18.04 showed the default version of meson
> was too old (broken) and generated bad cflags.
> 
> Getting later one for Debian stable-backports worked.

Thanks for the info - it's things like that that this scripting is needed
to catch.

How old was the older version and what was the diff from it vs newer?
Personally, to update meson, I'd always just use pip to get the latest.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-24  8:54   ` Bruce Richardson
@ 2019-04-24  8:54     ` Bruce Richardson
  2019-04-24  9:00     ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24  8:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On Tue, Apr 23, 2019 at 04:04:49PM -0700, Stephen Hemminger wrote:
> On Tue, 23 Apr 2019 23:06:40 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > As part of the meson build, a pkg-config file for libdpdk is created, which
> > allows apps to be compiled and linked against DPDK by taking the cflags and
> > lib parameter from pkgconfig. The example app makefiles have been reworked
> > to take account of this support, but the build of them against the .pc file
> > was not regularly tested.
> > 
> > To rectify this, and give us greater confidence in the correctness of the
> > .pc file, this set adds in the sample apps to the installation set for
> > "ninja install" and then builds a subset of those apps against the
> > pkg-config file to test it. In the process a small error when compiling
> > the cmdline sample app using the .pc file was fixed.
> > 
> > Bruce Richardson (4):
> >   examples: install examples as part of ninja install
> >   examples: simplify getting list of all examples
> >   devtools/test-meson-builds: add testing of pkg-config file
> >   build: add libbsd to pkg-config file if enabled
> > 
> >  config/meson.build            | 10 ++++------
> >  devtools/test-meson-builds.sh | 17 +++++++++++++++++
> >  examples/meson.build          | 17 +++++++++++++----
> >  meson.build                   |  2 ++
> >  4 files changed, 36 insertions(+), 10 deletions(-)
> > 
> 
> My experiments with Ubuntu 18.04 showed the default version of meson
> was too old (broken) and generated bad cflags.
> 
> Getting later one for Debian stable-backports worked.

Thanks for the info - it's things like that that this scripting is needed
to catch.

How old was the older version and what was the diff from it vs newer?
Personally, to update meson, I'd always just use pip to get the latest.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-24  8:54   ` Bruce Richardson
  2019-04-24  8:54     ` Bruce Richardson
@ 2019-04-24  9:00     ` Bruce Richardson
  2019-04-24  9:00       ` Bruce Richardson
  1 sibling, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24  9:00 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On Wed, Apr 24, 2019 at 09:54:05AM +0100, Bruce Richardson wrote:
> On Tue, Apr 23, 2019 at 04:04:49PM -0700, Stephen Hemminger wrote:
> > On Tue, 23 Apr 2019 23:06:40 +0100 Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > 
> > > As part of the meson build, a pkg-config file for libdpdk is created,
> > > which allows apps to be compiled and linked against DPDK by taking
> > > the cflags and lib parameter from pkgconfig. The example app
> > > makefiles have been reworked to take account of this support, but the
> > > build of them against the .pc file was not regularly tested.
> > > 
> > > To rectify this, and give us greater confidence in the correctness of
> > > the .pc file, this set adds in the sample apps to the installation
> > > set for "ninja install" and then builds a subset of those apps
> > > against the pkg-config file to test it. In the process a small error
> > > when compiling the cmdline sample app using the .pc file was fixed.
> > > 
> > > Bruce Richardson (4): examples: install examples as part of ninja
> > > install examples: simplify getting list of all examples
> > > devtools/test-meson-builds: add testing of pkg-config file build: add
> > > libbsd to pkg-config file if enabled
> > > 
> > >  config/meson.build            | 10 ++++------
> > >  devtools/test-meson-builds.sh | 17 +++++++++++++++++
> > >  examples/meson.build          | 17 +++++++++++++---- meson.build
> > >  |  2 ++ 4 files changed, 36 insertions(+), 10 deletions(-)
> > > 
> > 
> > My experiments with Ubuntu 18.04 showed the default version of meson
> > was too old (broken) and generated bad cflags.
> > 
> > Getting later one for Debian stable-backports worked.
> 
> Thanks for the info - it's things like that that this scripting is needed
> to catch.
> 
And as further followup on the need for this, checking this patchset on
FreeBSD shows that the "ninja install" step is broken there due to "ln",
used by "symlink-drivers-solibs.sh" postinstall script, not supporting the
"-r" flag on FreeBSD. :-(

I'll try and do up a V2 set to include that fix also.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-24  9:00     ` Bruce Richardson
@ 2019-04-24  9:00       ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24  9:00 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On Wed, Apr 24, 2019 at 09:54:05AM +0100, Bruce Richardson wrote:
> On Tue, Apr 23, 2019 at 04:04:49PM -0700, Stephen Hemminger wrote:
> > On Tue, 23 Apr 2019 23:06:40 +0100 Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > 
> > > As part of the meson build, a pkg-config file for libdpdk is created,
> > > which allows apps to be compiled and linked against DPDK by taking
> > > the cflags and lib parameter from pkgconfig. The example app
> > > makefiles have been reworked to take account of this support, but the
> > > build of them against the .pc file was not regularly tested.
> > > 
> > > To rectify this, and give us greater confidence in the correctness of
> > > the .pc file, this set adds in the sample apps to the installation
> > > set for "ninja install" and then builds a subset of those apps
> > > against the pkg-config file to test it. In the process a small error
> > > when compiling the cmdline sample app using the .pc file was fixed.
> > > 
> > > Bruce Richardson (4): examples: install examples as part of ninja
> > > install examples: simplify getting list of all examples
> > > devtools/test-meson-builds: add testing of pkg-config file build: add
> > > libbsd to pkg-config file if enabled
> > > 
> > >  config/meson.build            | 10 ++++------
> > >  devtools/test-meson-builds.sh | 17 +++++++++++++++++
> > >  examples/meson.build          | 17 +++++++++++++---- meson.build
> > >  |  2 ++ 4 files changed, 36 insertions(+), 10 deletions(-)
> > > 
> > 
> > My experiments with Ubuntu 18.04 showed the default version of meson
> > was too old (broken) and generated bad cflags.
> > 
> > Getting later one for Debian stable-backports worked.
> 
> Thanks for the info - it's things like that that this scripting is needed
> to catch.
> 
And as further followup on the need for this, checking this patchset on
FreeBSD shows that the "ninja install" step is broken there due to "ln",
used by "symlink-drivers-solibs.sh" postinstall script, not supporting the
"-r" flag on FreeBSD. :-(

I'll try and do up a V2 set to include that fix also.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-23 22:06 ` [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
  2019-04-23 22:06   ` Bruce Richardson
@ 2019-04-24  9:22   ` Luca Boccassi
  2019-04-24  9:22     ` Luca Boccassi
  2019-04-24 10:41     ` Bruce Richardson
  1 sibling, 2 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-24  9:22 UTC (permalink / raw)
  To: Bruce Richardson, dev

On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> The pkg-config file generated as part of the build of DPDK should
> allow
> applications to be built with an installed DPDK. We can test this as
> part of the build by doing an install of DPDK to a temporary
> directory
> within the build folder, and by then compiling up a few sample apps
> using make working off that directory.
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  devtools/test-meson-builds.sh | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> builds.sh
> index 630a1a6fe..dfba2a782 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
>  			$use_shared --cross-file $f
>  	done
>  fi
> +
> +##############
> +# Test installation of the x86-default target, to be used for
> checking
> +# the sample apps build using the pkg-config file for cflags and
> libs
> +###############
> +build_path=build-x86-default
> +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
> +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ; export
> PKG_CONFIG_PATH
> +$ninja_cmd -C $build_path install
> +
> +# rather than hacking our environment, just edit the .pc file prefix
> value
> +sed -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc

What about just using meson's prefix option instead? Which is how it
would be used in a real use case

> +for example in helloworld l2fwd l3fwd skeleton timer; do
> +	echo "## Building $example"
> +	make -C $DESTDIR/usr/local/share/dpdk/examples/$example
> +done
> 
-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24  9:22   ` Luca Boccassi
@ 2019-04-24  9:22     ` Luca Boccassi
  2019-04-24 10:41     ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-24  9:22 UTC (permalink / raw)
  To: Bruce Richardson, dev

On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> The pkg-config file generated as part of the build of DPDK should
> allow
> applications to be built with an installed DPDK. We can test this as
> part of the build by doing an install of DPDK to a temporary
> directory
> within the build folder, and by then compiling up a few sample apps
> using make working off that directory.
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  devtools/test-meson-builds.sh | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> builds.sh
> index 630a1a6fe..dfba2a782 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
>  			$use_shared --cross-file $f
>  	done
>  fi
> +
> +##############
> +# Test installation of the x86-default target, to be used for
> checking
> +# the sample apps build using the pkg-config file for cflags and
> libs
> +###############
> +build_path=build-x86-default
> +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
> +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ; export
> PKG_CONFIG_PATH
> +$ninja_cmd -C $build_path install
> +
> +# rather than hacking our environment, just edit the .pc file prefix
> value
> +sed -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc

What about just using meson's prefix option instead? Which is how it
would be used in a real use case

> +for example in helloworld l2fwd l3fwd skeleton timer; do
> +	echo "## Building $example"
> +	make -C $DESTDIR/usr/local/share/dpdk/examples/$example
> +done
> 
-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24  9:22   ` Luca Boccassi
  2019-04-24  9:22     ` Luca Boccassi
@ 2019-04-24 10:41     ` Bruce Richardson
  2019-04-24 10:41       ` Bruce Richardson
  2019-04-24 11:02       ` Luca Boccassi
  1 sibling, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24 10:41 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > The pkg-config file generated as part of the build of DPDK should allow
> > applications to be built with an installed DPDK. We can test this as
> > part of the build by doing an install of DPDK to a temporary directory
> > within the build folder, and by then compiling up a few sample apps
> > using make working off that directory.
> > 
> > Signed-off-by: Bruce Richardson < bruce.richardson@intel.com
> > >
> > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 file
> > changed, 17 insertions(+)
> > 
> > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@
> > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then $use_shared
> > --cross-file $f done fi + +############## +# Test installation of the
> > x86-default target, to be used for checking +# the sample apps build
> > using the pkg-config file for cflags and libs +###############
> > +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-root ;
> > export DESTDIR +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + +# rather
> > than hacking our environment, just edit the .pc file prefix value +sed
> > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> 
> What about just using meson's prefix option instead? Which is how it
> would be used in a real use case
> 
I don't think that would fully work, as my understanding is that the prefix
option would apply only to the /usr/local parts, but not to the kernel
modules which would still try and install in /lib/.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 10:41     ` Bruce Richardson
@ 2019-04-24 10:41       ` Bruce Richardson
  2019-04-24 11:02       ` Luca Boccassi
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24 10:41 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > The pkg-config file generated as part of the build of DPDK should allow
> > applications to be built with an installed DPDK. We can test this as
> > part of the build by doing an install of DPDK to a temporary directory
> > within the build folder, and by then compiling up a few sample apps
> > using make working off that directory.
> > 
> > Signed-off-by: Bruce Richardson < bruce.richardson@intel.com
> > >
> > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 file
> > changed, 17 insertions(+)
> > 
> > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@
> > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then $use_shared
> > --cross-file $f done fi + +############## +# Test installation of the
> > x86-default target, to be used for checking +# the sample apps build
> > using the pkg-config file for cflags and libs +###############
> > +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-root ;
> > export DESTDIR +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + +# rather
> > than hacking our environment, just edit the .pc file prefix value +sed
> > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> 
> What about just using meson's prefix option instead? Which is how it
> would be used in a real use case
> 
I don't think that would fully work, as my understanding is that the prefix
option would apply only to the /usr/local parts, but not to the kernel
modules which would still try and install in /lib/.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 10:41     ` Bruce Richardson
  2019-04-24 10:41       ` Bruce Richardson
@ 2019-04-24 11:02       ` Luca Boccassi
  2019-04-24 11:02         ` Luca Boccassi
  2019-04-24 12:31         ` Bruce Richardson
  1 sibling, 2 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-24 11:02 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > The pkg-config file generated as part of the build of DPDK should
> > > allow
> > > applications to be built with an installed DPDK. We can test this
> > > as
> > > part of the build by doing an install of DPDK to a temporary
> > > directory
> > > within the build folder, and by then compiling up a few sample
> > > apps
> > > using make working off that directory.
> > > 
> > > Signed-off-by: Bruce Richardson < 
> > > bruce.richardson@intel.com
> > > 
> > > 
> > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 file
> > > changed, 17 insertions(+)
> > > 
> > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > builds.sh @@
> > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > $use_shared
> > > --cross-file $f done fi + +############## +# Test installation of
> > > the
> > > x86-default target, to be used for checking +# the sample apps
> > > build
> > > using the pkg-config file for cflags and libs +###############
> > > +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-
> > > root ;
> > > export DESTDIR
> > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + +#
> > > rather
> > > than hacking our environment, just edit the .pc file prefix value
> > > +sed
> > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > 
> > What about just using meson's prefix option instead? Which is how
> > it
> > would be used in a real use case
> > 
> 
> I don't think that would fully work, as my understanding is that the
> prefix
> option would apply only to the /usr/local parts, but not to the
> kernel
> modules which would still try and install in /lib/.
> 
> /Bruce

What about doing a meson configure -Denable_kmods=false before the
ninja install? The modules are not needed for that test anyway, right?
Alternatively, the kernel src dir could be symlinked in the build path,
and the kernel_dir option could be used

I'm just worried that the test should be as "realistic" as possible, to
avoid missing something

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 11:02       ` Luca Boccassi
@ 2019-04-24 11:02         ` Luca Boccassi
  2019-04-24 12:31         ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-24 11:02 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > The pkg-config file generated as part of the build of DPDK should
> > > allow
> > > applications to be built with an installed DPDK. We can test this
> > > as
> > > part of the build by doing an install of DPDK to a temporary
> > > directory
> > > within the build folder, and by then compiling up a few sample
> > > apps
> > > using make working off that directory.
> > > 
> > > Signed-off-by: Bruce Richardson < 
> > > bruce.richardson@intel.com
> > > 
> > > 
> > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 file
> > > changed, 17 insertions(+)
> > > 
> > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > builds.sh @@
> > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > $use_shared
> > > --cross-file $f done fi + +############## +# Test installation of
> > > the
> > > x86-default target, to be used for checking +# the sample apps
> > > build
> > > using the pkg-config file for cflags and libs +###############
> > > +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-
> > > root ;
> > > export DESTDIR
> > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + +#
> > > rather
> > > than hacking our environment, just edit the .pc file prefix value
> > > +sed
> > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > 
> > What about just using meson's prefix option instead? Which is how
> > it
> > would be used in a real use case
> > 
> 
> I don't think that would fully work, as my understanding is that the
> prefix
> option would apply only to the /usr/local parts, but not to the
> kernel
> modules which would still try and install in /lib/.
> 
> /Bruce

What about doing a meson configure -Denable_kmods=false before the
ninja install? The modules are not needed for that test anyway, right?
Alternatively, the kernel src dir could be symlinked in the build path,
and the kernel_dir option could be used

I'm just worried that the test should be as "realistic" as possible, to
avoid missing something

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 11:02       ` Luca Boccassi
  2019-04-24 11:02         ` Luca Boccassi
@ 2019-04-24 12:31         ` Bruce Richardson
  2019-04-24 12:31           ` Bruce Richardson
  2019-04-24 13:37           ` Luca Boccassi
  1 sibling, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24 12:31 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > The pkg-config file generated as part of the build of DPDK should
> > > > allow
> > > > applications to be built with an installed DPDK. We can test this
> > > > as
> > > > part of the build by doing an install of DPDK to a temporary
> > > > directory
> > > > within the build folder, and by then compiling up a few sample
> > > > apps
> > > > using make working off that directory.
> > > > 
> > > > Signed-off-by: Bruce Richardson < 
> > > > bruce.richardson@intel.com
> > > > 
> > > > 
> > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 file
> > > > changed, 17 insertions(+)
> > > > 
> > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > > builds.sh @@
> > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > $use_shared
> > > > --cross-file $f done fi + +############## +# Test installation of
> > > > the
> > > > x86-default target, to be used for checking +# the sample apps
> > > > build
> > > > using the pkg-config file for cflags and libs +###############
> > > > +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-
> > > > root ;
> > > > export DESTDIR
> > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + +#
> > > > rather
> > > > than hacking our environment, just edit the .pc file prefix value
> > > > +sed
> > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > 
> > > What about just using meson's prefix option instead? Which is how
> > > it
> > > would be used in a real use case
> > > 
> > 
> > I don't think that would fully work, as my understanding is that the
> > prefix
> > option would apply only to the /usr/local parts, but not to the
> > kernel
> > modules which would still try and install in /lib/.
> > 
> > /Bruce
> 
> What about doing a meson configure -Denable_kmods=false before the
> ninja install? The modules are not needed for that test anyway, right?
> Alternatively, the kernel src dir could be symlinked in the build path,
> and the kernel_dir option could be used
> 
> I'm just worried that the test should be as "realistic" as possible, to
> avoid missing something
> 
Yes, I did think of that too, but it does mean doing another configuration
run in meson, and possibly a rebuild too if the rte_build_config.h file
changes. Therefore I decided to use DESTDIR for the sake of speed here. I
assumed there would be a pkg-config variable to adjust the output paths
based on a sysroot, but couldn't find a suitable one.

In any case, I'll see about changing things as you suggest in V2 -
correctness is more important that speed here.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 12:31         ` Bruce Richardson
@ 2019-04-24 12:31           ` Bruce Richardson
  2019-04-24 13:37           ` Luca Boccassi
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-24 12:31 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > The pkg-config file generated as part of the build of DPDK should
> > > > allow
> > > > applications to be built with an installed DPDK. We can test this
> > > > as
> > > > part of the build by doing an install of DPDK to a temporary
> > > > directory
> > > > within the build folder, and by then compiling up a few sample
> > > > apps
> > > > using make working off that directory.
> > > > 
> > > > Signed-off-by: Bruce Richardson < 
> > > > bruce.richardson@intel.com
> > > > 
> > > > 
> > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 file
> > > > changed, 17 insertions(+)
> > > > 
> > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > > builds.sh @@
> > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > $use_shared
> > > > --cross-file $f done fi + +############## +# Test installation of
> > > > the
> > > > x86-default target, to be used for checking +# the sample apps
> > > > build
> > > > using the pkg-config file for cflags and libs +###############
> > > > +build_path=build-x86-default +DESTDIR=`pwd`/$build_path/install-
> > > > root ;
> > > > export DESTDIR
> > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + +#
> > > > rather
> > > > than hacking our environment, just edit the .pc file prefix value
> > > > +sed
> > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > 
> > > What about just using meson's prefix option instead? Which is how
> > > it
> > > would be used in a real use case
> > > 
> > 
> > I don't think that would fully work, as my understanding is that the
> > prefix
> > option would apply only to the /usr/local parts, but not to the
> > kernel
> > modules which would still try and install in /lib/.
> > 
> > /Bruce
> 
> What about doing a meson configure -Denable_kmods=false before the
> ninja install? The modules are not needed for that test anyway, right?
> Alternatively, the kernel src dir could be symlinked in the build path,
> and the kernel_dir option could be used
> 
> I'm just worried that the test should be as "realistic" as possible, to
> avoid missing something
> 
Yes, I did think of that too, but it does mean doing another configuration
run in meson, and possibly a rebuild too if the rte_build_config.h file
changes. Therefore I decided to use DESTDIR for the sake of speed here. I
assumed there would be a pkg-config variable to adjust the output paths
based on a sysroot, but couldn't find a suitable one.

In any case, I'll see about changing things as you suggest in V2 -
correctness is more important that speed here.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 12:31         ` Bruce Richardson
  2019-04-24 12:31           ` Bruce Richardson
@ 2019-04-24 13:37           ` Luca Boccassi
  2019-04-24 13:37             ` Luca Boccassi
  2019-04-26 14:56             ` Bruce Richardson
  1 sibling, 2 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-24 13:37 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > The pkg-config file generated as part of the build of DPDK
> > > > > should
> > > > > allow
> > > > > applications to be built with an installed DPDK. We can test
> > > > > this
> > > > > as
> > > > > part of the build by doing an install of DPDK to a temporary
> > > > > directory
> > > > > within the build folder, and by then compiling up a few
> > > > > sample
> > > > > apps
> > > > > using make working off that directory.
> > > > > 
> > > > > Signed-off-by: Bruce Richardson < 
> > > > > bruce.richardson@intel.com
> > > > > 
> > > > > 
> > > > > 
> > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1
> > > > > file
> > > > > changed, 17 insertions(+)
> > > > > 
> > > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-
> > > > > meson-
> > > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > > > builds.sh @@
> > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > > $use_shared
> > > > > --cross-file $f done fi + +############## +# Test
> > > > > installation of
> > > > > the
> > > > > x86-default target, to be used for checking +# the sample
> > > > > apps
> > > > > build
> > > > > using the pkg-config file for cflags and libs
> > > > > +###############
> > > > > +build_path=build-x86-default
> > > > > +DESTDIR=`pwd`/$build_path/install-
> > > > > root ;
> > > > > export DESTDIR
> > > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install +
> > > > > +#
> > > > > rather
> > > > > than hacking our environment, just edit the .pc file prefix
> > > > > value
> > > > > +sed
> > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > 
> > > > What about just using meson's prefix option instead? Which is
> > > > how
> > > > it
> > > > would be used in a real use case
> > > > 
> > > 
> > > I don't think that would fully work, as my understanding is that
> > > the
> > > prefix
> > > option would apply only to the /usr/local parts, but not to the
> > > kernel
> > > modules which would still try and install in /lib/.
> > > 
> > > /Bruce
> > 
> > What about doing a meson configure -Denable_kmods=false before the
> > ninja install? The modules are not needed for that test anyway,
> > right?
> > Alternatively, the kernel src dir could be symlinked in the build
> > path,
> > and the kernel_dir option could be used
> > 
> > I'm just worried that the test should be as "realistic" as
> > possible, to
> > avoid missing something
> > 
> 
> Yes, I did think of that too, but it does mean doing another
> configuration
> run in meson, and possibly a rebuild too if the rte_build_config.h
> file
> changes. Therefore I decided to use DESTDIR for the sake of speed
> here. I
> assumed there would be a pkg-config variable to adjust the output
> paths
> based on a sysroot, but couldn't find a suitable one.
> 
> In any case, I'll see about changing things as you suggest in V2 -
> correctness is more important that speed here.
> 
> /Bruce

There actually is a pkg-config binary option, I just tried and it works
(it seems to be disabled by default on Debian and derivatives): --
define-prefix

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 13:37           ` Luca Boccassi
@ 2019-04-24 13:37             ` Luca Boccassi
  2019-04-26 14:56             ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-24 13:37 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > The pkg-config file generated as part of the build of DPDK
> > > > > should
> > > > > allow
> > > > > applications to be built with an installed DPDK. We can test
> > > > > this
> > > > > as
> > > > > part of the build by doing an install of DPDK to a temporary
> > > > > directory
> > > > > within the build folder, and by then compiling up a few
> > > > > sample
> > > > > apps
> > > > > using make working off that directory.
> > > > > 
> > > > > Signed-off-by: Bruce Richardson < 
> > > > > bruce.richardson@intel.com
> > > > > 
> > > > > 
> > > > > 
> > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1
> > > > > file
> > > > > changed, 17 insertions(+)
> > > > > 
> > > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-
> > > > > meson-
> > > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > > > builds.sh @@
> > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > > $use_shared
> > > > > --cross-file $f done fi + +############## +# Test
> > > > > installation of
> > > > > the
> > > > > x86-default target, to be used for checking +# the sample
> > > > > apps
> > > > > build
> > > > > using the pkg-config file for cflags and libs
> > > > > +###############
> > > > > +build_path=build-x86-default
> > > > > +DESTDIR=`pwd`/$build_path/install-
> > > > > root ;
> > > > > export DESTDIR
> > > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install +
> > > > > +#
> > > > > rather
> > > > > than hacking our environment, just edit the .pc file prefix
> > > > > value
> > > > > +sed
> > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > 
> > > > What about just using meson's prefix option instead? Which is
> > > > how
> > > > it
> > > > would be used in a real use case
> > > > 
> > > 
> > > I don't think that would fully work, as my understanding is that
> > > the
> > > prefix
> > > option would apply only to the /usr/local parts, but not to the
> > > kernel
> > > modules which would still try and install in /lib/.
> > > 
> > > /Bruce
> > 
> > What about doing a meson configure -Denable_kmods=false before the
> > ninja install? The modules are not needed for that test anyway,
> > right?
> > Alternatively, the kernel src dir could be symlinked in the build
> > path,
> > and the kernel_dir option could be used
> > 
> > I'm just worried that the test should be as "realistic" as
> > possible, to
> > avoid missing something
> > 
> 
> Yes, I did think of that too, but it does mean doing another
> configuration
> run in meson, and possibly a rebuild too if the rte_build_config.h
> file
> changes. Therefore I decided to use DESTDIR for the sake of speed
> here. I
> assumed there would be a pkg-config variable to adjust the output
> paths
> based on a sysroot, but couldn't find a suitable one.
> 
> In any case, I'll see about changing things as you suggest in V2 -
> correctness is more important that speed here.
> 
> /Bruce

There actually is a pkg-config binary option, I just tried and it works
(it seems to be disabled by default on Debian and derivatives): --
define-prefix

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-24 13:37           ` Luca Boccassi
  2019-04-24 13:37             ` Luca Boccassi
@ 2019-04-26 14:56             ` Bruce Richardson
  2019-04-26 14:56               ` Bruce Richardson
                                 ` (2 more replies)
  1 sibling, 3 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 14:56 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > The pkg-config file generated as part of the build of DPDK
> > > > > > should
> > > > > > allow
> > > > > > applications to be built with an installed DPDK. We can test
> > > > > > this
> > > > > > as
> > > > > > part of the build by doing an install of DPDK to a temporary
> > > > > > directory
> > > > > > within the build folder, and by then compiling up a few
> > > > > > sample
> > > > > > apps
> > > > > > using make working off that directory.
> > > > > > 
> > > > > > Signed-off-by: Bruce Richardson < 
> > > > > > bruce.richardson@intel.com
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1
> > > > > > file
> > > > > > changed, 17 insertions(+)
> > > > > > 
> > > > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-
> > > > > > meson-
> > > > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > > > > builds.sh @@
> > > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > > > $use_shared
> > > > > > --cross-file $f done fi + +############## +# Test
> > > > > > installation of
> > > > > > the
> > > > > > x86-default target, to be used for checking +# the sample
> > > > > > apps
> > > > > > build
> > > > > > using the pkg-config file for cflags and libs
> > > > > > +###############
> > > > > > +build_path=build-x86-default
> > > > > > +DESTDIR=`pwd`/$build_path/install-
> > > > > > root ;
> > > > > > export DESTDIR
> > > > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install +
> > > > > > +#
> > > > > > rather
> > > > > > than hacking our environment, just edit the .pc file prefix
> > > > > > value
> > > > > > +sed
> > > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > > 
> > > > > What about just using meson's prefix option instead? Which is
> > > > > how
> > > > > it
> > > > > would be used in a real use case
> > > > > 
> > > > 
> > > > I don't think that would fully work, as my understanding is that
> > > > the
> > > > prefix
> > > > option would apply only to the /usr/local parts, but not to the
> > > > kernel
> > > > modules which would still try and install in /lib/.
> > > > 
> > > > /Bruce
> > > 
> > > What about doing a meson configure -Denable_kmods=false before the
> > > ninja install? The modules are not needed for that test anyway,
> > > right?
> > > Alternatively, the kernel src dir could be symlinked in the build
> > > path,
> > > and the kernel_dir option could be used
> > > 
> > > I'm just worried that the test should be as "realistic" as
> > > possible, to
> > > avoid missing something
> > > 
> > 
> > Yes, I did think of that too, but it does mean doing another
> > configuration
> > run in meson, and possibly a rebuild too if the rte_build_config.h
> > file
> > changes. Therefore I decided to use DESTDIR for the sake of speed
> > here. I
> > assumed there would be a pkg-config variable to adjust the output
> > paths
> > based on a sysroot, but couldn't find a suitable one.
> > 
> > In any case, I'll see about changing things as you suggest in V2 -
> > correctness is more important that speed here.
> > 
> > /Bruce
> 
> There actually is a pkg-config binary option, I just tried and it works
> (it seems to be disabled by default on Debian and derivatives): --
> define-prefix
> 
Any cmdline options to pkg-config don't solve the problem here as it means
that the makefiles for any app need to be modified to use all those.

Also, I've been looking at the option you suggest of disabling the kernel
modules for the install step - the problem that this brings is that it either:
* disables them permanently for the default build, meaning subsequent runs
  may fail to catch errors
* causes us to constantly reconfigure the build directory with/without
  the kmod setting, causing unnecessary work and slowdown in the script.

A third solution is to use a separate build folder for the pkg-config test
builds, but I think we have enough builds already in the setup without adding
another one.

All-in-all, I feel at this point that the original solution of making a small
change to the pkg-config file manually is the best solution for now. I don't
see it as being terribly fragile, and it should catch 95% of problems with
the pkg-config files. I suggest that any rework be looked at in a later set
to improve things.

Regards,
/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-26 14:56             ` Bruce Richardson
@ 2019-04-26 14:56               ` Bruce Richardson
  2019-04-26 16:10               ` Luca Boccassi
  2019-05-02 13:11               ` Thomas Monjalon
  2 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 14:56 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > The pkg-config file generated as part of the build of DPDK
> > > > > > should
> > > > > > allow
> > > > > > applications to be built with an installed DPDK. We can test
> > > > > > this
> > > > > > as
> > > > > > part of the build by doing an install of DPDK to a temporary
> > > > > > directory
> > > > > > within the build folder, and by then compiling up a few
> > > > > > sample
> > > > > > apps
> > > > > > using make working off that directory.
> > > > > > 
> > > > > > Signed-off-by: Bruce Richardson < 
> > > > > > bruce.richardson@intel.com
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1
> > > > > > file
> > > > > > changed, 17 insertions(+)
> > > > > > 
> > > > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-
> > > > > > meson-
> > > > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-
> > > > > > builds.sh @@
> > > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > > > $use_shared
> > > > > > --cross-file $f done fi + +############## +# Test
> > > > > > installation of
> > > > > > the
> > > > > > x86-default target, to be used for checking +# the sample
> > > > > > apps
> > > > > > build
> > > > > > using the pkg-config file for cflags and libs
> > > > > > +###############
> > > > > > +build_path=build-x86-default
> > > > > > +DESTDIR=`pwd`/$build_path/install-
> > > > > > root ;
> > > > > > export DESTDIR
> > > > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install +
> > > > > > +#
> > > > > > rather
> > > > > > than hacking our environment, just edit the .pc file prefix
> > > > > > value
> > > > > > +sed
> > > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > > 
> > > > > What about just using meson's prefix option instead? Which is
> > > > > how
> > > > > it
> > > > > would be used in a real use case
> > > > > 
> > > > 
> > > > I don't think that would fully work, as my understanding is that
> > > > the
> > > > prefix
> > > > option would apply only to the /usr/local parts, but not to the
> > > > kernel
> > > > modules which would still try and install in /lib/.
> > > > 
> > > > /Bruce
> > > 
> > > What about doing a meson configure -Denable_kmods=false before the
> > > ninja install? The modules are not needed for that test anyway,
> > > right?
> > > Alternatively, the kernel src dir could be symlinked in the build
> > > path,
> > > and the kernel_dir option could be used
> > > 
> > > I'm just worried that the test should be as "realistic" as
> > > possible, to
> > > avoid missing something
> > > 
> > 
> > Yes, I did think of that too, but it does mean doing another
> > configuration
> > run in meson, and possibly a rebuild too if the rte_build_config.h
> > file
> > changes. Therefore I decided to use DESTDIR for the sake of speed
> > here. I
> > assumed there would be a pkg-config variable to adjust the output
> > paths
> > based on a sysroot, but couldn't find a suitable one.
> > 
> > In any case, I'll see about changing things as you suggest in V2 -
> > correctness is more important that speed here.
> > 
> > /Bruce
> 
> There actually is a pkg-config binary option, I just tried and it works
> (it seems to be disabled by default on Debian and derivatives): --
> define-prefix
> 
Any cmdline options to pkg-config don't solve the problem here as it means
that the makefiles for any app need to be modified to use all those.

Also, I've been looking at the option you suggest of disabling the kernel
modules for the install step - the problem that this brings is that it either:
* disables them permanently for the default build, meaning subsequent runs
  may fail to catch errors
* causes us to constantly reconfigure the build directory with/without
  the kmod setting, causing unnecessary work and slowdown in the script.

A third solution is to use a separate build folder for the pkg-config test
builds, but I think we have enough builds already in the setup without adding
another one.

All-in-all, I feel at this point that the original solution of making a small
change to the pkg-config file manually is the best solution for now. I don't
see it as being terribly fragile, and it should catch 95% of problems with
the pkg-config files. I suggest that any rework be looked at in a later set
to improve things.

Regards,
/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-26 14:56             ` Bruce Richardson
  2019-04-26 14:56               ` Bruce Richardson
@ 2019-04-26 16:10               ` Luca Boccassi
  2019-04-26 16:10                 ` Luca Boccassi
  2019-05-02 13:11               ` Thomas Monjalon
  2 siblings, 1 reply; 88+ messages in thread
From: Luca Boccassi @ 2019-04-26 16:10 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Fri, 2019-04-26 at 15:56 +0100, Bruce Richardson wrote:
> On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > wrote:
> > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > > The pkg-config file generated as part of the build of
> > > > > > > DPDK
> > > > > > > should
> > > > > > > allow
> > > > > > > applications to be built with an installed DPDK. We can
> > > > > > > test
> > > > > > > this
> > > > > > > as
> > > > > > > part of the build by doing an install of DPDK to a
> > > > > > > temporary
> > > > > > > directory
> > > > > > > within the build folder, and by then compiling up a few
> > > > > > > sample
> > > > > > > apps
> > > > > > > using make working off that directory.
> > > > > > > 
> > > > > > > Signed-off-by: Bruce Richardson < 
> > > > > > > bruce.richardson@intel.com
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++
> > > > > > > 1
> > > > > > > file
> > > > > > > changed, 17 insertions(+)
> > > > > > > 
> > > > > > > diff --git a/devtools/test-meson-builds.sh
> > > > > > > b/devtools/test-
> > > > > > > meson-
> > > > > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-
> > > > > > > meson-
> > > > > > > builds.sh @@
> > > > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > > > > $use_shared
> > > > > > > --cross-file $f done fi + +############## +# Test
> > > > > > > installation of
> > > > > > > the
> > > > > > > x86-default target, to be used for checking +# the sample
> > > > > > > apps
> > > > > > > build
> > > > > > > using the pkg-config file for cflags and libs
> > > > > > > +###############
> > > > > > > +build_path=build-x86-default
> > > > > > > +DESTDIR=`pwd`/$build_path/install-
> > > > > > > root ;
> > > > > > > export DESTDIR
> > > > > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install
> > > > > > > +
> > > > > > > +#
> > > > > > > rather
> > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > prefix
> > > > > > > value
> > > > > > > +sed
> > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > 
> > > > > > What about just using meson's prefix option instead? Which
> > > > > > is
> > > > > > how
> > > > > > it
> > > > > > would be used in a real use case
> > > > > > 
> > > > > 
> > > > > I don't think that would fully work, as my understanding is
> > > > > that
> > > > > the
> > > > > prefix
> > > > > option would apply only to the /usr/local parts, but not to
> > > > > the
> > > > > kernel
> > > > > modules which would still try and install in /lib/.
> > > > > 
> > > > > /Bruce
> > > > 
> > > > What about doing a meson configure -Denable_kmods=false before
> > > > the
> > > > ninja install? The modules are not needed for that test anyway,
> > > > right?
> > > > Alternatively, the kernel src dir could be symlinked in the
> > > > build
> > > > path,
> > > > and the kernel_dir option could be used
> > > > 
> > > > I'm just worried that the test should be as "realistic" as
> > > > possible, to
> > > > avoid missing something
> > > > 
> > > 
> > > Yes, I did think of that too, but it does mean doing another
> > > configuration
> > > run in meson, and possibly a rebuild too if the
> > > rte_build_config.h
> > > file
> > > changes. Therefore I decided to use DESTDIR for the sake of speed
> > > here. I
> > > assumed there would be a pkg-config variable to adjust the output
> > > paths
> > > based on a sysroot, but couldn't find a suitable one.
> > > 
> > > In any case, I'll see about changing things as you suggest in V2
> > > -
> > > correctness is more important that speed here.
> > > 
> > > /Bruce
> > 
> > There actually is a pkg-config binary option, I just tried and it
> > works
> > (it seems to be disabled by default on Debian and derivatives): --
> > define-prefix
> > 
> 
> Any cmdline options to pkg-config don't solve the problem here as it
> means
> that the makefiles for any app need to be modified to use all those.
> 
> Also, I've been looking at the option you suggest of disabling the
> kernel
> modules for the install step - the problem that this brings is that
> it either:
> * disables them permanently for the default build, meaning subsequent
> runs
>   may fail to catch errors
> * causes us to constantly reconfigure the build directory
> with/without
>   the kmod setting, causing unnecessary work and slowdown in the
> script.
> 
> A third solution is to use a separate build folder for the pkg-config 
> test
> builds, but I think we have enough builds already in the setup
> without adding
> another one.
> 
> All-in-all, I feel at this point that the original solution of making
> a small
> change to the pkg-config file manually is the best solution for now.
> I don't
> see it as being terribly fragile, and it should catch 95% of problems
> with
> the pkg-config files. I suggest that any rework be looked at in a
> later set
> to improve things.
> 
> Regards,
> /Bruce

Makes sense, I had hoped it would be easier - thanks for giving it a
shot!

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-26 16:10               ` Luca Boccassi
@ 2019-04-26 16:10                 ` Luca Boccassi
  0 siblings, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-26 16:10 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Fri, 2019-04-26 at 15:56 +0100, Bruce Richardson wrote:
> On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > wrote:
> > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > > The pkg-config file generated as part of the build of
> > > > > > > DPDK
> > > > > > > should
> > > > > > > allow
> > > > > > > applications to be built with an installed DPDK. We can
> > > > > > > test
> > > > > > > this
> > > > > > > as
> > > > > > > part of the build by doing an install of DPDK to a
> > > > > > > temporary
> > > > > > > directory
> > > > > > > within the build folder, and by then compiling up a few
> > > > > > > sample
> > > > > > > apps
> > > > > > > using make working off that directory.
> > > > > > > 
> > > > > > > Signed-off-by: Bruce Richardson < 
> > > > > > > bruce.richardson@intel.com
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++
> > > > > > > 1
> > > > > > > file
> > > > > > > changed, 17 insertions(+)
> > > > > > > 
> > > > > > > diff --git a/devtools/test-meson-builds.sh
> > > > > > > b/devtools/test-
> > > > > > > meson-
> > > > > > > builds.sh index 630a1a6fe..dfba2a782 100755 ---
> > > > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-
> > > > > > > meson-
> > > > > > > builds.sh @@
> > > > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then
> > > > > > > $use_shared
> > > > > > > --cross-file $f done fi + +############## +# Test
> > > > > > > installation of
> > > > > > > the
> > > > > > > x86-default target, to be used for checking +# the sample
> > > > > > > apps
> > > > > > > build
> > > > > > > using the pkg-config file for cflags and libs
> > > > > > > +###############
> > > > > > > +build_path=build-x86-default
> > > > > > > +DESTDIR=`pwd`/$build_path/install-
> > > > > > > root ;
> > > > > > > export DESTDIR
> > > > > > > +PKG_CONFIG_PATH=$DESTDIR/usr/local/lib64/pkgconfig ;
> > > > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install
> > > > > > > +
> > > > > > > +#
> > > > > > > rather
> > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > prefix
> > > > > > > value
> > > > > > > +sed
> > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > 
> > > > > > What about just using meson's prefix option instead? Which
> > > > > > is
> > > > > > how
> > > > > > it
> > > > > > would be used in a real use case
> > > > > > 
> > > > > 
> > > > > I don't think that would fully work, as my understanding is
> > > > > that
> > > > > the
> > > > > prefix
> > > > > option would apply only to the /usr/local parts, but not to
> > > > > the
> > > > > kernel
> > > > > modules which would still try and install in /lib/.
> > > > > 
> > > > > /Bruce
> > > > 
> > > > What about doing a meson configure -Denable_kmods=false before
> > > > the
> > > > ninja install? The modules are not needed for that test anyway,
> > > > right?
> > > > Alternatively, the kernel src dir could be symlinked in the
> > > > build
> > > > path,
> > > > and the kernel_dir option could be used
> > > > 
> > > > I'm just worried that the test should be as "realistic" as
> > > > possible, to
> > > > avoid missing something
> > > > 
> > > 
> > > Yes, I did think of that too, but it does mean doing another
> > > configuration
> > > run in meson, and possibly a rebuild too if the
> > > rte_build_config.h
> > > file
> > > changes. Therefore I decided to use DESTDIR for the sake of speed
> > > here. I
> > > assumed there would be a pkg-config variable to adjust the output
> > > paths
> > > based on a sysroot, but couldn't find a suitable one.
> > > 
> > > In any case, I'll see about changing things as you suggest in V2
> > > -
> > > correctness is more important that speed here.
> > > 
> > > /Bruce
> > 
> > There actually is a pkg-config binary option, I just tried and it
> > works
> > (it seems to be disabled by default on Debian and derivatives): --
> > define-prefix
> > 
> 
> Any cmdline options to pkg-config don't solve the problem here as it
> means
> that the makefiles for any app need to be modified to use all those.
> 
> Also, I've been looking at the option you suggest of disabling the
> kernel
> modules for the install step - the problem that this brings is that
> it either:
> * disables them permanently for the default build, meaning subsequent
> runs
>   may fail to catch errors
> * causes us to constantly reconfigure the build directory
> with/without
>   the kmod setting, causing unnecessary work and slowdown in the
> script.
> 
> A third solution is to use a separate build folder for the pkg-config 
> test
> builds, but I think we have enough builds already in the setup
> without adding
> another one.
> 
> All-in-all, I feel at this point that the original solution of making
> a small
> change to the pkg-config file manually is the best solution for now.
> I don't
> see it as being terribly fragile, and it should catch 95% of problems
> with
> the pkg-config files. I suggest that any rework be looked at in a
> later set
> to improve things.
> 
> Regards,
> /Bruce

Makes sense, I had hoped it would be easier - thanks for giving it a
shot!

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
                   ` (5 preceding siblings ...)
  2019-04-23 23:04 ` [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Stephen Hemminger
@ 2019-04-26 16:11 ` Luca Boccassi
  2019-04-26 16:11   ` Luca Boccassi
  2019-04-26 16:20   ` Bruce Richardson
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
  7 siblings, 2 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-26 16:11 UTC (permalink / raw)
  To: Bruce Richardson, dev

On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> As part of the meson build, a pkg-config file for libdpdk is created,
> which
> allows apps to be compiled and linked against DPDK by taking the
> cflags and
> lib parameter from pkgconfig. The example app makefiles have been
> reworked
> to take account of this support, but the build of them against the
> .pc file
> was not regularly tested.
> 
> To rectify this, and give us greater confidence in the correctness of
> the
> .pc file, this set adds in the sample apps to the installation set
> for
> "ninja install" and then builds a subset of those apps against the
> pkg-config file to test it. In the process a small error when
> compiling
> the cmdline sample app using the .pc file was fixed.
> 
> Bruce Richardson (4):
>   examples: install examples as part of ninja install
>   examples: simplify getting list of all examples
>   devtools/test-meson-builds: add testing of pkg-config file
>   build: add libbsd to pkg-config file if enabled
> 
>  config/meson.build            | 10 ++++------
>  devtools/test-meson-builds.sh | 17 +++++++++++++++++
>  examples/meson.build          | 17 +++++++++++++----
>  meson.build                   |  2 ++
>  4 files changed, 36 insertions(+), 10 deletions(-)

Series-acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-26 16:11 ` Luca Boccassi
@ 2019-04-26 16:11   ` Luca Boccassi
  2019-04-26 16:20   ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-04-26 16:11 UTC (permalink / raw)
  To: Bruce Richardson, dev

On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> As part of the meson build, a pkg-config file for libdpdk is created,
> which
> allows apps to be compiled and linked against DPDK by taking the
> cflags and
> lib parameter from pkgconfig. The example app makefiles have been
> reworked
> to take account of this support, but the build of them against the
> .pc file
> was not regularly tested.
> 
> To rectify this, and give us greater confidence in the correctness of
> the
> .pc file, this set adds in the sample apps to the installation set
> for
> "ninja install" and then builds a subset of those apps against the
> pkg-config file to test it. In the process a small error when
> compiling
> the cmdline sample app using the .pc file was fixed.
> 
> Bruce Richardson (4):
>   examples: install examples as part of ninja install
>   examples: simplify getting list of all examples
>   devtools/test-meson-builds: add testing of pkg-config file
>   build: add libbsd to pkg-config file if enabled
> 
>  config/meson.build            | 10 ++++------
>  devtools/test-meson-builds.sh | 17 +++++++++++++++++
>  examples/meson.build          | 17 +++++++++++++----
>  meson.build                   |  2 ++
>  4 files changed, 36 insertions(+), 10 deletions(-)

Series-acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-26 16:11 ` Luca Boccassi
  2019-04-26 16:11   ` Luca Boccassi
@ 2019-04-26 16:20   ` Bruce Richardson
  2019-04-26 16:20     ` Bruce Richardson
  1 sibling, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:20 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Fri, Apr 26, 2019 at 05:11:18PM +0100, Luca Boccassi wrote:
> On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > As part of the meson build, a pkg-config file for libdpdk is created,
> > which
> > allows apps to be compiled and linked against DPDK by taking the
> > cflags and
> > lib parameter from pkgconfig. The example app makefiles have been
> > reworked
> > to take account of this support, but the build of them against the
> > .pc file
> > was not regularly tested.
> > 
> > To rectify this, and give us greater confidence in the correctness of
> > the
> > .pc file, this set adds in the sample apps to the installation set
> > for
> > "ninja install" and then builds a subset of those apps against the
> > pkg-config file to test it. In the process a small error when
> > compiling
> > the cmdline sample app using the .pc file was fixed.
> > 
> > Bruce Richardson (4):
> >   examples: install examples as part of ninja install
> >   examples: simplify getting list of all examples
> >   devtools/test-meson-builds: add testing of pkg-config file
> >   build: add libbsd to pkg-config file if enabled
> > 
> >  config/meson.build            | 10 ++++------
> >  devtools/test-meson-builds.sh | 17 +++++++++++++++++
> >  examples/meson.build          | 17 +++++++++++++----
> >  meson.build                   |  2 ++
> >  4 files changed, 36 insertions(+), 10 deletions(-)
> 
> Series-acked-by: Luca Boccassi <bluca@debian.org>
> 
Thanks. I've actually got a V2 coming soon with some more rework, since I
found some more issues (especially on BSD) as I worked through the changes.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file
  2019-04-26 16:20   ` Bruce Richardson
@ 2019-04-26 16:20     ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:20 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev

On Fri, Apr 26, 2019 at 05:11:18PM +0100, Luca Boccassi wrote:
> On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > As part of the meson build, a pkg-config file for libdpdk is created,
> > which
> > allows apps to be compiled and linked against DPDK by taking the
> > cflags and
> > lib parameter from pkgconfig. The example app makefiles have been
> > reworked
> > to take account of this support, but the build of them against the
> > .pc file
> > was not regularly tested.
> > 
> > To rectify this, and give us greater confidence in the correctness of
> > the
> > .pc file, this set adds in the sample apps to the installation set
> > for
> > "ninja install" and then builds a subset of those apps against the
> > pkg-config file to test it. In the process a small error when
> > compiling
> > the cmdline sample app using the .pc file was fixed.
> > 
> > Bruce Richardson (4):
> >   examples: install examples as part of ninja install
> >   examples: simplify getting list of all examples
> >   devtools/test-meson-builds: add testing of pkg-config file
> >   build: add libbsd to pkg-config file if enabled
> > 
> >  config/meson.build            | 10 ++++------
> >  devtools/test-meson-builds.sh | 17 +++++++++++++++++
> >  examples/meson.build          | 17 +++++++++++++----
> >  meson.build                   |  2 ++
> >  4 files changed, 36 insertions(+), 10 deletions(-)
> 
> Series-acked-by: Luca Boccassi <bluca@debian.org>
> 
Thanks. I've actually got a V2 coming soon with some more rework, since I
found some more issues (especially on BSD) as I worked through the changes.

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 0/6] add testing of libdpdk pkg-config file
  2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
                   ` (6 preceding siblings ...)
  2019-04-26 16:11 ` Luca Boccassi
@ 2019-04-26 16:50 ` Bruce Richardson
  2019-04-26 16:50   ` Bruce Richardson
                     ` (7 more replies)
  7 siblings, 8 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

As part of the meson build, a pkg-config file for libdpdk is created, which
allows apps to be compiled and linked against DPDK by taking the cflags and
lib parameter from pkgconfig. The example app makefiles have been reworked
to take account of this support, but the build of them against the .pc file
was not regularly tested.

To rectify this, and give us greater confidence in the correctness of the
.pc file, this set adds in the sample apps to the installation set for
"ninja install" and then builds a subset of those apps against the
pkg-config file to test it. In the process a small error when compiling
the cmdline sample app using the .pc file was fixed.

V2: Fixed a number of other problems encountered on FreeBSD. Replaced
    patch 2 of the original set, which broke on BSD with patch 6 of this
    set, which is the more correct solution.

Bruce Richardson (6):
  examples/l3fwd: fix compile on freebsd
  examples: install examples as part of ninja install
  build: fix ninja install on FreeBSD
  devtools/test-meson-builds: add testing of pkg-config file
  build: add libbsd to pkg-config file if enabled
  examples: remove auto-generation of examples list

 buildtools/symlink-drivers-solibs.sh |  7 +++--
 config/meson.build                   | 17 ++++++++----
 devtools/test-meson-builds.sh        | 27 ++++++++++++++++++
 examples/l3fwd/l3fwd_lpm.c           |  1 +
 examples/meson.build                 | 41 +++++++++++++++++++++++++---
 meson.build                          |  9 ++----
 6 files changed, 82 insertions(+), 20 deletions(-)

-- 
2.21.0

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 0/6] add testing of libdpdk pkg-config file
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
@ 2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

As part of the meson build, a pkg-config file for libdpdk is created, which
allows apps to be compiled and linked against DPDK by taking the cflags and
lib parameter from pkgconfig. The example app makefiles have been reworked
to take account of this support, but the build of them against the .pc file
was not regularly tested.

To rectify this, and give us greater confidence in the correctness of the
.pc file, this set adds in the sample apps to the installation set for
"ninja install" and then builds a subset of those apps against the
pkg-config file to test it. In the process a small error when compiling
the cmdline sample app using the .pc file was fixed.

V2: Fixed a number of other problems encountered on FreeBSD. Replaced
    patch 2 of the original set, which broke on BSD with patch 6 of this
    set, which is the more correct solution.

Bruce Richardson (6):
  examples/l3fwd: fix compile on freebsd
  examples: install examples as part of ninja install
  build: fix ninja install on FreeBSD
  devtools/test-meson-builds: add testing of pkg-config file
  build: add libbsd to pkg-config file if enabled
  examples: remove auto-generation of examples list

 buildtools/symlink-drivers-solibs.sh |  7 +++--
 config/meson.build                   | 17 ++++++++----
 devtools/test-meson-builds.sh        | 27 ++++++++++++++++++
 examples/l3fwd/l3fwd_lpm.c           |  1 +
 examples/meson.build                 | 41 +++++++++++++++++++++++++---
 meson.build                          |  9 ++----
 6 files changed, 82 insertions(+), 20 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
  2019-04-26 16:50   ` Bruce Richardson
@ 2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
  2019-05-01 10:10     ` Luca Boccassi
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install Bruce Richardson
                     ` (5 subsequent siblings)
  7 siblings, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

On freebsd we need to include sys/socket.h to get the definition of
AF_INET in order to compile.

Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/l3fwd/l3fwd_lpm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 172a036b2..60a00639e 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <getopt.h>
 #include <stdbool.h>
+#include <sys/socket.h>
 #include <arpa/inet.h>
 
 #include <rte_debug.h>
-- 
2.21.0

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
@ 2019-04-26 16:50     ` Bruce Richardson
  2019-05-01 10:10     ` Luca Boccassi
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

On freebsd we need to include sys/socket.h to get the definition of
AF_INET in order to compile.

Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/l3fwd/l3fwd_lpm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 172a036b2..60a00639e 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <getopt.h>
 #include <stdbool.h>
+#include <sys/socket.h>
 #include <arpa/inet.h>
 
 #include <rte_debug.h>
-- 
2.21.0


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
  2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
@ 2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD Bruce Richardson
                     ` (4 subsequent siblings)
  7 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

When we install dpdk onto a system, we want to put the examples into
the /usr/share/dpdk (or /usr/local/share) directory for reference.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index e4babf6bf..1a6134f12 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,12 +8,20 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-allow_skips = true # don't flag an error if we can't build an app
+all_examples = run_command('sh', '-c',
+	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+	).stdout().split()
+# 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').to_lower() == 'all'
-	dirs = run_command('sh', '-c',
-		'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done')
-	examples = dirs.stdout().split()
+	examples = all_examples
+	allow_skips = true # don't flag an error if we can't build an app
 else
 	examples = get_option('examples').split(',')
 	allow_skips = false # error out if we can't build a requested app
-- 
2.21.0

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install Bruce Richardson
@ 2019-04-26 16:50     ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

When we install dpdk onto a system, we want to put the examples into
the /usr/share/dpdk (or /usr/local/share) directory for reference.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index e4babf6bf..1a6134f12 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,12 +8,20 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-allow_skips = true # don't flag an error if we can't build an app
+all_examples = run_command('sh', '-c',
+	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+	).stdout().split()
+# 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').to_lower() == 'all'
-	dirs = run_command('sh', '-c',
-		'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done')
-	examples = dirs.stdout().split()
+	examples = all_examples
+	allow_skips = true # don't flag an error if we can't build an app
 else
 	examples = get_option('examples').split(',')
 	allow_skips = false # error out if we can't build a requested app
-- 
2.21.0


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
                     ` (2 preceding siblings ...)
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install Bruce Richardson
@ 2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
  2019-05-01 10:10     ` Luca Boccassi
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
                     ` (3 subsequent siblings)
  7 siblings, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/symlink-drivers-solibs.sh | 7 ++++---
 config/meson.build                   | 7 +++++++
 meson.build                          | 7 -------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh
index 9826c6ae3..42985e855 100644
--- a/buildtools/symlink-drivers-solibs.sh
+++ b/buildtools/symlink-drivers-solibs.sh
@@ -7,6 +7,7 @@
 # others, e.g. PCI device PMDs depending on the PCI bus driver.
 
 # parameters to script are paths relative to install prefix:
-# 1. directory containing driver files e.g. lib64/dpdk/drivers
-# 2. directory for installed regular libs e.g. lib64
-ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2
+# 1. directory for installed regular libs e.g. lib64
+# 2. subdirectory of libdir where the pmds are
+
+cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* .
diff --git a/config/meson.build b/config/meson.build
index f8aded6ed..3678348de 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -42,6 +42,13 @@ endif
 driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
 eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+		get_option('libdir'),
+		pmd_subdir_opt)
+
 # set the machine type and cflags for it
 if meson.is_cross_build()
 	machine = host_machine.cpu()
diff --git a/meson.build b/meson.build
index a96486597..d1e8e5239 100644
--- a/meson.build
+++ b/meson.build
@@ -63,13 +63,6 @@ configure_file(output: build_cfg,
 # them.
 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
 
-# driver .so files often depend upon the bus drivers for their connect bus,
-# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
-# to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('buildtools/symlink-drivers-solibs.sh',
-		driver_install_path,
-		get_option('libdir'))
-
 pkg = import('pkgconfig')
 pkg.generate(name: meson.project_name(),
 	filebase: 'lib' + meson.project_name().to_lower(),
-- 
2.21.0

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD Bruce Richardson
@ 2019-04-26 16:50     ` Bruce Richardson
  2019-05-01 10:10     ` Luca Boccassi
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/symlink-drivers-solibs.sh | 7 ++++---
 config/meson.build                   | 7 +++++++
 meson.build                          | 7 -------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh
index 9826c6ae3..42985e855 100644
--- a/buildtools/symlink-drivers-solibs.sh
+++ b/buildtools/symlink-drivers-solibs.sh
@@ -7,6 +7,7 @@
 # others, e.g. PCI device PMDs depending on the PCI bus driver.
 
 # parameters to script are paths relative to install prefix:
-# 1. directory containing driver files e.g. lib64/dpdk/drivers
-# 2. directory for installed regular libs e.g. lib64
-ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2
+# 1. directory for installed regular libs e.g. lib64
+# 2. subdirectory of libdir where the pmds are
+
+cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* .
diff --git a/config/meson.build b/config/meson.build
index f8aded6ed..3678348de 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -42,6 +42,13 @@ endif
 driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
 eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+		get_option('libdir'),
+		pmd_subdir_opt)
+
 # set the machine type and cflags for it
 if meson.is_cross_build()
 	machine = host_machine.cpu()
diff --git a/meson.build b/meson.build
index a96486597..d1e8e5239 100644
--- a/meson.build
+++ b/meson.build
@@ -63,13 +63,6 @@ configure_file(output: build_cfg,
 # them.
 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
 
-# driver .so files often depend upon the bus drivers for their connect bus,
-# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
-# to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('buildtools/symlink-drivers-solibs.sh',
-		driver_install_path,
-		get_option('libdir'))
-
 pkg = import('pkgconfig')
 pkg.generate(name: meson.project_name(),
 	filebase: 'lib' + meson.project_name().to_lower(),
-- 
2.21.0


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
                     ` (3 preceding siblings ...)
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD Bruce Richardson
@ 2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
  2019-05-02 12:38     ` Thomas Monjalon
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled Bruce Richardson
                     ` (2 subsequent siblings)
  7 siblings, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

The pkg-config file generated as part of the build of DPDK should allow
applications to be built with an installed DPDK. We can test this as
part of the build by doing an install of DPDK to a temporary directory
within the build folder, and by then compiling up a few sample apps
using make working off that directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 devtools/test-meson-builds.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 630a1a6fe..73f993b98 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/..
 MESON=${MESON:-meson}
 use_shared="--default-library=shared"
 
+if command -v gmake >/dev/null 2>&1 ; then
+	MAKE=gmake
+else
+	MAKE=make
+fi
 if command -v ninja >/dev/null 2>&1 ; then
 	ninja_cmd=ninja
 elif command -v ninja-build >/dev/null 2>&1 ; then
@@ -90,3 +95,25 @@ if command -v $c >/dev/null 2>&1 ; then
 			$use_shared --cross-file $f
 	done
 fi
+
+##############
+# Test installation of the x86-default target, to be used for checking
+# the sample apps build using the pkg-config file for cflags and libs
+###############
+build_path=build-x86-default
+DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
+$ninja_cmd -C $build_path install
+
+pc_file=$(find $DESTDIR -name libdpdk.pc)
+PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
+
+# rather than hacking our environment, just edit the .pc file prefix value
+sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
+
+for example in helloworld l2fwd l3fwd skeleton timer; do
+	echo "## Building $example"
+	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
+done
+
+echo ""
+echo "## $0: Completed OK"
-- 
2.21.0

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
@ 2019-04-26 16:50     ` Bruce Richardson
  2019-05-02 12:38     ` Thomas Monjalon
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

The pkg-config file generated as part of the build of DPDK should allow
applications to be built with an installed DPDK. We can test this as
part of the build by doing an install of DPDK to a temporary directory
within the build folder, and by then compiling up a few sample apps
using make working off that directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 devtools/test-meson-builds.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 630a1a6fe..73f993b98 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/..
 MESON=${MESON:-meson}
 use_shared="--default-library=shared"
 
+if command -v gmake >/dev/null 2>&1 ; then
+	MAKE=gmake
+else
+	MAKE=make
+fi
 if command -v ninja >/dev/null 2>&1 ; then
 	ninja_cmd=ninja
 elif command -v ninja-build >/dev/null 2>&1 ; then
@@ -90,3 +95,25 @@ if command -v $c >/dev/null 2>&1 ; then
 			$use_shared --cross-file $f
 	done
 fi
+
+##############
+# Test installation of the x86-default target, to be used for checking
+# the sample apps build using the pkg-config file for cflags and libs
+###############
+build_path=build-x86-default
+DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
+$ninja_cmd -C $build_path install
+
+pc_file=$(find $DESTDIR -name libdpdk.pc)
+PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
+
+# rather than hacking our environment, just edit the .pc file prefix value
+sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
+
+for example in helloworld l2fwd l3fwd skeleton timer; do
+	echo "## Building $example"
+	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
+done
+
+echo ""
+echo "## $0: Completed OK"
-- 
2.21.0


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
                     ` (4 preceding siblings ...)
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
@ 2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list Bruce Richardson
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
  7 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.

To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.

To verify this builds correctly, the cmdline sample app is added to the
list of examples compiled by test-meson-builds. Without this change
compilation fails if libbsd is present on the system

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/meson.build            | 10 ++++------
 devtools/test-meson-builds.sh |  2 +-
 meson.build                   |  2 ++
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 3678348de..0d25646f5 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -132,12 +132,10 @@ if numa_dep.found() and cc.has_header('numaif.h')
 	dpdk_extra_ldflags += '-lnuma'
 endif
 
-# check for strlcpy
-if is_linux
-	libbsd = dependency('libbsd', required: false)
-	if libbsd.found()
-		dpdk_conf.set('RTE_USE_LIBBSD', 1)
-	endif
+# check for libbsd
+libbsd = dependency('libbsd', required: false)
+if libbsd.found()
+	dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
 # add -include rte_config to cflags
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 73f993b98..a9fdce81f 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -110,7 +110,7 @@ PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
 # rather than hacking our environment, just edit the .pc file prefix value
 sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
 
-for example in helloworld l2fwd l3fwd skeleton timer; do
+for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
 	echo "## Building $example"
 	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
 done
diff --git a/meson.build b/meson.build
index d1e8e5239..46f9c5683 100644
--- a/meson.build
+++ b/meson.build
@@ -70,6 +70,8 @@ pkg.generate(name: meson.project_name(),
 	libraries: dpdk_libraries,
 	libraries_private: dpdk_drivers + dpdk_static_libraries +
 			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
+	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
+	                  # if libbsd is not enabled, then this is blank
 	description: '''The Data Plane Development Kit (DPDK).
 Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
-- 
2.21.0

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled Bruce Richardson
@ 2019-04-26 16:50     ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.

To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.

To verify this builds correctly, the cmdline sample app is added to the
list of examples compiled by test-meson-builds. Without this change
compilation fails if libbsd is present on the system

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/meson.build            | 10 ++++------
 devtools/test-meson-builds.sh |  2 +-
 meson.build                   |  2 ++
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 3678348de..0d25646f5 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -132,12 +132,10 @@ if numa_dep.found() and cc.has_header('numaif.h')
 	dpdk_extra_ldflags += '-lnuma'
 endif
 
-# check for strlcpy
-if is_linux
-	libbsd = dependency('libbsd', required: false)
-	if libbsd.found()
-		dpdk_conf.set('RTE_USE_LIBBSD', 1)
-	endif
+# check for libbsd
+libbsd = dependency('libbsd', required: false)
+if libbsd.found()
+	dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
 # add -include rte_config to cflags
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 73f993b98..a9fdce81f 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -110,7 +110,7 @@ PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
 # rather than hacking our environment, just edit the .pc file prefix value
 sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
 
-for example in helloworld l2fwd l3fwd skeleton timer; do
+for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
 	echo "## Building $example"
 	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
 done
diff --git a/meson.build b/meson.build
index d1e8e5239..46f9c5683 100644
--- a/meson.build
+++ b/meson.build
@@ -70,6 +70,8 @@ pkg.generate(name: meson.project_name(),
 	libraries: dpdk_libraries,
 	libraries_private: dpdk_drivers + dpdk_static_libraries +
 			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
+	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
+	                  # if libbsd is not enabled, then this is blank
 	description: '''The Data Plane Development Kit (DPDK).
 Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
-- 
2.21.0


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
                     ` (5 preceding siblings ...)
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled Bruce Richardson
@ 2019-04-26 16:50   ` Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
  2019-05-01 10:10     ` Luca Boccassi
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
  7 siblings, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

The examples/meson.build file scanned the filesystem to find all examples
to build (for examples=all option) and install. However, using run_command
and scanning the filesystem prevented ninja from properly detecting the
addition or removal of any examples - one had to recreate the build
directory from scratch to guarantee correct detection of all examples. This
patch replaces this generated list with a static list of examples, thereby
allowing proper tracking by ninja/meson, but at the cost of having to
update this file when a new example is added or removed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 1a6134f12..8b6577cf7 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,9 +8,34 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-all_examples = run_command('sh', '-c',
-	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
-	).stdout().split()
+# list of all example apps. Keep 1-3 per line, in alphabetical order.
+all_examples = [
+	'bbdev_app', 'bond',
+	'bpf', 'cmdline',
+	'distributor', 'ethtool',
+	'eventdev_pipeline', 'exception_path',
+	'fips_validation', 'flow_classify',
+	'flow_filtering', 'helloworld',
+	'ip_fragmentation', 'ip_pipeline',
+	'ip_reassembly', 'ipsec-secgw',
+	'ipv4_multicast', 'kni',
+	'l2fwd', 'l2fwd-cat',
+	'l2fwd-crypto', 'l2fwd-jobstats',
+	'l2fwd-keepalive', 'l3fwd',
+	'l3fwd-acl', 'l3fwd-power',
+	'l3fwd-vf', 'link_status_interrupt',
+	'load_balancer', 'multi_process',
+	'netmap_compat', 'packet_ordering',
+	'performance-thread', 'ptpclient',
+	'qos_meter', 'qos_sched',
+	'quota_watermark', 'rxtx_callbacks',
+	'server_node_efd', 'service_cores',
+	'skeleton', 'tep_termination',
+	'timer', 'vdpa',
+	'vhost', 'vhost_crypto',
+	'vhost_scsi', 'vm_power_manager',
+	'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
-- 
2.21.0

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list Bruce Richardson
@ 2019-04-26 16:50     ` Bruce Richardson
  2019-05-01 10:10     ` Luca Boccassi
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-04-26 16:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, bluca, Bruce Richardson

The examples/meson.build file scanned the filesystem to find all examples
to build (for examples=all option) and install. However, using run_command
and scanning the filesystem prevented ninja from properly detecting the
addition or removal of any examples - one had to recreate the build
directory from scratch to guarantee correct detection of all examples. This
patch replaces this generated list with a static list of examples, thereby
allowing proper tracking by ninja/meson, but at the cost of having to
update this file when a new example is added or removed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 1a6134f12..8b6577cf7 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,9 +8,34 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-all_examples = run_command('sh', '-c',
-	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
-	).stdout().split()
+# list of all example apps. Keep 1-3 per line, in alphabetical order.
+all_examples = [
+	'bbdev_app', 'bond',
+	'bpf', 'cmdline',
+	'distributor', 'ethtool',
+	'eventdev_pipeline', 'exception_path',
+	'fips_validation', 'flow_classify',
+	'flow_filtering', 'helloworld',
+	'ip_fragmentation', 'ip_pipeline',
+	'ip_reassembly', 'ipsec-secgw',
+	'ipv4_multicast', 'kni',
+	'l2fwd', 'l2fwd-cat',
+	'l2fwd-crypto', 'l2fwd-jobstats',
+	'l2fwd-keepalive', 'l3fwd',
+	'l3fwd-acl', 'l3fwd-power',
+	'l3fwd-vf', 'link_status_interrupt',
+	'load_balancer', 'multi_process',
+	'netmap_compat', 'packet_ordering',
+	'performance-thread', 'ptpclient',
+	'qos_meter', 'qos_sched',
+	'quota_watermark', 'rxtx_callbacks',
+	'server_node_efd', 'service_cores',
+	'skeleton', 'tep_termination',
+	'timer', 'vdpa',
+	'vhost', 'vhost_crypto',
+	'vhost_scsi', 'vm_power_manager',
+	'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
-- 
2.21.0


^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
@ 2019-05-01 10:10     ` Luca Boccassi
  2019-05-01 10:10       ` Luca Boccassi
  1 sibling, 1 reply; 88+ messages in thread
From: Luca Boccassi @ 2019-05-01 10:10 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas

On Fri, 2019-04-26 at 17:50 +0100, Bruce Richardson wrote:
> On freebsd we need to include sys/socket.h to get the definition of
> AF_INET in order to compile.
> 
> Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for
> printing")
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  examples/l3fwd/l3fwd_lpm.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD
  2019-05-01 10:10     ` Luca Boccassi
@ 2019-05-01 10:10       ` Luca Boccassi
  0 siblings, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-05-01 10:10 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas

On Fri, 2019-04-26 at 17:50 +0100, Bruce Richardson wrote:
> On freebsd we need to include sys/socket.h to get the definition of
> AF_INET in order to compile.
> 
> Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for
> printing")
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  examples/l3fwd/l3fwd_lpm.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
@ 2019-05-01 10:10     ` Luca Boccassi
  2019-05-01 10:10       ` Luca Boccassi
  1 sibling, 1 reply; 88+ messages in thread
From: Luca Boccassi @ 2019-05-01 10:10 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas

On Fri, 2019-04-26 at 17:50 +0100, Bruce Richardson wrote:
> The post-install script to symlink the PMDs from their own PMD
> directory to
> the regular lib directory (so they would be found by ld at runtime)
> was
> using the "-r" flag to ln to create relative symlinks. This flag is
> unsupported by ln on FreeBSD causing the ninja install step to fail.
> 
> Reworking the script to take the relative driver path as parameter
> removes
> the need for ln to calculate the relative path ensuring compatibility
> with
> FreeBSD.
> 
> As part of the fix, we move the registration of the install script to
> the
> config/meson.build file, from the top level one. This improves
> readability
> as the script takes as parameters the variables set in that file.
> 
> Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  buildtools/symlink-drivers-solibs.sh | 7 ++++---
>  config/meson.build                   | 7 +++++++
>  meson.build                          | 7 -------
>  3 files changed, 11 insertions(+), 10 deletions(-)

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD
  2019-05-01 10:10     ` Luca Boccassi
@ 2019-05-01 10:10       ` Luca Boccassi
  0 siblings, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-05-01 10:10 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas

On Fri, 2019-04-26 at 17:50 +0100, Bruce Richardson wrote:
> The post-install script to symlink the PMDs from their own PMD
> directory to
> the regular lib directory (so they would be found by ld at runtime)
> was
> using the "-r" flag to ln to create relative symlinks. This flag is
> unsupported by ln on FreeBSD causing the ninja install step to fail.
> 
> Reworking the script to take the relative driver path as parameter
> removes
> the need for ln to calculate the relative path ensuring compatibility
> with
> FreeBSD.
> 
> As part of the fix, we move the registration of the install script to
> the
> config/meson.build file, from the top level one. This improves
> readability
> as the script takes as parameters the variables set in that file.
> 
> Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  buildtools/symlink-drivers-solibs.sh | 7 ++++---
>  config/meson.build                   | 7 +++++++
>  meson.build                          | 7 -------
>  3 files changed, 11 insertions(+), 10 deletions(-)

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
@ 2019-05-01 10:10     ` Luca Boccassi
  2019-05-01 10:10       ` Luca Boccassi
  1 sibling, 1 reply; 88+ messages in thread
From: Luca Boccassi @ 2019-05-01 10:10 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas

On Fri, 2019-04-26 at 17:50 +0100, Bruce Richardson wrote:
> The examples/meson.build file scanned the filesystem to find all
> examples
> to build (for examples=all option) and install. However, using
> run_command
> and scanning the filesystem prevented ninja from properly detecting
> the
> addition or removal of any examples - one had to recreate the build
> directory from scratch to guarantee correct detection of all
> examples. This
> patch replaces this generated list with a static list of examples,
> thereby
> allowing proper tracking by ninja/meson, but at the cost of having to
> update this file when a new example is added or removed.
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  examples/meson.build | 31 ++++++++++++++++++++++++++++---
>  1 file changed, 28 insertions(+), 3 deletions(-)

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list
  2019-05-01 10:10     ` Luca Boccassi
@ 2019-05-01 10:10       ` Luca Boccassi
  0 siblings, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-05-01 10:10 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas

On Fri, 2019-04-26 at 17:50 +0100, Bruce Richardson wrote:
> The examples/meson.build file scanned the filesystem to find all
> examples
> to build (for examples=all option) and install. However, using
> run_command
> and scanning the filesystem prevented ninja from properly detecting
> the
> addition or removal of any examples - one had to recreate the build
> directory from scratch to guarantee correct detection of all
> examples. This
> patch replaces this generated list with a static list of examples,
> thereby
> allowing proper tracking by ninja/meson, but at the cost of having to
> update this file when a new example is added or removed.
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  examples/meson.build | 31 ++++++++++++++++++++++++++++---
>  1 file changed, 28 insertions(+), 3 deletions(-)

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
  2019-04-26 16:50     ` Bruce Richardson
@ 2019-05-02 12:38     ` Thomas Monjalon
  2019-05-02 12:38       ` Thomas Monjalon
                         ` (2 more replies)
  1 sibling, 3 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 12:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, bluca

Hi,

I will probably have a ton of comments about adding a new compilation tests,
and I think it is a bit late for such an addition.
However, all the fixes should go in 19.05.

26/04/2019 18:50, Bruce Richardson:
> The pkg-config file generated as part of the build of DPDK should allow
> applications to be built with an installed DPDK. We can test this as
> part of the build by doing an install of DPDK to a temporary directory
> within the build folder, and by then compiling up a few sample apps
> using make working off that directory.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Luca Boccassi <bluca@debian.org>
> ---
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> +##############
> +# Test installation of the x86-default target, to be used for checking
> +# the sample apps build using the pkg-config file for cflags and libs
> +###############

I would prefer simpler comment formatting.
It makes this test very special.

> +build_path=build-x86-default
> +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR

export DESTDIR=... is not supported everywhere?
I prefer new shell substitution syntax $() instead of backquotes.

> +$ninja_cmd -C $build_path install
> +
> +pc_file=$(find $DESTDIR -name libdpdk.pc)
> +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> +
> +# rather than hacking our environment, just edit the .pc file prefix value
> +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file

What is the alternative?
Cannot we configure meson with the right prefix?

> +for example in helloworld l2fwd l3fwd skeleton timer; do
> +	echo "## Building $example"
> +	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
> +done
> +
> +echo ""
> +echo "## $0: Completed OK"

This last log is uncommon.

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 12:38     ` Thomas Monjalon
@ 2019-05-02 12:38       ` Thomas Monjalon
  2019-05-02 12:54       ` Luca Boccassi
  2019-05-02 13:21       ` Bruce Richardson
  2 siblings, 0 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 12:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, bluca

Hi,

I will probably have a ton of comments about adding a new compilation tests,
and I think it is a bit late for such an addition.
However, all the fixes should go in 19.05.

26/04/2019 18:50, Bruce Richardson:
> The pkg-config file generated as part of the build of DPDK should allow
> applications to be built with an installed DPDK. We can test this as
> part of the build by doing an install of DPDK to a temporary directory
> within the build folder, and by then compiling up a few sample apps
> using make working off that directory.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Luca Boccassi <bluca@debian.org>
> ---
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> +##############
> +# Test installation of the x86-default target, to be used for checking
> +# the sample apps build using the pkg-config file for cflags and libs
> +###############

I would prefer simpler comment formatting.
It makes this test very special.

> +build_path=build-x86-default
> +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR

export DESTDIR=... is not supported everywhere?
I prefer new shell substitution syntax $() instead of backquotes.

> +$ninja_cmd -C $build_path install
> +
> +pc_file=$(find $DESTDIR -name libdpdk.pc)
> +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> +
> +# rather than hacking our environment, just edit the .pc file prefix value
> +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file

What is the alternative?
Cannot we configure meson with the right prefix?

> +for example in helloworld l2fwd l3fwd skeleton timer; do
> +	echo "## Building $example"
> +	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
> +done
> +
> +echo ""
> +echo "## $0: Completed OK"

This last log is uncommon.



^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 12:38     ` Thomas Monjalon
  2019-05-02 12:38       ` Thomas Monjalon
@ 2019-05-02 12:54       ` Luca Boccassi
  2019-05-02 12:54         ` Luca Boccassi
  2019-05-02 13:21       ` Bruce Richardson
  2 siblings, 1 reply; 88+ messages in thread
From: Luca Boccassi @ 2019-05-02 12:54 UTC (permalink / raw)
  To: Thomas Monjalon, Bruce Richardson; +Cc: dev

On Thu, 2019-05-02 at 14:38 +0200, Thomas Monjalon wrote:
> > +$ninja_cmd -C $build_path install
> > +
> > +pc_file=$(find $DESTDIR -name libdpdk.pc)
> > +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> > +
> > +# rather than hacking our environment, just edit the .pc file
> > prefix value
> > +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
> 
> What is the alternative?
> Cannot we configure meson with the right prefix?

Please see the email exchange between myself and Bruce on v1 3/4 - the
short version is that it can, but it gets messy due to the kernel
modules.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 12:54       ` Luca Boccassi
@ 2019-05-02 12:54         ` Luca Boccassi
  0 siblings, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-05-02 12:54 UTC (permalink / raw)
  To: Thomas Monjalon, Bruce Richardson; +Cc: dev

On Thu, 2019-05-02 at 14:38 +0200, Thomas Monjalon wrote:
> > +$ninja_cmd -C $build_path install
> > +
> > +pc_file=$(find $DESTDIR -name libdpdk.pc)
> > +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> > +
> > +# rather than hacking our environment, just edit the .pc file
> > prefix value
> > +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
> 
> What is the alternative?
> Cannot we configure meson with the right prefix?

Please see the email exchange between myself and Bruce on v1 3/4 - the
short version is that it can, but it gets messy due to the kernel
modules.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-04-26 14:56             ` Bruce Richardson
  2019-04-26 14:56               ` Bruce Richardson
  2019-04-26 16:10               ` Luca Boccassi
@ 2019-05-02 13:11               ` Thomas Monjalon
  2019-05-02 13:11                 ` Thomas Monjalon
  2019-05-02 13:17                 ` Bruce Richardson
  2 siblings, 2 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 13:11 UTC (permalink / raw)
  To: Bruce Richardson, Luca Boccassi; +Cc: dev

26/04/2019 16:56, Bruce Richardson:
> On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > > +#
> > > > > > > rather
> > > > > > > than hacking our environment, just edit the .pc file prefix
> > > > > > > value
> > > > > > > +sed
> > > > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > 
> > > > > > What about just using meson's prefix option instead? Which is
> > > > > > how
> > > > > > it
> > > > > > would be used in a real use case
> > > > > 
> > > > > I don't think that would fully work, as my understanding is that
> > > > > the
> > > > > prefix
> > > > > option would apply only to the /usr/local parts, but not to the
> > > > > kernel
> > > > > modules which would still try and install in /lib/.
> > > > 
> > > > What about doing a meson configure -Denable_kmods=false before the
> > > > ninja install? The modules are not needed for that test anyway,
> > > > right?
> > > > Alternatively, the kernel src dir could be symlinked in the build
> > > > path,
> > > > and the kernel_dir option could be used
> > > > 
> > > > I'm just worried that the test should be as "realistic" as
> > > > possible, to
> > > > avoid missing something
> > > 
> > > Yes, I did think of that too, but it does mean doing another
> > > configuration
> > > run in meson, and possibly a rebuild too if the rte_build_config.h
> > > file
> > > changes. Therefore I decided to use DESTDIR for the sake of speed
> > > here. I
> > > assumed there would be a pkg-config variable to adjust the output
> > > paths
> > > based on a sysroot, but couldn't find a suitable one.
[...]
> > 
> > There actually is a pkg-config binary option, I just tried and it works
> > (it seems to be disabled by default on Debian and derivatives): --
> > define-prefix
> > 
> Any cmdline options to pkg-config don't solve the problem here as it means
> that the makefiles for any app need to be modified to use all those.

It looks to be a good solution.
Being able to update the DPDK install directory when building
an application should be a mandatory requirement.
I suggest to wrap the call to pkg-config so we can have this ability.

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 13:11               ` Thomas Monjalon
@ 2019-05-02 13:11                 ` Thomas Monjalon
  2019-05-02 13:17                 ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 13:11 UTC (permalink / raw)
  To: Bruce Richardson, Luca Boccassi; +Cc: dev

26/04/2019 16:56, Bruce Richardson:
> On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > > +#
> > > > > > > rather
> > > > > > > than hacking our environment, just edit the .pc file prefix
> > > > > > > value
> > > > > > > +sed
> > > > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > 
> > > > > > What about just using meson's prefix option instead? Which is
> > > > > > how
> > > > > > it
> > > > > > would be used in a real use case
> > > > > 
> > > > > I don't think that would fully work, as my understanding is that
> > > > > the
> > > > > prefix
> > > > > option would apply only to the /usr/local parts, but not to the
> > > > > kernel
> > > > > modules which would still try and install in /lib/.
> > > > 
> > > > What about doing a meson configure -Denable_kmods=false before the
> > > > ninja install? The modules are not needed for that test anyway,
> > > > right?
> > > > Alternatively, the kernel src dir could be symlinked in the build
> > > > path,
> > > > and the kernel_dir option could be used
> > > > 
> > > > I'm just worried that the test should be as "realistic" as
> > > > possible, to
> > > > avoid missing something
> > > 
> > > Yes, I did think of that too, but it does mean doing another
> > > configuration
> > > run in meson, and possibly a rebuild too if the rte_build_config.h
> > > file
> > > changes. Therefore I decided to use DESTDIR for the sake of speed
> > > here. I
> > > assumed there would be a pkg-config variable to adjust the output
> > > paths
> > > based on a sysroot, but couldn't find a suitable one.
[...]
> > 
> > There actually is a pkg-config binary option, I just tried and it works
> > (it seems to be disabled by default on Debian and derivatives): --
> > define-prefix
> > 
> Any cmdline options to pkg-config don't solve the problem here as it means
> that the makefiles for any app need to be modified to use all those.

It looks to be a good solution.
Being able to update the DPDK install directory when building
an application should be a mandatory requirement.
I suggest to wrap the call to pkg-config so we can have this ability.




^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 13:11               ` Thomas Monjalon
  2019-05-02 13:11                 ` Thomas Monjalon
@ 2019-05-02 13:17                 ` Bruce Richardson
  2019-05-02 13:17                   ` Bruce Richardson
  2019-05-02 14:08                   ` Luca Boccassi
  1 sibling, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 13:17 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dev

On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> 26/04/2019 16:56, Bruce Richardson:
> > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > > > +#
> > > > > > > > rather
> > > > > > > > than hacking our environment, just edit the .pc file prefix
> > > > > > > > value
> > > > > > > > +sed
> > > > > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > 
> > > > > > > What about just using meson's prefix option instead? Which is
> > > > > > > how
> > > > > > > it
> > > > > > > would be used in a real use case
> > > > > > 
> > > > > > I don't think that would fully work, as my understanding is that
> > > > > > the
> > > > > > prefix
> > > > > > option would apply only to the /usr/local parts, but not to the
> > > > > > kernel
> > > > > > modules which would still try and install in /lib/.
> > > > > 
> > > > > What about doing a meson configure -Denable_kmods=false before the
> > > > > ninja install? The modules are not needed for that test anyway,
> > > > > right?
> > > > > Alternatively, the kernel src dir could be symlinked in the build
> > > > > path,
> > > > > and the kernel_dir option could be used
> > > > > 
> > > > > I'm just worried that the test should be as "realistic" as
> > > > > possible, to
> > > > > avoid missing something
> > > > 
> > > > Yes, I did think of that too, but it does mean doing another
> > > > configuration
> > > > run in meson, and possibly a rebuild too if the rte_build_config.h
> > > > file
> > > > changes. Therefore I decided to use DESTDIR for the sake of speed
> > > > here. I
> > > > assumed there would be a pkg-config variable to adjust the output
> > > > paths
> > > > based on a sysroot, but couldn't find a suitable one.
> [...]
> > > 
> > > There actually is a pkg-config binary option, I just tried and it works
> > > (it seems to be disabled by default on Debian and derivatives): --
> > > define-prefix
> > > 
> > Any cmdline options to pkg-config don't solve the problem here as it means
> > that the makefiles for any app need to be modified to use all those.
> 
> It looks to be a good solution.
> Being able to update the DPDK install directory when building
> an application should be a mandatory requirement.
> I suggest to wrap the call to pkg-config so we can have this ability.
> 

I would have expected that this issue has already been solved for
packagers. I was surprised that I couldn't find an easy way to do so.

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 13:17                 ` Bruce Richardson
@ 2019-05-02 13:17                   ` Bruce Richardson
  2019-05-02 14:08                   ` Luca Boccassi
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 13:17 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dev

On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> 26/04/2019 16:56, Bruce Richardson:
> > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi wrote:
> > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi wrote:
> > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson wrote:
> > > > > > > > +#
> > > > > > > > rather
> > > > > > > > than hacking our environment, just edit the .pc file prefix
> > > > > > > > value
> > > > > > > > +sed
> > > > > > > > -i "s|prefix=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > 
> > > > > > > What about just using meson's prefix option instead? Which is
> > > > > > > how
> > > > > > > it
> > > > > > > would be used in a real use case
> > > > > > 
> > > > > > I don't think that would fully work, as my understanding is that
> > > > > > the
> > > > > > prefix
> > > > > > option would apply only to the /usr/local parts, but not to the
> > > > > > kernel
> > > > > > modules which would still try and install in /lib/.
> > > > > 
> > > > > What about doing a meson configure -Denable_kmods=false before the
> > > > > ninja install? The modules are not needed for that test anyway,
> > > > > right?
> > > > > Alternatively, the kernel src dir could be symlinked in the build
> > > > > path,
> > > > > and the kernel_dir option could be used
> > > > > 
> > > > > I'm just worried that the test should be as "realistic" as
> > > > > possible, to
> > > > > avoid missing something
> > > > 
> > > > Yes, I did think of that too, but it does mean doing another
> > > > configuration
> > > > run in meson, and possibly a rebuild too if the rte_build_config.h
> > > > file
> > > > changes. Therefore I decided to use DESTDIR for the sake of speed
> > > > here. I
> > > > assumed there would be a pkg-config variable to adjust the output
> > > > paths
> > > > based on a sysroot, but couldn't find a suitable one.
> [...]
> > > 
> > > There actually is a pkg-config binary option, I just tried and it works
> > > (it seems to be disabled by default on Debian and derivatives): --
> > > define-prefix
> > > 
> > Any cmdline options to pkg-config don't solve the problem here as it means
> > that the makefiles for any app need to be modified to use all those.
> 
> It looks to be a good solution.
> Being able to update the DPDK install directory when building
> an application should be a mandatory requirement.
> I suggest to wrap the call to pkg-config so we can have this ability.
> 

I would have expected that this issue has already been solved for
packagers. I was surprised that I couldn't find an easy way to do so.


^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 12:38     ` Thomas Monjalon
  2019-05-02 12:38       ` Thomas Monjalon
  2019-05-02 12:54       ` Luca Boccassi
@ 2019-05-02 13:21       ` Bruce Richardson
  2019-05-02 13:21         ` Bruce Richardson
  2019-05-02 13:57         ` Thomas Monjalon
  2 siblings, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 13:21 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, bluca

On Thu, May 02, 2019 at 02:38:49PM +0200, Thomas Monjalon wrote:
> Hi,
> 
> I will probably have a ton of comments about adding a new compilation tests,
> and I think it is a bit late for such an addition.
> However, all the fixes should go in 19.05.
> 
> 26/04/2019 18:50, Bruce Richardson:
> > The pkg-config file generated as part of the build of DPDK should allow
> > applications to be built with an installed DPDK. We can test this as
> > part of the build by doing an install of DPDK to a temporary directory
> > within the build folder, and by then compiling up a few sample apps
> > using make working off that directory.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > Acked-by: Luca Boccassi <bluca@debian.org>
> > ---
> > --- a/devtools/test-meson-builds.sh
> > +++ b/devtools/test-meson-builds.sh
> > +##############
> > +# Test installation of the x86-default target, to be used for checking
> > +# the sample apps build using the pkg-config file for cflags and libs
> > +###############
> 
> I would prefer simpler comment formatting.
> It makes this test very special.

Your comment implies that it is not :-)
Sure, I can reduce the highlighting.

> 
> > +build_path=build-x86-default
> > +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
> 
> export DESTDIR=... is not supported everywhere?

No 100% sure, so left it like this just in case.

> I prefer new shell substitution syntax $() instead of backquotes.
> 
Sure, I agree it's more readable.

> > +$ninja_cmd -C $build_path install
> > +
> > +pc_file=$(find $DESTDIR -name libdpdk.pc)
> > +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> > +
> > +# rather than hacking our environment, just edit the .pc file prefix value
> > +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
> 
> What is the alternative?
> Cannot we configure meson with the right prefix?
> 

See previous discussion.
Short answer, yes we can, but the prefix does not apply to kernel modules
as they always install in /lib/modules folder.

> > +for example in helloworld l2fwd l3fwd skeleton timer; do
> > +	echo "## Building $example"
> > +	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
> > +done
> > +
> > +echo ""
> > +echo "## $0: Completed OK"
> 
> This last log is uncommon.
> 
Yes, it is. However, due to parallelism, sometimes there is an error
message printed out that scrolls off-screen as the other build processes
come to a halt. I felt it worthwhile to add this at the end to ensure it
was clear whether things succeeded or not. If you prefer, I can change it
to a print on failure?

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 13:21       ` Bruce Richardson
@ 2019-05-02 13:21         ` Bruce Richardson
  2019-05-02 13:57         ` Thomas Monjalon
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 13:21 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, bluca

On Thu, May 02, 2019 at 02:38:49PM +0200, Thomas Monjalon wrote:
> Hi,
> 
> I will probably have a ton of comments about adding a new compilation tests,
> and I think it is a bit late for such an addition.
> However, all the fixes should go in 19.05.
> 
> 26/04/2019 18:50, Bruce Richardson:
> > The pkg-config file generated as part of the build of DPDK should allow
> > applications to be built with an installed DPDK. We can test this as
> > part of the build by doing an install of DPDK to a temporary directory
> > within the build folder, and by then compiling up a few sample apps
> > using make working off that directory.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > Acked-by: Luca Boccassi <bluca@debian.org>
> > ---
> > --- a/devtools/test-meson-builds.sh
> > +++ b/devtools/test-meson-builds.sh
> > +##############
> > +# Test installation of the x86-default target, to be used for checking
> > +# the sample apps build using the pkg-config file for cflags and libs
> > +###############
> 
> I would prefer simpler comment formatting.
> It makes this test very special.

Your comment implies that it is not :-)
Sure, I can reduce the highlighting.

> 
> > +build_path=build-x86-default
> > +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
> 
> export DESTDIR=... is not supported everywhere?

No 100% sure, so left it like this just in case.

> I prefer new shell substitution syntax $() instead of backquotes.
> 
Sure, I agree it's more readable.

> > +$ninja_cmd -C $build_path install
> > +
> > +pc_file=$(find $DESTDIR -name libdpdk.pc)
> > +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> > +
> > +# rather than hacking our environment, just edit the .pc file prefix value
> > +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
> 
> What is the alternative?
> Cannot we configure meson with the right prefix?
> 

See previous discussion.
Short answer, yes we can, but the prefix does not apply to kernel modules
as they always install in /lib/modules folder.

> > +for example in helloworld l2fwd l3fwd skeleton timer; do
> > +	echo "## Building $example"
> > +	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
> > +done
> > +
> > +echo ""
> > +echo "## $0: Completed OK"
> 
> This last log is uncommon.
> 
Yes, it is. However, due to parallelism, sometimes there is an error
message printed out that scrolls off-screen as the other build processes
come to a halt. I felt it worthwhile to add this at the end to ensure it
was clear whether things succeeded or not. If you prefer, I can change it
to a print on failure?

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 13:21       ` Bruce Richardson
  2019-05-02 13:21         ` Bruce Richardson
@ 2019-05-02 13:57         ` Thomas Monjalon
  2019-05-02 13:57           ` Thomas Monjalon
  1 sibling, 1 reply; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 13:57 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, bluca

02/05/2019 15:21, Bruce Richardson:
> On Thu, May 02, 2019 at 02:38:49PM +0200, Thomas Monjalon wrote:
> > Hi,
> > 
> > I will probably have a ton of comments about adding a new compilation tests,
> > and I think it is a bit late for such an addition.
> > However, all the fixes should go in 19.05.

It would be more reasonnable to leave it for 19.08
and re-spin with fixes only.

> > 26/04/2019 18:50, Bruce Richardson:
> > > The pkg-config file generated as part of the build of DPDK should allow
> > > applications to be built with an installed DPDK. We can test this as
> > > part of the build by doing an install of DPDK to a temporary directory
> > > within the build folder, and by then compiling up a few sample apps
> > > using make working off that directory.
> > > 
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > Acked-by: Luca Boccassi <bluca@debian.org>
> > > ---
> > > --- a/devtools/test-meson-builds.sh
> > > +++ b/devtools/test-meson-builds.sh
> > > +##############
> > > +# Test installation of the x86-default target, to be used for checking
> > > +# the sample apps build using the pkg-config file for cflags and libs
> > > +###############
> > 
> > I would prefer simpler comment formatting.
> > It makes this test very special.
> 
> Your comment implies that it is not :-)
> Sure, I can reduce the highlighting.
> 
> > 
> > > +build_path=build-x86-default
> > > +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
> > 
> > export DESTDIR=... is not supported everywhere?
> 
> No 100% sure, so left it like this just in case.

Hmmm, i would prefer "export DESTDIR="

> > I prefer new shell substitution syntax $() instead of backquotes.
> > 
> Sure, I agree it's more readable.
> 
> > > +$ninja_cmd -C $build_path install
> > > +
> > > +pc_file=$(find $DESTDIR -name libdpdk.pc)
> > > +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> > > +
> > > +# rather than hacking our environment, just edit the .pc file prefix value
> > > +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
> > 
> > What is the alternative?
> > Cannot we configure meson with the right prefix?
> 
> See previous discussion.
> Short answer, yes we can, but the prefix does not apply to kernel modules
> as they always install in /lib/modules folder.

We could do better by providing this ability in our
build system without hack.

> > > +for example in helloworld l2fwd l3fwd skeleton timer; do
> > > +	echo "## Building $example"
> > > +	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
> > > +done
> > > +
> > > +echo ""
> > > +echo "## $0: Completed OK"
> > 
> > This last log is uncommon.
> > 
> Yes, it is. However, due to parallelism, sometimes there is an error
> message printed out that scrolls off-screen as the other build processes
> come to a halt. I felt it worthwhile to add this at the end to ensure it
> was clear whether things succeeded or not. If you prefer, I can change it
> to a print on failure?

Failures are caught by 'set -e'.
Personnally I don't need such log because my shell prints me an error
when $? is not 0, but I can understand the need.
If you want to print $0, basename may render prettier.

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 13:57         ` Thomas Monjalon
@ 2019-05-02 13:57           ` Thomas Monjalon
  0 siblings, 0 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 13:57 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, bluca

02/05/2019 15:21, Bruce Richardson:
> On Thu, May 02, 2019 at 02:38:49PM +0200, Thomas Monjalon wrote:
> > Hi,
> > 
> > I will probably have a ton of comments about adding a new compilation tests,
> > and I think it is a bit late for such an addition.
> > However, all the fixes should go in 19.05.

It would be more reasonnable to leave it for 19.08
and re-spin with fixes only.

> > 26/04/2019 18:50, Bruce Richardson:
> > > The pkg-config file generated as part of the build of DPDK should allow
> > > applications to be built with an installed DPDK. We can test this as
> > > part of the build by doing an install of DPDK to a temporary directory
> > > within the build folder, and by then compiling up a few sample apps
> > > using make working off that directory.
> > > 
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > Acked-by: Luca Boccassi <bluca@debian.org>
> > > ---
> > > --- a/devtools/test-meson-builds.sh
> > > +++ b/devtools/test-meson-builds.sh
> > > +##############
> > > +# Test installation of the x86-default target, to be used for checking
> > > +# the sample apps build using the pkg-config file for cflags and libs
> > > +###############
> > 
> > I would prefer simpler comment formatting.
> > It makes this test very special.
> 
> Your comment implies that it is not :-)
> Sure, I can reduce the highlighting.
> 
> > 
> > > +build_path=build-x86-default
> > > +DESTDIR=`pwd`/$build_path/install-root ; export DESTDIR
> > 
> > export DESTDIR=... is not supported everywhere?
> 
> No 100% sure, so left it like this just in case.

Hmmm, i would prefer "export DESTDIR="

> > I prefer new shell substitution syntax $() instead of backquotes.
> > 
> Sure, I agree it's more readable.
> 
> > > +$ninja_cmd -C $build_path install
> > > +
> > > +pc_file=$(find $DESTDIR -name libdpdk.pc)
> > > +PKG_CONFIG_PATH=$(dirname $pc_file) ; export PKG_CONFIG_PATH
> > > +
> > > +# rather than hacking our environment, just edit the .pc file prefix value
> > > +sed -i -e "s|prefix=|prefix=$DESTDIR|" $pc_file
> > 
> > What is the alternative?
> > Cannot we configure meson with the right prefix?
> 
> See previous discussion.
> Short answer, yes we can, but the prefix does not apply to kernel modules
> as they always install in /lib/modules folder.

We could do better by providing this ability in our
build system without hack.

> > > +for example in helloworld l2fwd l3fwd skeleton timer; do
> > > +	echo "## Building $example"
> > > +	$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example
> > > +done
> > > +
> > > +echo ""
> > > +echo "## $0: Completed OK"
> > 
> > This last log is uncommon.
> > 
> Yes, it is. However, due to parallelism, sometimes there is an error
> message printed out that scrolls off-screen as the other build processes
> come to a halt. I felt it worthwhile to add this at the end to ensure it
> was clear whether things succeeded or not. If you prefer, I can change it
> to a print on failure?

Failures are caught by 'set -e'.
Personnally I don't need such log because my shell prints me an error
when $? is not 0, but I can understand the need.
If you want to print $0, basename may render prettier.



^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 13:17                 ` Bruce Richardson
  2019-05-02 13:17                   ` Bruce Richardson
@ 2019-05-02 14:08                   ` Luca Boccassi
  2019-05-02 14:08                     ` Luca Boccassi
  2019-05-02 15:11                     ` Thomas Monjalon
  1 sibling, 2 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-05-02 14:08 UTC (permalink / raw)
  To: Bruce Richardson, Thomas Monjalon; +Cc: dev

On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > 26/04/2019 16:56, Bruce Richardson:
> > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > wrote:
> > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > wrote:
> > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > wrote:
> > > > > > > > > +#
> > > > > > > > > rather
> > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > prefix
> > > > > > > > > value
> > > > > > > > > +sed
> > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > 
> > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > Which is
> > > > > > > > how
> > > > > > > > it
> > > > > > > > would be used in a real use case
> > > > > > > 
> > > > > > > I don't think that would fully work, as my understanding
> > > > > > > is that
> > > > > > > the
> > > > > > > prefix
> > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > to the
> > > > > > > kernel
> > > > > > > modules which would still try and install in /lib/.
> > > > > > 
> > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > before the
> > > > > > ninja install? The modules are not needed for that test
> > > > > > anyway,
> > > > > > right?
> > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > build
> > > > > > path,
> > > > > > and the kernel_dir option could be used
> > > > > > 
> > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > possible, to
> > > > > > avoid missing something
> > > > > 
> > > > > Yes, I did think of that too, but it does mean doing another
> > > > > configuration
> > > > > run in meson, and possibly a rebuild too if the
> > > > > rte_build_config.h
> > > > > file
> > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > speed
> > > > > here. I
> > > > > assumed there would be a pkg-config variable to adjust the
> > > > > output
> > > > > paths
> > > > > based on a sysroot, but couldn't find a suitable one.
> > 
> > [...]
> > > > There actually is a pkg-config binary option, I just tried and
> > > > it works
> > > > (it seems to be disabled by default on Debian and derivatives):
> > > > --
> > > > define-prefix
> > > > 
> > > 
> > > Any cmdline options to pkg-config don't solve the problem here as
> > > it means
> > > that the makefiles for any app need to be modified to use all
> > > those.
> > 
> > It looks to be a good solution.
> > Being able to update the DPDK install directory when building
> > an application should be a mandatory requirement.
> > I suggest to wrap the call to pkg-config so we can have this
> > ability.
> > 
> 
> I would have expected that this issue has already been solved for
> packagers. I was surprised that I couldn't find an easy way to do so.

Packagers use standard paths - so it never becomes a problem.

If editing the file on the fly is not acceptable for the test script,
then I'd suggest to fall back to the pkg-config option, and just
document the need to use it in the docs for this scenarios.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 14:08                   ` Luca Boccassi
@ 2019-05-02 14:08                     ` Luca Boccassi
  2019-05-02 15:11                     ` Thomas Monjalon
  1 sibling, 0 replies; 88+ messages in thread
From: Luca Boccassi @ 2019-05-02 14:08 UTC (permalink / raw)
  To: Bruce Richardson, Thomas Monjalon; +Cc: dev

On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > 26/04/2019 16:56, Bruce Richardson:
> > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > wrote:
> > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > wrote:
> > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > wrote:
> > > > > > > > > +#
> > > > > > > > > rather
> > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > prefix
> > > > > > > > > value
> > > > > > > > > +sed
> > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > 
> > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > Which is
> > > > > > > > how
> > > > > > > > it
> > > > > > > > would be used in a real use case
> > > > > > > 
> > > > > > > I don't think that would fully work, as my understanding
> > > > > > > is that
> > > > > > > the
> > > > > > > prefix
> > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > to the
> > > > > > > kernel
> > > > > > > modules which would still try and install in /lib/.
> > > > > > 
> > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > before the
> > > > > > ninja install? The modules are not needed for that test
> > > > > > anyway,
> > > > > > right?
> > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > build
> > > > > > path,
> > > > > > and the kernel_dir option could be used
> > > > > > 
> > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > possible, to
> > > > > > avoid missing something
> > > > > 
> > > > > Yes, I did think of that too, but it does mean doing another
> > > > > configuration
> > > > > run in meson, and possibly a rebuild too if the
> > > > > rte_build_config.h
> > > > > file
> > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > speed
> > > > > here. I
> > > > > assumed there would be a pkg-config variable to adjust the
> > > > > output
> > > > > paths
> > > > > based on a sysroot, but couldn't find a suitable one.
> > 
> > [...]
> > > > There actually is a pkg-config binary option, I just tried and
> > > > it works
> > > > (it seems to be disabled by default on Debian and derivatives):
> > > > --
> > > > define-prefix
> > > > 
> > > 
> > > Any cmdline options to pkg-config don't solve the problem here as
> > > it means
> > > that the makefiles for any app need to be modified to use all
> > > those.
> > 
> > It looks to be a good solution.
> > Being able to update the DPDK install directory when building
> > an application should be a mandatory requirement.
> > I suggest to wrap the call to pkg-config so we can have this
> > ability.
> > 
> 
> I would have expected that this issue has already been solved for
> packagers. I was surprised that I couldn't find an easy way to do so.

Packagers use standard paths - so it never becomes a problem.

If editing the file on the fly is not acceptable for the test script,
then I'd suggest to fall back to the pkg-config option, and just
document the need to use it in the docs for this scenarios.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 14:08                   ` Luca Boccassi
  2019-05-02 14:08                     ` Luca Boccassi
@ 2019-05-02 15:11                     ` Thomas Monjalon
  2019-05-02 15:11                       ` Thomas Monjalon
  2019-05-02 15:30                       ` Bruce Richardson
  1 sibling, 2 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 15:11 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Bruce Richardson, dev

02/05/2019 16:08, Luca Boccassi:
> On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > 26/04/2019 16:56, Bruce Richardson:
> > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > wrote:
> > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > wrote:
> > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > wrote:
> > > > > > > > > > +#
> > > > > > > > > > rather
> > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > prefix
> > > > > > > > > > value
> > > > > > > > > > +sed
> > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > 
> > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > Which is
> > > > > > > > > how
> > > > > > > > > it
> > > > > > > > > would be used in a real use case
> > > > > > > > 
> > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > is that
> > > > > > > > the
> > > > > > > > prefix
> > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > to the
> > > > > > > > kernel
> > > > > > > > modules which would still try and install in /lib/.
> > > > > > > 
> > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > before the
> > > > > > > ninja install? The modules are not needed for that test
> > > > > > > anyway,
> > > > > > > right?
> > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > build
> > > > > > > path,
> > > > > > > and the kernel_dir option could be used
> > > > > > > 
> > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > possible, to
> > > > > > > avoid missing something
> > > > > > 
> > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > configuration
> > > > > > run in meson, and possibly a rebuild too if the
> > > > > > rte_build_config.h
> > > > > > file
> > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > speed
> > > > > > here. I
> > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > output
> > > > > > paths
> > > > > > based on a sysroot, but couldn't find a suitable one.
> > > 
> > > [...]
> > > > > There actually is a pkg-config binary option, I just tried and
> > > > > it works
> > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > --
> > > > > define-prefix
> > > > > 
> > > > 
> > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > it means
> > > > that the makefiles for any app need to be modified to use all
> > > > those.
> > > 
> > > It looks to be a good solution.
> > > Being able to update the DPDK install directory when building
> > > an application should be a mandatory requirement.
> > > I suggest to wrap the call to pkg-config so we can have this
> > > ability.
> > > 
> > 
> > I would have expected that this issue has already been solved for
> > packagers. I was surprised that I couldn't find an easy way to do so.
> 
> Packagers use standard paths - so it never becomes a problem.
> 
> If editing the file on the fly is not acceptable for the test script,
> then I'd suggest to fall back to the pkg-config option, and just
> document the need to use it in the docs for this scenarios.

What I mean is that we should be able to compile our apps
after using DESTDIR, not related to the test script.
Can we use an environment variable like RTE_TARGET? DPDK_DIR?

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 15:11                     ` Thomas Monjalon
@ 2019-05-02 15:11                       ` Thomas Monjalon
  2019-05-02 15:30                       ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 15:11 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Bruce Richardson, dev

02/05/2019 16:08, Luca Boccassi:
> On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > 26/04/2019 16:56, Bruce Richardson:
> > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > wrote:
> > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > wrote:
> > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > wrote:
> > > > > > > > > > +#
> > > > > > > > > > rather
> > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > prefix
> > > > > > > > > > value
> > > > > > > > > > +sed
> > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > 
> > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > Which is
> > > > > > > > > how
> > > > > > > > > it
> > > > > > > > > would be used in a real use case
> > > > > > > > 
> > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > is that
> > > > > > > > the
> > > > > > > > prefix
> > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > to the
> > > > > > > > kernel
> > > > > > > > modules which would still try and install in /lib/.
> > > > > > > 
> > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > before the
> > > > > > > ninja install? The modules are not needed for that test
> > > > > > > anyway,
> > > > > > > right?
> > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > build
> > > > > > > path,
> > > > > > > and the kernel_dir option could be used
> > > > > > > 
> > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > possible, to
> > > > > > > avoid missing something
> > > > > > 
> > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > configuration
> > > > > > run in meson, and possibly a rebuild too if the
> > > > > > rte_build_config.h
> > > > > > file
> > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > speed
> > > > > > here. I
> > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > output
> > > > > > paths
> > > > > > based on a sysroot, but couldn't find a suitable one.
> > > 
> > > [...]
> > > > > There actually is a pkg-config binary option, I just tried and
> > > > > it works
> > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > --
> > > > > define-prefix
> > > > > 
> > > > 
> > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > it means
> > > > that the makefiles for any app need to be modified to use all
> > > > those.
> > > 
> > > It looks to be a good solution.
> > > Being able to update the DPDK install directory when building
> > > an application should be a mandatory requirement.
> > > I suggest to wrap the call to pkg-config so we can have this
> > > ability.
> > > 
> > 
> > I would have expected that this issue has already been solved for
> > packagers. I was surprised that I couldn't find an easy way to do so.
> 
> Packagers use standard paths - so it never becomes a problem.
> 
> If editing the file on the fly is not acceptable for the test script,
> then I'd suggest to fall back to the pkg-config option, and just
> document the need to use it in the docs for this scenarios.

What I mean is that we should be able to compile our apps
after using DESTDIR, not related to the test script.
Can we use an environment variable like RTE_TARGET? DPDK_DIR?



^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 15:11                     ` Thomas Monjalon
  2019-05-02 15:11                       ` Thomas Monjalon
@ 2019-05-02 15:30                       ` Bruce Richardson
  2019-05-02 15:30                         ` Bruce Richardson
  2019-05-02 15:38                         ` Thomas Monjalon
  1 sibling, 2 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 15:30 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dev

On Thu, May 02, 2019 at 05:11:30PM +0200, Thomas Monjalon wrote:
> 02/05/2019 16:08, Luca Boccassi:
> > On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > > 26/04/2019 16:56, Bruce Richardson:
> > > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > > wrote:
> > > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > > wrote:
> > > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > > wrote:
> > > > > > > > > > > +#
> > > > > > > > > > > rather
> > > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > > prefix
> > > > > > > > > > > value
> > > > > > > > > > > +sed
> > > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > > 
> > > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > > Which is
> > > > > > > > > > how
> > > > > > > > > > it
> > > > > > > > > > would be used in a real use case
> > > > > > > > > 
> > > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > > is that
> > > > > > > > > the
> > > > > > > > > prefix
> > > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > > to the
> > > > > > > > > kernel
> > > > > > > > > modules which would still try and install in /lib/.
> > > > > > > > 
> > > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > > before the
> > > > > > > > ninja install? The modules are not needed for that test
> > > > > > > > anyway,
> > > > > > > > right?
> > > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > > build
> > > > > > > > path,
> > > > > > > > and the kernel_dir option could be used
> > > > > > > > 
> > > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > > possible, to
> > > > > > > > avoid missing something
> > > > > > > 
> > > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > > configuration
> > > > > > > run in meson, and possibly a rebuild too if the
> > > > > > > rte_build_config.h
> > > > > > > file
> > > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > > speed
> > > > > > > here. I
> > > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > > output
> > > > > > > paths
> > > > > > > based on a sysroot, but couldn't find a suitable one.
> > > > 
> > > > [...]
> > > > > > There actually is a pkg-config binary option, I just tried and
> > > > > > it works
> > > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > > --
> > > > > > define-prefix
> > > > > > 
> > > > > 
> > > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > > it means
> > > > > that the makefiles for any app need to be modified to use all
> > > > > those.
> > > > 
> > > > It looks to be a good solution.
> > > > Being able to update the DPDK install directory when building
> > > > an application should be a mandatory requirement.
> > > > I suggest to wrap the call to pkg-config so we can have this
> > > > ability.
> > > > 
> > > 
> > > I would have expected that this issue has already been solved for
> > > packagers. I was surprised that I couldn't find an easy way to do so.
> > 
> > Packagers use standard paths - so it never becomes a problem.
> > 
> > If editing the file on the fly is not acceptable for the test script,
> > then I'd suggest to fall back to the pkg-config option, and just
> > document the need to use it in the docs for this scenarios.
> 
> What I mean is that we should be able to compile our apps
> after using DESTDIR, not related to the test script.
> Can we use an environment variable like RTE_TARGET? DPDK_DIR?
> 
We can certainly add one to our example Makefiles, it's just a couple of
lines change to each one to add a prefix to the return value from
pkg-config. I can attempt to do so in a later version of this patch, though
I'd prefer to take more time over it than we have in 19.05.

Alternatively, we can defer the last couple of patches in this set to
19.08, though again I'd prefer to have even this level of minimal testing
of pkg-config into 19.05.

Let me know what you think is best?

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 15:30                       ` Bruce Richardson
@ 2019-05-02 15:30                         ` Bruce Richardson
  2019-05-02 15:38                         ` Thomas Monjalon
  1 sibling, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 15:30 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dev

On Thu, May 02, 2019 at 05:11:30PM +0200, Thomas Monjalon wrote:
> 02/05/2019 16:08, Luca Boccassi:
> > On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > > 26/04/2019 16:56, Bruce Richardson:
> > > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > > wrote:
> > > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > > wrote:
> > > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > > wrote:
> > > > > > > > > > > +#
> > > > > > > > > > > rather
> > > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > > prefix
> > > > > > > > > > > value
> > > > > > > > > > > +sed
> > > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > > 
> > > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > > Which is
> > > > > > > > > > how
> > > > > > > > > > it
> > > > > > > > > > would be used in a real use case
> > > > > > > > > 
> > > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > > is that
> > > > > > > > > the
> > > > > > > > > prefix
> > > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > > to the
> > > > > > > > > kernel
> > > > > > > > > modules which would still try and install in /lib/.
> > > > > > > > 
> > > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > > before the
> > > > > > > > ninja install? The modules are not needed for that test
> > > > > > > > anyway,
> > > > > > > > right?
> > > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > > build
> > > > > > > > path,
> > > > > > > > and the kernel_dir option could be used
> > > > > > > > 
> > > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > > possible, to
> > > > > > > > avoid missing something
> > > > > > > 
> > > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > > configuration
> > > > > > > run in meson, and possibly a rebuild too if the
> > > > > > > rte_build_config.h
> > > > > > > file
> > > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > > speed
> > > > > > > here. I
> > > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > > output
> > > > > > > paths
> > > > > > > based on a sysroot, but couldn't find a suitable one.
> > > > 
> > > > [...]
> > > > > > There actually is a pkg-config binary option, I just tried and
> > > > > > it works
> > > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > > --
> > > > > > define-prefix
> > > > > > 
> > > > > 
> > > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > > it means
> > > > > that the makefiles for any app need to be modified to use all
> > > > > those.
> > > > 
> > > > It looks to be a good solution.
> > > > Being able to update the DPDK install directory when building
> > > > an application should be a mandatory requirement.
> > > > I suggest to wrap the call to pkg-config so we can have this
> > > > ability.
> > > > 
> > > 
> > > I would have expected that this issue has already been solved for
> > > packagers. I was surprised that I couldn't find an easy way to do so.
> > 
> > Packagers use standard paths - so it never becomes a problem.
> > 
> > If editing the file on the fly is not acceptable for the test script,
> > then I'd suggest to fall back to the pkg-config option, and just
> > document the need to use it in the docs for this scenarios.
> 
> What I mean is that we should be able to compile our apps
> after using DESTDIR, not related to the test script.
> Can we use an environment variable like RTE_TARGET? DPDK_DIR?
> 
We can certainly add one to our example Makefiles, it's just a couple of
lines change to each one to add a prefix to the return value from
pkg-config. I can attempt to do so in a later version of this patch, though
I'd prefer to take more time over it than we have in 19.05.

Alternatively, we can defer the last couple of patches in this set to
19.08, though again I'd prefer to have even this level of minimal testing
of pkg-config into 19.05.

Let me know what you think is best?

/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 15:30                       ` Bruce Richardson
  2019-05-02 15:30                         ` Bruce Richardson
@ 2019-05-02 15:38                         ` Thomas Monjalon
  2019-05-02 15:38                           ` Thomas Monjalon
  2019-05-02 15:41                           ` Bruce Richardson
  1 sibling, 2 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 15:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dev

02/05/2019 17:30, Bruce Richardson:
> On Thu, May 02, 2019 at 05:11:30PM +0200, Thomas Monjalon wrote:
> > 02/05/2019 16:08, Luca Boccassi:
> > > On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > > > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > > > 26/04/2019 16:56, Bruce Richardson:
> > > > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > > > wrote:
> > > > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > > > wrote:
> > > > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > > > wrote:
> > > > > > > > > > > > +#
> > > > > > > > > > > > rather
> > > > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > > > prefix
> > > > > > > > > > > > value
> > > > > > > > > > > > +sed
> > > > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > > > 
> > > > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > > > Which is
> > > > > > > > > > > how
> > > > > > > > > > > it
> > > > > > > > > > > would be used in a real use case
> > > > > > > > > > 
> > > > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > > > is that
> > > > > > > > > > the
> > > > > > > > > > prefix
> > > > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > > > to the
> > > > > > > > > > kernel
> > > > > > > > > > modules which would still try and install in /lib/.
> > > > > > > > > 
> > > > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > > > before the
> > > > > > > > > ninja install? The modules are not needed for that test
> > > > > > > > > anyway,
> > > > > > > > > right?
> > > > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > > > build
> > > > > > > > > path,
> > > > > > > > > and the kernel_dir option could be used
> > > > > > > > > 
> > > > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > > > possible, to
> > > > > > > > > avoid missing something
> > > > > > > > 
> > > > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > > > configuration
> > > > > > > > run in meson, and possibly a rebuild too if the
> > > > > > > > rte_build_config.h
> > > > > > > > file
> > > > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > > > speed
> > > > > > > > here. I
> > > > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > > > output
> > > > > > > > paths
> > > > > > > > based on a sysroot, but couldn't find a suitable one.
> > > > > 
> > > > > [...]
> > > > > > > There actually is a pkg-config binary option, I just tried and
> > > > > > > it works
> > > > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > > > --
> > > > > > > define-prefix
> > > > > > > 
> > > > > > 
> > > > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > > > it means
> > > > > > that the makefiles for any app need to be modified to use all
> > > > > > those.
> > > > > 
> > > > > It looks to be a good solution.
> > > > > Being able to update the DPDK install directory when building
> > > > > an application should be a mandatory requirement.
> > > > > I suggest to wrap the call to pkg-config so we can have this
> > > > > ability.
> > > > > 
> > > > 
> > > > I would have expected that this issue has already been solved for
> > > > packagers. I was surprised that I couldn't find an easy way to do so.
> > > 
> > > Packagers use standard paths - so it never becomes a problem.
> > > 
> > > If editing the file on the fly is not acceptable for the test script,
> > > then I'd suggest to fall back to the pkg-config option, and just
> > > document the need to use it in the docs for this scenarios.
> > 
> > What I mean is that we should be able to compile our apps
> > after using DESTDIR, not related to the test script.
> > Can we use an environment variable like RTE_TARGET? DPDK_DIR?
> > 
> We can certainly add one to our example Makefiles, it's just a couple of
> lines change to each one to add a prefix to the return value from
> pkg-config. I can attempt to do so in a later version of this patch, though
> I'd prefer to take more time over it than we have in 19.05.
> 
> Alternatively, we can defer the last couple of patches in this set to
> 19.08, though again I'd prefer to have even this level of minimal testing
> of pkg-config into 19.05.
> 
> Let me know what you think is best?

I think it's best to merge only the fixes at this stage.

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 15:38                         ` Thomas Monjalon
@ 2019-05-02 15:38                           ` Thomas Monjalon
  2019-05-02 15:41                           ` Bruce Richardson
  1 sibling, 0 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 15:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dev

02/05/2019 17:30, Bruce Richardson:
> On Thu, May 02, 2019 at 05:11:30PM +0200, Thomas Monjalon wrote:
> > 02/05/2019 16:08, Luca Boccassi:
> > > On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > > > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > > > 26/04/2019 16:56, Bruce Richardson:
> > > > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > > > wrote:
> > > > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > > > wrote:
> > > > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > > > wrote:
> > > > > > > > > > > > +#
> > > > > > > > > > > > rather
> > > > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > > > prefix
> > > > > > > > > > > > value
> > > > > > > > > > > > +sed
> > > > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > > > 
> > > > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > > > Which is
> > > > > > > > > > > how
> > > > > > > > > > > it
> > > > > > > > > > > would be used in a real use case
> > > > > > > > > > 
> > > > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > > > is that
> > > > > > > > > > the
> > > > > > > > > > prefix
> > > > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > > > to the
> > > > > > > > > > kernel
> > > > > > > > > > modules which would still try and install in /lib/.
> > > > > > > > > 
> > > > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > > > before the
> > > > > > > > > ninja install? The modules are not needed for that test
> > > > > > > > > anyway,
> > > > > > > > > right?
> > > > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > > > build
> > > > > > > > > path,
> > > > > > > > > and the kernel_dir option could be used
> > > > > > > > > 
> > > > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > > > possible, to
> > > > > > > > > avoid missing something
> > > > > > > > 
> > > > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > > > configuration
> > > > > > > > run in meson, and possibly a rebuild too if the
> > > > > > > > rte_build_config.h
> > > > > > > > file
> > > > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > > > speed
> > > > > > > > here. I
> > > > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > > > output
> > > > > > > > paths
> > > > > > > > based on a sysroot, but couldn't find a suitable one.
> > > > > 
> > > > > [...]
> > > > > > > There actually is a pkg-config binary option, I just tried and
> > > > > > > it works
> > > > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > > > --
> > > > > > > define-prefix
> > > > > > > 
> > > > > > 
> > > > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > > > it means
> > > > > > that the makefiles for any app need to be modified to use all
> > > > > > those.
> > > > > 
> > > > > It looks to be a good solution.
> > > > > Being able to update the DPDK install directory when building
> > > > > an application should be a mandatory requirement.
> > > > > I suggest to wrap the call to pkg-config so we can have this
> > > > > ability.
> > > > > 
> > > > 
> > > > I would have expected that this issue has already been solved for
> > > > packagers. I was surprised that I couldn't find an easy way to do so.
> > > 
> > > Packagers use standard paths - so it never becomes a problem.
> > > 
> > > If editing the file on the fly is not acceptable for the test script,
> > > then I'd suggest to fall back to the pkg-config option, and just
> > > document the need to use it in the docs for this scenarios.
> > 
> > What I mean is that we should be able to compile our apps
> > after using DESTDIR, not related to the test script.
> > Can we use an environment variable like RTE_TARGET? DPDK_DIR?
> > 
> We can certainly add one to our example Makefiles, it's just a couple of
> lines change to each one to add a prefix to the return value from
> pkg-config. I can attempt to do so in a later version of this patch, though
> I'd prefer to take more time over it than we have in 19.05.
> 
> Alternatively, we can defer the last couple of patches in this set to
> 19.08, though again I'd prefer to have even this level of minimal testing
> of pkg-config into 19.05.
> 
> Let me know what you think is best?

I think it's best to merge only the fixes at this stage.



^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 15:38                         ` Thomas Monjalon
  2019-05-02 15:38                           ` Thomas Monjalon
@ 2019-05-02 15:41                           ` Bruce Richardson
  2019-05-02 15:41                             ` Bruce Richardson
  1 sibling, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 15:41 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dev

On Thu, May 02, 2019 at 05:38:17PM +0200, Thomas Monjalon wrote:
> 02/05/2019 17:30, Bruce Richardson:
> > On Thu, May 02, 2019 at 05:11:30PM +0200, Thomas Monjalon wrote:
> > > 02/05/2019 16:08, Luca Boccassi:
> > > > On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > > > > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > > > > 26/04/2019 16:56, Bruce Richardson:
> > > > > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > > > > wrote:
> > > > > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > > > > wrote:
> > > > > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > > +#
> > > > > > > > > > > > > rather
> > > > > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > > > > prefix
> > > > > > > > > > > > > value
> > > > > > > > > > > > > +sed
> > > > > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > > > > 
> > > > > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > > > > Which is
> > > > > > > > > > > > how
> > > > > > > > > > > > it
> > > > > > > > > > > > would be used in a real use case
> > > > > > > > > > > 
> > > > > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > > > > is that
> > > > > > > > > > > the
> > > > > > > > > > > prefix
> > > > > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > > > > to the
> > > > > > > > > > > kernel
> > > > > > > > > > > modules which would still try and install in /lib/.
> > > > > > > > > > 
> > > > > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > > > > before the
> > > > > > > > > > ninja install? The modules are not needed for that test
> > > > > > > > > > anyway,
> > > > > > > > > > right?
> > > > > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > > > > build
> > > > > > > > > > path,
> > > > > > > > > > and the kernel_dir option could be used
> > > > > > > > > > 
> > > > > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > > > > possible, to
> > > > > > > > > > avoid missing something
> > > > > > > > > 
> > > > > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > > > > configuration
> > > > > > > > > run in meson, and possibly a rebuild too if the
> > > > > > > > > rte_build_config.h
> > > > > > > > > file
> > > > > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > > > > speed
> > > > > > > > > here. I
> > > > > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > > > > output
> > > > > > > > > paths
> > > > > > > > > based on a sysroot, but couldn't find a suitable one.
> > > > > > 
> > > > > > [...]
> > > > > > > > There actually is a pkg-config binary option, I just tried and
> > > > > > > > it works
> > > > > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > > > > --
> > > > > > > > define-prefix
> > > > > > > > 
> > > > > > > 
> > > > > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > > > > it means
> > > > > > > that the makefiles for any app need to be modified to use all
> > > > > > > those.
> > > > > > 
> > > > > > It looks to be a good solution.
> > > > > > Being able to update the DPDK install directory when building
> > > > > > an application should be a mandatory requirement.
> > > > > > I suggest to wrap the call to pkg-config so we can have this
> > > > > > ability.
> > > > > > 
> > > > > 
> > > > > I would have expected that this issue has already been solved for
> > > > > packagers. I was surprised that I couldn't find an easy way to do so.
> > > > 
> > > > Packagers use standard paths - so it never becomes a problem.
> > > > 
> > > > If editing the file on the fly is not acceptable for the test script,
> > > > then I'd suggest to fall back to the pkg-config option, and just
> > > > document the need to use it in the docs for this scenarios.
> > > 
> > > What I mean is that we should be able to compile our apps
> > > after using DESTDIR, not related to the test script.
> > > Can we use an environment variable like RTE_TARGET? DPDK_DIR?
> > > 
> > We can certainly add one to our example Makefiles, it's just a couple of
> > lines change to each one to add a prefix to the return value from
> > pkg-config. I can attempt to do so in a later version of this patch, though
> > I'd prefer to take more time over it than we have in 19.05.
> > 
> > Alternatively, we can defer the last couple of patches in this set to
> > 19.08, though again I'd prefer to have even this level of minimal testing
> > of pkg-config into 19.05.
> > 
> > Let me know what you think is best?
> 
> I think it's best to merge only the fixes at this stage.
> 
> 
Ok, can patches 1-3 be merged, and I'll do a new patch for the -lbsd fix in
patch 5.

Thanks,
/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
  2019-05-02 15:41                           ` Bruce Richardson
@ 2019-05-02 15:41                             ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 15:41 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dev

On Thu, May 02, 2019 at 05:38:17PM +0200, Thomas Monjalon wrote:
> 02/05/2019 17:30, Bruce Richardson:
> > On Thu, May 02, 2019 at 05:11:30PM +0200, Thomas Monjalon wrote:
> > > 02/05/2019 16:08, Luca Boccassi:
> > > > On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote:
> > > > > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote:
> > > > > > 26/04/2019 16:56, Bruce Richardson:
> > > > > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote:
> > > > > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote:
> > > > > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi
> > > > > > > > > wrote:
> > > > > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote:
> > > > > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi
> > > > > > > > > > > wrote:
> > > > > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > > +#
> > > > > > > > > > > > > rather
> > > > > > > > > > > > > than hacking our environment, just edit the .pc file
> > > > > > > > > > > > > prefix
> > > > > > > > > > > > > value
> > > > > > > > > > > > > +sed
> > > > > > > > > > > > > -i "s|prefix=|prefix=$DESTDIR|"
> > > > > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc
> > > > > > > > > > > > 
> > > > > > > > > > > > What about just using meson's prefix option instead?
> > > > > > > > > > > > Which is
> > > > > > > > > > > > how
> > > > > > > > > > > > it
> > > > > > > > > > > > would be used in a real use case
> > > > > > > > > > > 
> > > > > > > > > > > I don't think that would fully work, as my understanding
> > > > > > > > > > > is that
> > > > > > > > > > > the
> > > > > > > > > > > prefix
> > > > > > > > > > > option would apply only to the /usr/local parts, but not
> > > > > > > > > > > to the
> > > > > > > > > > > kernel
> > > > > > > > > > > modules which would still try and install in /lib/.
> > > > > > > > > > 
> > > > > > > > > > What about doing a meson configure -Denable_kmods=false
> > > > > > > > > > before the
> > > > > > > > > > ninja install? The modules are not needed for that test
> > > > > > > > > > anyway,
> > > > > > > > > > right?
> > > > > > > > > > Alternatively, the kernel src dir could be symlinked in the
> > > > > > > > > > build
> > > > > > > > > > path,
> > > > > > > > > > and the kernel_dir option could be used
> > > > > > > > > > 
> > > > > > > > > > I'm just worried that the test should be as "realistic" as
> > > > > > > > > > possible, to
> > > > > > > > > > avoid missing something
> > > > > > > > > 
> > > > > > > > > Yes, I did think of that too, but it does mean doing another
> > > > > > > > > configuration
> > > > > > > > > run in meson, and possibly a rebuild too if the
> > > > > > > > > rte_build_config.h
> > > > > > > > > file
> > > > > > > > > changes. Therefore I decided to use DESTDIR for the sake of
> > > > > > > > > speed
> > > > > > > > > here. I
> > > > > > > > > assumed there would be a pkg-config variable to adjust the
> > > > > > > > > output
> > > > > > > > > paths
> > > > > > > > > based on a sysroot, but couldn't find a suitable one.
> > > > > > 
> > > > > > [...]
> > > > > > > > There actually is a pkg-config binary option, I just tried and
> > > > > > > > it works
> > > > > > > > (it seems to be disabled by default on Debian and derivatives):
> > > > > > > > --
> > > > > > > > define-prefix
> > > > > > > > 
> > > > > > > 
> > > > > > > Any cmdline options to pkg-config don't solve the problem here as
> > > > > > > it means
> > > > > > > that the makefiles for any app need to be modified to use all
> > > > > > > those.
> > > > > > 
> > > > > > It looks to be a good solution.
> > > > > > Being able to update the DPDK install directory when building
> > > > > > an application should be a mandatory requirement.
> > > > > > I suggest to wrap the call to pkg-config so we can have this
> > > > > > ability.
> > > > > > 
> > > > > 
> > > > > I would have expected that this issue has already been solved for
> > > > > packagers. I was surprised that I couldn't find an easy way to do so.
> > > > 
> > > > Packagers use standard paths - so it never becomes a problem.
> > > > 
> > > > If editing the file on the fly is not acceptable for the test script,
> > > > then I'd suggest to fall back to the pkg-config option, and just
> > > > document the need to use it in the docs for this scenarios.
> > > 
> > > What I mean is that we should be able to compile our apps
> > > after using DESTDIR, not related to the test script.
> > > Can we use an environment variable like RTE_TARGET? DPDK_DIR?
> > > 
> > We can certainly add one to our example Makefiles, it's just a couple of
> > lines change to each one to add a prefix to the return value from
> > pkg-config. I can attempt to do so in a later version of this patch, though
> > I'd prefer to take more time over it than we have in 19.05.
> > 
> > Alternatively, we can defer the last couple of patches in this set to
> > 19.08, though again I'd prefer to have even this level of minimal testing
> > of pkg-config into 19.05.
> > 
> > Let me know what you think is best?
> 
> I think it's best to merge only the fixes at this stage.
> 
> 
Ok, can patches 1-3 be merged, and I'll do a new patch for the -lbsd fix in
patch 5.

Thanks,
/Bruce

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues
  2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
                     ` (6 preceding siblings ...)
  2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list Bruce Richardson
@ 2019-05-02 16:51   ` Bruce Richardson
  2019-05-02 16:51     ` Bruce Richardson
                       ` (5 more replies)
  7 siblings, 6 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

Split off from the previous set to test the pkg-config file, this set
includes only the fixes encountered during that work.

V4: Removed the changes to the test script and to hard-code the list of
    example apps, so that only the more important patches are included.
V3: Minor style changes to patch 4 following review
V2: Fixed a number of other problems encountered on FreeBSD. Replaced
    patch 2 of the original set, which broke on BSD with patch 6 of this
    set, which is the more correct solution.

Bruce Richardson (4):
  examples/l3fwd: fix compile on FreeBSD
  examples: install examples as part of ninja install
  build: fix ninja install on FreeBSD
  build: add libbsd to pkg-config file if enabled

 buildtools/symlink-drivers-solibs.sh |  7 ++++---
 config/meson.build                   | 17 +++++++++++------
 examples/l3fwd/l3fwd_lpm.c           |  1 +
 examples/meson.build                 | 16 ++++++++++++----
 meson.build                          |  9 ++-------
 5 files changed, 30 insertions(+), 20 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
@ 2019-05-02 16:51     ` Bruce Richardson
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
                       ` (4 subsequent siblings)
  5 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

Split off from the previous set to test the pkg-config file, this set
includes only the fixes encountered during that work.

V4: Removed the changes to the test script and to hard-code the list of
    example apps, so that only the more important patches are included.
V3: Minor style changes to patch 4 following review
V2: Fixed a number of other problems encountered on FreeBSD. Replaced
    patch 2 of the original set, which broke on BSD with patch 6 of this
    set, which is the more correct solution.

Bruce Richardson (4):
  examples/l3fwd: fix compile on FreeBSD
  examples: install examples as part of ninja install
  build: fix ninja install on FreeBSD
  build: add libbsd to pkg-config file if enabled

 buildtools/symlink-drivers-solibs.sh |  7 ++++---
 config/meson.build                   | 17 +++++++++++------
 examples/l3fwd/l3fwd_lpm.c           |  1 +
 examples/meson.build                 | 16 ++++++++++++----
 meson.build                          |  9 ++-------
 5 files changed, 30 insertions(+), 20 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
  2019-05-02 16:51     ` Bruce Richardson
@ 2019-05-02 16:51     ` Bruce Richardson
  2019-05-02 16:51       ` Bruce Richardson
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install Bruce Richardson
                       ` (3 subsequent siblings)
  5 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

On freebsd we need to include sys/socket.h to get the definition of
AF_INET in order to compile.

Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/l3fwd/l3fwd_lpm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 172a036b2..60a00639e 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <getopt.h>
 #include <stdbool.h>
+#include <sys/socket.h>
 #include <arpa/inet.h>
 
 #include <rte_debug.h>
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
@ 2019-05-02 16:51       ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

On freebsd we need to include sys/socket.h to get the definition of
AF_INET in order to compile.

Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/l3fwd/l3fwd_lpm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 172a036b2..60a00639e 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <getopt.h>
 #include <stdbool.h>
+#include <sys/socket.h>
 #include <arpa/inet.h>
 
 #include <rte_debug.h>
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
  2019-05-02 16:51     ` Bruce Richardson
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
@ 2019-05-02 16:51     ` Bruce Richardson
  2019-05-02 16:51       ` Bruce Richardson
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD Bruce Richardson
                       ` (2 subsequent siblings)
  5 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

When we install dpdk onto a system, we want to put the examples into
the /usr/share/dpdk (or /usr/local/share) directory for reference.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index e4babf6bf..1a6134f12 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,12 +8,20 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-allow_skips = true # don't flag an error if we can't build an app
+all_examples = run_command('sh', '-c',
+	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+	).stdout().split()
+# 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').to_lower() == 'all'
-	dirs = run_command('sh', '-c',
-		'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done')
-	examples = dirs.stdout().split()
+	examples = all_examples
+	allow_skips = true # don't flag an error if we can't build an app
 else
 	examples = get_option('examples').split(',')
 	allow_skips = false # error out if we can't build a requested app
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install Bruce Richardson
@ 2019-05-02 16:51       ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

When we install dpdk onto a system, we want to put the examples into
the /usr/share/dpdk (or /usr/local/share) directory for reference.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index e4babf6bf..1a6134f12 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,12 +8,20 @@ endif
 
 execinfo = cc.find_library('execinfo', required: false)
 
-allow_skips = true # don't flag an error if we can't build an app
+all_examples = run_command('sh', '-c',
+	'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done'
+	).stdout().split()
+# 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').to_lower() == 'all'
-	dirs = run_command('sh', '-c',
-		'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done')
-	examples = dirs.stdout().split()
+	examples = all_examples
+	allow_skips = true # don't flag an error if we can't build an app
 else
 	examples = get_option('examples').split(',')
 	allow_skips = false # error out if we can't build a requested app
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
                       ` (2 preceding siblings ...)
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install Bruce Richardson
@ 2019-05-02 16:51     ` Bruce Richardson
  2019-05-02 16:51       ` Bruce Richardson
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
  2019-05-02 21:09     ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Thomas Monjalon
  5 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 buildtools/symlink-drivers-solibs.sh | 7 ++++---
 config/meson.build                   | 7 +++++++
 meson.build                          | 7 -------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh
index 9826c6ae3..42985e855 100644
--- a/buildtools/symlink-drivers-solibs.sh
+++ b/buildtools/symlink-drivers-solibs.sh
@@ -7,6 +7,7 @@
 # others, e.g. PCI device PMDs depending on the PCI bus driver.
 
 # parameters to script are paths relative to install prefix:
-# 1. directory containing driver files e.g. lib64/dpdk/drivers
-# 2. directory for installed regular libs e.g. lib64
-ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2
+# 1. directory for installed regular libs e.g. lib64
+# 2. subdirectory of libdir where the pmds are
+
+cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* .
diff --git a/config/meson.build b/config/meson.build
index f8aded6ed..3678348de 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -42,6 +42,13 @@ endif
 driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
 eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+		get_option('libdir'),
+		pmd_subdir_opt)
+
 # set the machine type and cflags for it
 if meson.is_cross_build()
 	machine = host_machine.cpu()
diff --git a/meson.build b/meson.build
index a96486597..d1e8e5239 100644
--- a/meson.build
+++ b/meson.build
@@ -63,13 +63,6 @@ configure_file(output: build_cfg,
 # them.
 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
 
-# driver .so files often depend upon the bus drivers for their connect bus,
-# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
-# to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('buildtools/symlink-drivers-solibs.sh',
-		driver_install_path,
-		get_option('libdir'))
-
 pkg = import('pkgconfig')
 pkg.generate(name: meson.project_name(),
 	filebase: 'lib' + meson.project_name().to_lower(),
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD Bruce Richardson
@ 2019-05-02 16:51       ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 buildtools/symlink-drivers-solibs.sh | 7 ++++---
 config/meson.build                   | 7 +++++++
 meson.build                          | 7 -------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh
index 9826c6ae3..42985e855 100644
--- a/buildtools/symlink-drivers-solibs.sh
+++ b/buildtools/symlink-drivers-solibs.sh
@@ -7,6 +7,7 @@
 # others, e.g. PCI device PMDs depending on the PCI bus driver.
 
 # parameters to script are paths relative to install prefix:
-# 1. directory containing driver files e.g. lib64/dpdk/drivers
-# 2. directory for installed regular libs e.g. lib64
-ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2
+# 1. directory for installed regular libs e.g. lib64
+# 2. subdirectory of libdir where the pmds are
+
+cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* .
diff --git a/config/meson.build b/config/meson.build
index f8aded6ed..3678348de 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -42,6 +42,13 @@ endif
 driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
 eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+		get_option('libdir'),
+		pmd_subdir_opt)
+
 # set the machine type and cflags for it
 if meson.is_cross_build()
 	machine = host_machine.cpu()
diff --git a/meson.build b/meson.build
index a96486597..d1e8e5239 100644
--- a/meson.build
+++ b/meson.build
@@ -63,13 +63,6 @@ configure_file(output: build_cfg,
 # them.
 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
 
-# driver .so files often depend upon the bus drivers for their connect bus,
-# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
-# to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('buildtools/symlink-drivers-solibs.sh',
-		driver_install_path,
-		get_option('libdir'))
-
 pkg = import('pkgconfig')
 pkg.generate(name: meson.project_name(),
 	filebase: 'lib' + meson.project_name().to_lower(),
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
                       ` (3 preceding siblings ...)
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD Bruce Richardson
@ 2019-05-02 16:51     ` Bruce Richardson
  2019-05-02 16:51       ` Bruce Richardson
  2019-05-02 21:09     ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Thomas Monjalon
  5 siblings, 1 reply; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.

To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/meson.build | 10 ++++------
 meson.build        |  2 ++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 3678348de..0d25646f5 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -132,12 +132,10 @@ if numa_dep.found() and cc.has_header('numaif.h')
 	dpdk_extra_ldflags += '-lnuma'
 endif
 
-# check for strlcpy
-if is_linux
-	libbsd = dependency('libbsd', required: false)
-	if libbsd.found()
-		dpdk_conf.set('RTE_USE_LIBBSD', 1)
-	endif
+# check for libbsd
+libbsd = dependency('libbsd', required: false)
+if libbsd.found()
+	dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
 # add -include rte_config to cflags
diff --git a/meson.build b/meson.build
index d1e8e5239..46f9c5683 100644
--- a/meson.build
+++ b/meson.build
@@ -70,6 +70,8 @@ pkg.generate(name: meson.project_name(),
 	libraries: dpdk_libraries,
 	libraries_private: dpdk_drivers + dpdk_static_libraries +
 			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
+	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
+	                  # if libbsd is not enabled, then this is blank
 	description: '''The Data Plane Development Kit (DPDK).
 Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
-- 
2.20.1

^ permalink raw reply	[flat|nested] 88+ messages in thread

* [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
@ 2019-05-02 16:51       ` Bruce Richardson
  0 siblings, 0 replies; 88+ messages in thread
From: Bruce Richardson @ 2019-05-02 16:51 UTC (permalink / raw)
  To: thomas; +Cc: dev, bluca, Bruce Richardson

If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.

To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/meson.build | 10 ++++------
 meson.build        |  2 ++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 3678348de..0d25646f5 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -132,12 +132,10 @@ if numa_dep.found() and cc.has_header('numaif.h')
 	dpdk_extra_ldflags += '-lnuma'
 endif
 
-# check for strlcpy
-if is_linux
-	libbsd = dependency('libbsd', required: false)
-	if libbsd.found()
-		dpdk_conf.set('RTE_USE_LIBBSD', 1)
-	endif
+# check for libbsd
+libbsd = dependency('libbsd', required: false)
+if libbsd.found()
+	dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
 # add -include rte_config to cflags
diff --git a/meson.build b/meson.build
index d1e8e5239..46f9c5683 100644
--- a/meson.build
+++ b/meson.build
@@ -70,6 +70,8 @@ pkg.generate(name: meson.project_name(),
 	libraries: dpdk_libraries,
 	libraries_private: dpdk_drivers + dpdk_static_libraries +
 			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
+	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
+	                  # if libbsd is not enabled, then this is blank
 	description: '''The Data Plane Development Kit (DPDK).
 Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
-- 
2.20.1


^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues
  2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
                       ` (4 preceding siblings ...)
  2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
@ 2019-05-02 21:09     ` Thomas Monjalon
  2019-05-02 21:09       ` Thomas Monjalon
  5 siblings, 1 reply; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 21:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, bluca

02/05/2019 18:51, Bruce Richardson:
> Split off from the previous set to test the pkg-config file, this set
> includes only the fixes encountered during that work.
> 
> V4: Removed the changes to the test script and to hard-code the list of
>     example apps, so that only the more important patches are included.
> V3: Minor style changes to patch 4 following review
> V2: Fixed a number of other problems encountered on FreeBSD. Replaced
>     patch 2 of the original set, which broke on BSD with patch 6 of this
>     set, which is the more correct solution.
> 
> Bruce Richardson (4):
>   examples/l3fwd: fix compile on FreeBSD
>   examples: install examples as part of ninja install
>   build: fix ninja install on FreeBSD
>   build: add libbsd to pkg-config file if enabled

Applied, thanks

^ permalink raw reply	[flat|nested] 88+ messages in thread

* Re: [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues
  2019-05-02 21:09     ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Thomas Monjalon
@ 2019-05-02 21:09       ` Thomas Monjalon
  0 siblings, 0 replies; 88+ messages in thread
From: Thomas Monjalon @ 2019-05-02 21:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, bluca

02/05/2019 18:51, Bruce Richardson:
> Split off from the previous set to test the pkg-config file, this set
> includes only the fixes encountered during that work.
> 
> V4: Removed the changes to the test script and to hard-code the list of
>     example apps, so that only the more important patches are included.
> V3: Minor style changes to patch 4 following review
> V2: Fixed a number of other problems encountered on FreeBSD. Replaced
>     patch 2 of the original set, which broke on BSD with patch 6 of this
>     set, which is the more correct solution.
> 
> Bruce Richardson (4):
>   examples/l3fwd: fix compile on FreeBSD
>   examples: install examples as part of ninja install
>   build: fix ninja install on FreeBSD
>   build: add libbsd to pkg-config file if enabled

Applied, thanks




^ permalink raw reply	[flat|nested] 88+ messages in thread

end of thread, other threads:[~2019-05-02 21:09 UTC | newest]

Thread overview: 88+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
2019-04-23 22:06 ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-24  9:22   ` Luca Boccassi
2019-04-24  9:22     ` Luca Boccassi
2019-04-24 10:41     ` Bruce Richardson
2019-04-24 10:41       ` Bruce Richardson
2019-04-24 11:02       ` Luca Boccassi
2019-04-24 11:02         ` Luca Boccassi
2019-04-24 12:31         ` Bruce Richardson
2019-04-24 12:31           ` Bruce Richardson
2019-04-24 13:37           ` Luca Boccassi
2019-04-24 13:37             ` Luca Boccassi
2019-04-26 14:56             ` Bruce Richardson
2019-04-26 14:56               ` Bruce Richardson
2019-04-26 16:10               ` Luca Boccassi
2019-04-26 16:10                 ` Luca Boccassi
2019-05-02 13:11               ` Thomas Monjalon
2019-05-02 13:11                 ` Thomas Monjalon
2019-05-02 13:17                 ` Bruce Richardson
2019-05-02 13:17                   ` Bruce Richardson
2019-05-02 14:08                   ` Luca Boccassi
2019-05-02 14:08                     ` Luca Boccassi
2019-05-02 15:11                     ` Thomas Monjalon
2019-05-02 15:11                       ` Thomas Monjalon
2019-05-02 15:30                       ` Bruce Richardson
2019-05-02 15:30                         ` Bruce Richardson
2019-05-02 15:38                         ` Thomas Monjalon
2019-05-02 15:38                           ` Thomas Monjalon
2019-05-02 15:41                           ` Bruce Richardson
2019-05-02 15:41                             ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 23:04 ` [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Stephen Hemminger
2019-04-23 23:04   ` Stephen Hemminger
2019-04-24  8:54   ` Bruce Richardson
2019-04-24  8:54     ` Bruce Richardson
2019-04-24  9:00     ` Bruce Richardson
2019-04-24  9:00       ` Bruce Richardson
2019-04-26 16:11 ` Luca Boccassi
2019-04-26 16:11   ` Luca Boccassi
2019-04-26 16:20   ` Bruce Richardson
2019-04-26 16:20     ` Bruce Richardson
2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
2019-04-26 16:50   ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-02 12:38     ` Thomas Monjalon
2019-05-02 12:38       ` Thomas Monjalon
2019-05-02 12:54       ` Luca Boccassi
2019-05-02 12:54         ` Luca Boccassi
2019-05-02 13:21       ` Bruce Richardson
2019-05-02 13:21         ` Bruce Richardson
2019-05-02 13:57         ` Thomas Monjalon
2019-05-02 13:57           ` Thomas Monjalon
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
2019-05-02 16:51     ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 21:09     ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Thomas Monjalon
2019-05-02 21:09       ` Thomas Monjalon

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).