DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH 0/6] build system improvements
@ 2019-08-12 23:03 Thomas Monjalon
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig Thomas Monjalon
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Thomas Monjalon @ 2019-08-12 23:03 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev

While testing compilation of mlx drivers,
I hit some issues and misses.
The result is 6 patches of cleanup, fixes and test improvements.

Thomas Monjalon (6):
  build: remove redundant libs from pkgconfig
  drivers: add some reasons for meson disabling
  net/mlx: fix meson build with custom dependency path
  net/mlx: fix build with make and recent gcc
  devtools: test compiler availability only once
  devtools: load target-specific compilation environment

 devtools/test-meson-builds.sh         | 52 +++++++++++++++++----------
 drivers/baseband/turbo_sw/meson.build |  1 +
 drivers/compress/isal/meson.build     |  1 -
 drivers/net/af_xdp/meson.build        |  1 -
 drivers/net/memif/meson.build         |  5 +--
 drivers/net/mlx4/Makefile             |  3 +-
 drivers/net/mlx4/meson.build          |  9 ++---
 drivers/net/mlx5/Makefile             |  3 +-
 drivers/net/mlx5/meson.build          |  7 ++--
 drivers/raw/ioat/meson.build          |  1 +
 10 files changed, 52 insertions(+), 31 deletions(-)

-- 
2.22.0


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

* [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig
  2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
@ 2019-08-12 23:03 ` Thomas Monjalon
  2019-08-13  9:37   ` Luca Boccassi
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 2/6] drivers: add some reasons for meson disabling Thomas Monjalon
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2019-08-12 23:03 UTC (permalink / raw)
  To: bruce.richardson, Lee Daly, Fiona Trahe, Pablo de Lara,
	Ashish Gupta, Xiaolong Ye, Qi Zhang
  Cc: dev, bluca, stable

As explained in drivers/meson.build,
"
  For the find_library() case (but not with dependency()) we also
  need to specify the "-l" flags in pkgconfig_extra_libs variable
  too, so that it can be reflected in the pkgconfig output for
  static builds.
"

The commit e30b4e566f47 ("build: improve dependency handling")
must be followed up with this one in order to remove more
occurences of pkgconfig_extra_libs redundant with use of dependency().

Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Cc: xiaolong.ye@intel.com
Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")
Cc: lee.daly@intel.com
Cc: bluca@debian.org
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/compress/isal/meson.build | 1 -
 drivers/net/af_xdp/meson.build    | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/compress/isal/meson.build b/drivers/compress/isal/meson.build
index 67b5c4aae..25578880d 100644
--- a/drivers/compress/isal/meson.build
+++ b/drivers/compress/isal/meson.build
@@ -10,6 +10,5 @@ endif
 deps += 'bus_vdev'
 sources = files('isal_compress_pmd.c', 'isal_compress_pmd_ops.c')
 ext_deps += dep
-pkgconfig_extra_libs += '-lisal'
 
 allow_experimental_apis = true
diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index ac679b92b..307aa0e38 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -10,7 +10,6 @@ endif
 
 if bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('linux/if_xdp.h')
 	ext_deps += bpf_dep
-	pkgconfig_extra_libs += '-lbpf'
 else
 	build = false
 	reason = 'missing dependency, "libbpf"'
-- 
2.22.0


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

* [dpdk-dev] [PATCH 2/6] drivers: add some reasons for meson disabling
  2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig Thomas Monjalon
@ 2019-08-12 23:03 ` Thomas Monjalon
  2019-08-13  9:38   ` Luca Boccassi
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path Thomas Monjalon
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2019-08-12 23:03 UTC (permalink / raw)
  To: bruce.richardson, Nicolas Chautru, Jakub Grajciar; +Cc: dev

Some drivers were missing reasons text for their disabling in meson.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/baseband/turbo_sw/meson.build | 1 +
 drivers/net/memif/meson.build         | 5 +++--
 drivers/raw/ioat/meson.build          | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/baseband/turbo_sw/meson.build b/drivers/baseband/turbo_sw/meson.build
index 33345aa01..1a1f7c9a9 100644
--- a/drivers/baseband/turbo_sw/meson.build
+++ b/drivers/baseband/turbo_sw/meson.build
@@ -7,6 +7,7 @@ if dpdk_conf.has('RTE_BBDEV_SDK_AVX2')
 	lib = cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: false)
 	if not lib.found()
 		build = false
+		reason = 'missing dependency, "libturbo"'
 	else
 		ext_deps += cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: true)
 		ext_deps += cc.find_library('libcrc', dirs: [path + '/lib_crc'], required: true)
diff --git a/drivers/net/memif/meson.build b/drivers/net/memif/meson.build
index bedc97311..a44d82535 100644
--- a/drivers/net/memif/meson.build
+++ b/drivers/net/memif/meson.build
@@ -1,8 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2018-2019 Cisco Systems, Inc.  All rights reserved.
 
-if host_machine.system() != 'linux'
-        build = false
+if not is_linux
+	build = false
+	reason = 'only supported on Linux'
 endif
 
 sources = files('rte_eth_memif.c',
diff --git a/drivers/raw/ioat/meson.build b/drivers/raw/ioat/meson.build
index 247ff88bf..0878418ae 100644
--- a/drivers/raw/ioat/meson.build
+++ b/drivers/raw/ioat/meson.build
@@ -2,6 +2,7 @@
 # Copyright 2019 Intel Corporation
 
 build = dpdk_conf.has('RTE_ARCH_X86')
+reason = 'only supported on x86'
 sources = files('ioat_rawdev.c',
 		'ioat_rawdev_test.c')
 deps += ['rawdev', 'bus_pci', 'mbuf']
-- 
2.22.0


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

* [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path
  2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig Thomas Monjalon
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 2/6] drivers: add some reasons for meson disabling Thomas Monjalon
@ 2019-08-12 23:03 ` Thomas Monjalon
  2019-08-13  9:38   ` Luca Boccassi
  2019-08-14  8:39   ` Matan Azrad
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc Thomas Monjalon
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 16+ messages in thread
From: Thomas Monjalon @ 2019-08-12 23:03 UTC (permalink / raw)
  To: bruce.richardson, Matan Azrad, Shahaf Shuler, Yongseok Koh,
	Viacheslav Ovsiienko
  Cc: dev, stable, Luca Boccassi

If rdma-core is not installed in a standard directory of the system,
it is possible to specify the location of the pkgconfig file via
an environment variable:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/rdma-core/build/lib/pkgconfig

In this case, the dependency may become mandatory to specify
for the configuration tests (checking dependency symbols or fields).

Some spacing is also fixed around.

Fixes: 8e4937640022 ("net/mlx4: add external allocator for Verbs object")
Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
Cc: stable@dpdk.org

Suggested-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/mlx4/meson.build | 9 +++++----
 drivers/net/mlx5/meson.build | 7 ++++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 028cd97fa..efee45776 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -76,7 +76,7 @@ if build
 	# mlx4_autoconf.h file is still generated.
 	# input array for meson member search:
 	# [ "MACRO to define if found", "header for the search",
-	#   "symbol to search","struct member to search" ]
+	#   "symbol to search", "struct member to search" ]
 	#
 	has_member_args = [
 		[ 'HAVE_IBV_MLX4_WQE_LSO_SEG', 'infiniband/mlx4dv.h',
@@ -93,12 +93,13 @@ if build
 	]
 	config = configuration_data()
 	foreach arg:has_sym_args
-		config.set(arg[0], cc.has_header_symbol(arg[1], arg[2]))
+		config.set(arg[0], cc.has_header_symbol(arg[1], arg[2],
+			dependencies: libs))
 	endforeach
 	foreach arg:has_member_args
-		file_prefix = '#include<' + arg[1] + '>'
+		file_prefix = '#include <' + arg[1] + '>'
 		config.set(arg[0], cc.has_member(arg[2], arg[3],
-			prefix : file_prefix))
+			prefix: file_prefix, dependencies: libs))
 	endforeach
 	configure_file(output : 'mlx4_autoconf.h', configuration : config)
 endif
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 62b41caf1..3c5144c9b 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -177,12 +177,13 @@ if build
 	]
 	config = configuration_data()
 	foreach arg:has_sym_args
-		config.set(arg[0], cc.has_header_symbol(arg[1], arg[2]))
+		config.set(arg[0], cc.has_header_symbol(arg[1], arg[2],
+			dependencies: libs))
 	endforeach
 	foreach arg:has_member_args
-		file_prefix = '#include<' + arg[1] + '>'
+		file_prefix = '#include <' + arg[1] + '>'
 		config.set(arg[0], cc.has_member(arg[2], arg[3],
-			prefix : file_prefix))
+			prefix : file_prefix, dependencies: libs))
 	endforeach
 	configure_file(output : 'mlx5_autoconf.h', configuration : config)
 endif
-- 
2.22.0


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

* [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc
  2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
                   ` (2 preceding siblings ...)
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path Thomas Monjalon
@ 2019-08-12 23:03 ` Thomas Monjalon
  2019-08-13  9:39   ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
  2019-08-14 10:19   ` [dpdk-dev] " Matan Azrad
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 5/6] devtools: test compiler availability only once Thomas Monjalon
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 16+ messages in thread
From: Thomas Monjalon @ 2019-08-12 23:03 UTC (permalink / raw)
  To: bruce.richardson, Matan Azrad, Shahaf Shuler, Yongseok Koh,
	Viacheslav Ovsiienko
  Cc: dev, adrien.mazarguil, stable

With VERBOSE=1, this error was seen in debug mode with gcc 9.1:

In file included from /tmp/dpdk.auto-config-h.sh.c.w0VWMi:1:
In file included from rdma-core/build/include/infiniband/mlx5dv.h:47:
In file included from rdma-core/build/include/infiniband/verbs.h:46:
In file included from rdma-core/build/include/infiniband/verbs_api.h:66:
In file included from rdma-core/build/include/infiniband/ib_user_ioctl_verbs.h:38:
include/rdma/ib_user_verbs.h:161:28: fatal error:
zero size arrays are an extension [-Wzero-length-array]
__aligned_u64 driver_data0;
^
1 error generated.

As a result, buildtools/auto-config-h.sh was not generating
a correct autoconf file, so the compilation was generating such error:

fatal error: redefinition of 'mlx5_ib_uapi_flow_action_packet_reformat_type'

It is fixed by disabling -pedantic option when calling auto-config-h.sh
from the makefile-based system.

Cc: adrien.mazarguil@6wind.com
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/mlx4/Makefile | 3 ++-
 drivers/net/mlx5/Makefile | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
index 8126b0dfc..25d7c7555 100644
--- a/drivers/net/mlx4/Makefile
+++ b/drivers/net/mlx4/Makefile
@@ -68,6 +68,7 @@ endif
 # User-defined CFLAGS.
 ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DEBUG),y)
 CFLAGS += -pedantic -UNDEBUG -DPEDANTIC
+AUTO_CONFIG_CFLAGS += -Wno-pedantic
 else
 CFLAGS += -DNDEBUG -UPEDANTIC
 endif
@@ -77,7 +78,7 @@ include $(RTE_SDK)/mk/rte.lib.mk
 # Generate and clean-up mlx4_autoconf.h.
 
 export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
-export AUTO_CONFIG_CFLAGS = -Wno-error
+export AUTO_CONFIG_CFLAGS += -Wno-error
 
 ifndef V
 AUTOCONF_OUTPUT := >/dev/null
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index dbb2a4e80..299cf3afe 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -83,6 +83,7 @@ endif
 # User-defined CFLAGS.
 ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DEBUG),y)
 CFLAGS += -pedantic -UNDEBUG -DPEDANTIC
+AUTO_CONFIG_CFLAGS += -Wno-pedantic
 else
 CFLAGS += -DNDEBUG -UPEDANTIC
 endif
@@ -92,7 +93,7 @@ include $(RTE_SDK)/mk/rte.lib.mk
 # Generate and clean-up mlx5_autoconf.h.
 
 export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
-export AUTO_CONFIG_CFLAGS = -Wno-error
+export AUTO_CONFIG_CFLAGS += -Wno-error
 
 ifndef V
 AUTOCONF_OUTPUT := >/dev/null
-- 
2.22.0


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

* [dpdk-dev] [PATCH 5/6] devtools: test compiler availability only once
  2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
                   ` (3 preceding siblings ...)
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc Thomas Monjalon
@ 2019-08-12 23:03 ` Thomas Monjalon
  2019-08-13  9:40   ` Luca Boccassi
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 6/6] devtools: load target-specific compilation environment Thomas Monjalon
  2019-09-12 16:23 ` [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2019-08-12 23:03 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev

The compilation test is skipped if the compiler is not available.
In the case of gcc/arm, it was tested both in the generic function
"build" and in the cross-compilation section.

By passing the compiler as argument of the generic function,
the test with "command" is done only once.

This small clean-up has the benefit of introducing the compiler
parameter to be used later in another improvement.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/test-meson-builds.sh | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 9fe0a04c9..f2b0b347b 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -29,11 +29,13 @@ else
 	exit 1
 fi
 
-build () # <directory> <meson options>
+build () # <directory> <target compiler> <meson options>
 {
 	builddir=$1
 	shift
-	if command -v $CC >/dev/null 2>&1 ; then
+	targetcc=$1
+	shift
+	if command -v $CC $targetcc >/dev/null 2>&1 ; then
 		if [ ! -f "$builddir/build.ninja" ] ; then
 			options="--werror -Dexamples=all $*"
 			echo "$MESON $options $srcdir $builddir"
@@ -71,7 +73,7 @@ for c in gcc clang ; do
 	command -v $c >/dev/null 2>&1 || continue
 	for s in static shared ; do
 		export CC="ccache $c"
-		build build-$c-$s --default-library=$s
+		build build-$c-$s $c --default-library=$s
 	done
 done
 
@@ -83,22 +85,19 @@ ok=$(cc -march=$default_machine -E - < /dev/null > /dev/null 2>&1 || echo false)
 if [ "$ok" = "false" ] ; then
 	default_machine='corei7'
 fi
-build build-x86-default -Dlibdir=lib -Dmachine=$default_machine $use_shared
+build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine $use_shared
 
-# enable cross compilation if gcc cross-compiler is found
 c=aarch64-linux-gnu-gcc
-if command -v $c >/dev/null 2>&1 ; then
-	# compile the general v8a also for clang to increase coverage
-	export CC="clang"
-	build build-arm64-host-clang $use_shared \
-		--cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
-
-	for f in $srcdir/config/arm/arm*gcc ; do
-		export CC="ccache gcc"
-		build build-$(basename $f | tr '_' '-' | cut -d'-' -f-2) \
-			$use_shared --cross-file $f
-	done
-fi
+# generic armv8a with clang as host compiler
+export CC="clang"
+build build-arm64-host-clang $c $use_shared \
+	--cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
+# all gcc/arm configurations
+for f in $srcdir/config/arm/arm*gcc ; do
+	export CC="ccache gcc"
+	build build-$(basename $f | tr '_' '-' | cut -d'-' -f-2) $c \
+		$use_shared --cross-file $f
+done
 
 # 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
-- 
2.22.0


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

* [dpdk-dev] [PATCH 6/6] devtools: load target-specific compilation environment
  2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
                   ` (4 preceding siblings ...)
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 5/6] devtools: test compiler availability only once Thomas Monjalon
@ 2019-08-12 23:03 ` Thomas Monjalon
  2019-08-13  9:41   ` Luca Boccassi
  2019-09-12 16:23 ` [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2019-08-12 23:03 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev

In order to re-use the same test environment as with
test-build.sh, the configuration file is loaded at each build,
after adjusting the variable DPDK_TARGET.

This is especially useful to set the variable PKG_CONFIG_PATH,
or define some meson options (without -D) in DPDK_MESON_OPTIONS.

The DPDK_TARGET values can be
	aarch64-*, powerpc64-*, x86_64-*.
The matching DPDK_TARGET values for test-build.sh are
	arm64-*, ppc_64-*, x86_64-*.
The advised expressions to use in the common configuration file are:
	if echo $DPDK_TARGET | grep -q '^a.*64-' ; then
	elif echo $DPDK_TARGET | grep -q '^p.*pc.*64' ; then
	elif echo $DPDK_TARGET | grep -q '^x86_64' ; then
	fi

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/test-meson-builds.sh | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index f2b0b347b..a51a04d5a 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -29,15 +29,32 @@ else
 	exit 1
 fi
 
+default_path=$PATH
+default_pkgpath=$PKG_CONFIG_PATH
+
+reset_env ()
+{
+	export PATH=$default_path
+	export PKG_CONFIG_PATH=$default_pkgpath
+	unset DPDK_MESON_OPTIONS
+}
+
 build () # <directory> <target compiler> <meson options>
 {
 	builddir=$1
 	shift
 	targetcc=$1
 	shift
+	reset_env
+	DPDK_TARGET=$($targetcc -v 2>&1 | sed -n 's,^Target: ,,p')
+	. $srcdir/devtools/load-devel-config
 	if command -v $CC $targetcc >/dev/null 2>&1 ; then
 		if [ ! -f "$builddir/build.ninja" ] ; then
-			options="--werror -Dexamples=all $*"
+			options="--werror -Dexamples=all"
+			for option in $DPDK_MESON_OPTIONS ; do
+				options="$options -D$option"
+			done
+			options="$options $*"
 			echo "$MESON $options $srcdir $builddir"
 			$MESON $options $srcdir $builddir
 			unset CC
-- 
2.22.0


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

* Re: [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig Thomas Monjalon
@ 2019-08-13  9:37   ` Luca Boccassi
  0 siblings, 0 replies; 16+ messages in thread
From: Luca Boccassi @ 2019-08-13  9:37 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson, Lee Daly, Fiona Trahe,
	Pablo de Lara, Ashish Gupta, Xiaolong Ye, Qi Zhang
  Cc: dev, stable

On Tue, 2019-08-13 at 01:03 +0200, Thomas Monjalon wrote:
> As explained in drivers/meson.build,
> "
>   For the find_library() case (but not with dependency()) we also
>   need to specify the "-l" flags in pkgconfig_extra_libs variable
>   too, so that it can be reflected in the pkgconfig output for
>   static builds.
> "
> 
> The commit e30b4e566f47 ("build: improve dependency handling")
> must be followed up with this one in order to remove more
> occurences of pkgconfig_extra_libs redundant with use of
> dependency().
> 
> Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
> Cc: 
> xiaolong.ye@intel.com
> 
> Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression
> PMD")
> Cc: 
> lee.daly@intel.com
> 
> Cc: 
> bluca@debian.org
> 
> Cc: 
> stable@dpdk.org
> 
> 
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >
> ---
>  drivers/compress/isal/meson.build | 1 -
>  drivers/net/af_xdp/meson.build    | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/drivers/compress/isal/meson.build
> b/drivers/compress/isal/meson.build
> index 67b5c4aae..25578880d 100644
> --- a/drivers/compress/isal/meson.build
> +++ b/drivers/compress/isal/meson.build
> @@ -10,6 +10,5 @@ endif
>  deps += 'bus_vdev'
>  sources = files('isal_compress_pmd.c', 'isal_compress_pmd_ops.c')
>  ext_deps += dep
> -pkgconfig_extra_libs += '-lisal'
>  
>  allow_experimental_apis = true
> diff --git a/drivers/net/af_xdp/meson.build
> b/drivers/net/af_xdp/meson.build
> index ac679b92b..307aa0e38 100644
> --- a/drivers/net/af_xdp/meson.build
> +++ b/drivers/net/af_xdp/meson.build
> @@ -10,7 +10,6 @@ endif
>  
>  if bpf_dep.found() and cc.has_header('bpf/xsk.h') and
> cc.has_header('linux/if_xdp.h')
>  	ext_deps += bpf_dep
> -	pkgconfig_extra_libs += '-lbpf'
>  else
>  	build = false
>  	reason = 'missing dependency, "libbpf"'
> 

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

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH 2/6] drivers: add some reasons for meson disabling
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 2/6] drivers: add some reasons for meson disabling Thomas Monjalon
@ 2019-08-13  9:38   ` Luca Boccassi
  0 siblings, 0 replies; 16+ messages in thread
From: Luca Boccassi @ 2019-08-13  9:38 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson, Nicolas Chautru, Jakub Grajciar; +Cc: dev

On Tue, 2019-08-13 at 01:03 +0200, Thomas Monjalon wrote:
> Some drivers were missing reasons text for their disabling in meson.
> 
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >
> ---
>  drivers/baseband/turbo_sw/meson.build | 1 +
>  drivers/net/memif/meson.build         | 5 +++--
>  drivers/raw/ioat/meson.build          | 1 +
>  3 files changed, 5 insertions(+), 2 deletions(-)
> 

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

-- 
Kind regards,
Luca Boccassi


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

* Re: [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path Thomas Monjalon
@ 2019-08-13  9:38   ` Luca Boccassi
  2019-08-14  8:39   ` Matan Azrad
  1 sibling, 0 replies; 16+ messages in thread
From: Luca Boccassi @ 2019-08-13  9:38 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson, Matan Azrad, Shahaf Shuler,
	Yongseok Koh, Viacheslav Ovsiienko
  Cc: dev, stable

On Tue, 2019-08-13 at 01:03 +0200, Thomas Monjalon wrote:
> If rdma-core is not installed in a standard directory of the system,
> it is possible to specify the location of the pkgconfig file via
> an environment variable:
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/rdma-core/build/lib/pkgconfig
> 
> In this case, the dependency may become mandatory to specify
> for the configuration tests (checking dependency symbols or fields).
> 
> Some spacing is also fixed around.
> 
> Fixes: 8e4937640022 ("net/mlx4: add external allocator for Verbs
> object")
> Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
> Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
> Cc: 
> stable@dpdk.org
> 
> 
> Suggested-by: Luca Boccassi <
> bluca@debian.org
> >
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >
> ---
>  drivers/net/mlx4/meson.build | 9 +++++----
>  drivers/net/mlx5/meson.build | 7 ++++---
>  2 files changed, 9 insertions(+), 7 deletions(-)

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

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH 4/6] net/mlx: fix build with make and recent gcc
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc Thomas Monjalon
@ 2019-08-13  9:39   ` " Luca Boccassi
  2019-08-14 10:19   ` [dpdk-dev] " Matan Azrad
  1 sibling, 0 replies; 16+ messages in thread
From: Luca Boccassi @ 2019-08-13  9:39 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson, Matan Azrad, Shahaf Shuler,
	Yongseok Koh, Viacheslav Ovsiienko
  Cc: dev, adrien.mazarguil, stable

On Tue, 2019-08-13 at 01:03 +0200, Thomas Monjalon wrote:
> With VERBOSE=1, this error was seen in debug mode with gcc 9.1:
> 
> In file included from /tmp/dpdk.auto-config-h.sh.c.w0VWMi:1:
> In file included from rdma-core/build/include/infiniband/mlx5dv.h:47:
> In file included from rdma-core/build/include/infiniband/verbs.h:46:
> In file included from rdma-
> core/build/include/infiniband/verbs_api.h:66:
> In file included from rdma-
> core/build/include/infiniband/ib_user_ioctl_verbs.h:38:
> include/rdma/ib_user_verbs.h:161:28: fatal error:
> zero size arrays are an extension [-Wzero-length-array]
> __aligned_u64 driver_data0;
> ^
> 1 error generated.
> 
> As a result, buildtools/auto-config-h.sh was not generating
> a correct autoconf file, so the compilation was generating such
> error:
> 
> fatal error: redefinition of
> 'mlx5_ib_uapi_flow_action_packet_reformat_type'
> 
> It is fixed by disabling -pedantic option when calling auto-config-
> h.sh
> from the makefile-based system.
> 
> Cc: 
> adrien.mazarguil@6wind.com
> 
> Cc: 
> stable@dpdk.org
> 
> 
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >

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

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH 5/6] devtools: test compiler availability only once
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 5/6] devtools: test compiler availability only once Thomas Monjalon
@ 2019-08-13  9:40   ` Luca Boccassi
  0 siblings, 0 replies; 16+ messages in thread
From: Luca Boccassi @ 2019-08-13  9:40 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson; +Cc: dev

On Tue, 2019-08-13 at 01:03 +0200, Thomas Monjalon wrote:
> The compilation test is skipped if the compiler is not available.
> In the case of gcc/arm, it was tested both in the generic function
> "build" and in the cross-compilation section.
> 
> By passing the compiler as argument of the generic function,
> the test with "command" is done only once.
> 
> This small clean-up has the benefit of introducing the compiler
> parameter to be used later in another improvement.
> 
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >
> ---
>  devtools/test-meson-builds.sh | 33 ++++++++++++++++-----------------
>  1 file changed, 16 insertions(+), 17 deletions(-)

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

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH 6/6] devtools: load target-specific compilation environment
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 6/6] devtools: load target-specific compilation environment Thomas Monjalon
@ 2019-08-13  9:41   ` Luca Boccassi
  0 siblings, 0 replies; 16+ messages in thread
From: Luca Boccassi @ 2019-08-13  9:41 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson; +Cc: dev

On Tue, 2019-08-13 at 01:03 +0200, Thomas Monjalon wrote:
> In order to re-use the same test environment as with
> test-build.sh, the configuration file is loaded at each build,
> after adjusting the variable DPDK_TARGET.
> 
> This is especially useful to set the variable PKG_CONFIG_PATH,
> or define some meson options (without -D) in DPDK_MESON_OPTIONS.
> 
> The DPDK_TARGET values can be
>         aarch64-*, powerpc64-*, x86_64-*.
> The matching DPDK_TARGET values for test-build.sh are
>         arm64-*, ppc_64-*, x86_64-*.
> The advised expressions to use in the common configuration file are:
>         if echo $DPDK_TARGET | grep -q '^a.*64-' ; then
>         elif echo $DPDK_TARGET | grep -q '^p.*pc.*64' ; then
>         elif echo $DPDK_TARGET | grep -q '^x86_64' ; then
>         fi
> 
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >
> ---
>  devtools/test-meson-builds.sh | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)

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

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path Thomas Monjalon
  2019-08-13  9:38   ` Luca Boccassi
@ 2019-08-14  8:39   ` Matan Azrad
  1 sibling, 0 replies; 16+ messages in thread
From: Matan Azrad @ 2019-08-14  8:39 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson, Shahaf Shuler, Yongseok Koh,
	Slava Ovsiienko
  Cc: dev, stable, Luca Boccassi



From: Thomas Monjalon <thomas@monjalon.net>
> If rdma-core is not installed in a standard directory of the system, it is
> possible to specify the location of the pkgconfig file via an environment
> variable:
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/rdma-core/build/lib/pkgconfig
> 
> In this case, the dependency may become mandatory to specify for the
> configuration tests (checking dependency symbols or fields).
> 
> Some spacing is also fixed around.
> 
> Fixes: 8e4937640022 ("net/mlx4: add external allocator for Verbs object")
> Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
> Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
> Cc: stable@dpdk.org
> 
> Suggested-by: Luca Boccassi <bluca@debian.org>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>

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

* Re: [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc Thomas Monjalon
  2019-08-13  9:39   ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
@ 2019-08-14 10:19   ` " Matan Azrad
  1 sibling, 0 replies; 16+ messages in thread
From: Matan Azrad @ 2019-08-14 10:19 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson, Shahaf Shuler, Yongseok Koh,
	Slava Ovsiienko
  Cc: dev, Adrien Mazarguil, stable

From: Thomas Monjalon <thomas@monjalon.net>
> With VERBOSE=1, this error was seen in debug mode with gcc 9.1:
> 
> In file included from /tmp/dpdk.auto-config-h.sh.c.w0VWMi:1:
> In file included from rdma-core/build/include/infiniband/mlx5dv.h:47:
> In file included from rdma-core/build/include/infiniband/verbs.h:46:
> In file included from rdma-core/build/include/infiniband/verbs_api.h:66:
> In file included from rdma-
> core/build/include/infiniband/ib_user_ioctl_verbs.h:38:
> include/rdma/ib_user_verbs.h:161:28: fatal error:
> zero size arrays are an extension [-Wzero-length-array]
> __aligned_u64 driver_data0;
> ^
> 1 error generated.
> 
> As a result, buildtools/auto-config-h.sh was not generating a correct
> autoconf file, so the compilation was generating such error:
> 
> fatal error: redefinition of
> 'mlx5_ib_uapi_flow_action_packet_reformat_type'
> 
> It is fixed by disabling -pedantic option when calling auto-config-h.sh from
> the makefile-based system.
> 
> Cc: adrien.mazarguil@6wind.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>

Consider to create more patches to cleanup the compiler commands to ignore pedantic in the code.

Matan

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

* Re: [dpdk-dev] [PATCH 0/6] build system improvements
  2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
                   ` (5 preceding siblings ...)
  2019-08-12 23:03 ` [dpdk-dev] [PATCH 6/6] devtools: load target-specific compilation environment Thomas Monjalon
@ 2019-09-12 16:23 ` Thomas Monjalon
  6 siblings, 0 replies; 16+ messages in thread
From: Thomas Monjalon @ 2019-09-12 16:23 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson

13/08/2019 01:03, Thomas Monjalon:
> While testing compilation of mlx drivers,
> I hit some issues and misses.
> The result is 6 patches of cleanup, fixes and test improvements.
> 
> Thomas Monjalon (6):
>   build: remove redundant libs from pkgconfig
>   drivers: add some reasons for meson disabling
>   net/mlx: fix meson build with custom dependency path
>   net/mlx: fix build with make and recent gcc
>   devtools: test compiler availability only once
>   devtools: load target-specific compilation environment
> 
>  devtools/test-meson-builds.sh         | 52 +++++++++++++++++----------
>  drivers/baseband/turbo_sw/meson.build |  1 +
>  drivers/compress/isal/meson.build     |  1 -
>  drivers/net/af_xdp/meson.build        |  1 -
>  drivers/net/memif/meson.build         |  5 +--
>  drivers/net/mlx4/Makefile             |  3 +-
>  drivers/net/mlx4/meson.build          |  9 ++---
>  drivers/net/mlx5/Makefile             |  3 +-
>  drivers/net/mlx5/meson.build          |  7 ++--
>  drivers/raw/ioat/meson.build          |  1 +
>  10 files changed, 52 insertions(+), 31 deletions(-)

Applied




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

end of thread, back to index

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 23:03 [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon
2019-08-12 23:03 ` [dpdk-dev] [PATCH 1/6] build: remove redundant libs from pkgconfig Thomas Monjalon
2019-08-13  9:37   ` Luca Boccassi
2019-08-12 23:03 ` [dpdk-dev] [PATCH 2/6] drivers: add some reasons for meson disabling Thomas Monjalon
2019-08-13  9:38   ` Luca Boccassi
2019-08-12 23:03 ` [dpdk-dev] [PATCH 3/6] net/mlx: fix meson build with custom dependency path Thomas Monjalon
2019-08-13  9:38   ` Luca Boccassi
2019-08-14  8:39   ` Matan Azrad
2019-08-12 23:03 ` [dpdk-dev] [PATCH 4/6] net/mlx: fix build with make and recent gcc Thomas Monjalon
2019-08-13  9:39   ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
2019-08-14 10:19   ` [dpdk-dev] " Matan Azrad
2019-08-12 23:03 ` [dpdk-dev] [PATCH 5/6] devtools: test compiler availability only once Thomas Monjalon
2019-08-13  9:40   ` Luca Boccassi
2019-08-12 23:03 ` [dpdk-dev] [PATCH 6/6] devtools: load target-specific compilation environment Thomas Monjalon
2019-08-13  9:41   ` Luca Boccassi
2019-09-12 16:23 ` [dpdk-dev] [PATCH 0/6] build system improvements Thomas Monjalon

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox