* [dpdk-stable] [PATCH 1/6] meson: disable octeontx for buggy compilers on arm64
[not found] <20190412232451.30197-1-yskoh@mellanox.com>
@ 2019-04-12 23:24 ` Yongseok Koh
2019-04-13 5:52 ` [dpdk-stable] [EXT] " Pavan Nikhilesh Bhagavatula
2019-04-12 23:24 ` [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build Yongseok Koh
` (2 subsequent siblings)
3 siblings, 1 reply; 20+ messages in thread
From: Yongseok Koh @ 2019-04-12 23:24 UTC (permalink / raw)
To: bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, stable
Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler
error" for aarch64
Fixes: bd77f2d64c44 ("event/octeontx: build with meson")
Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on arm64")
Cc: pbhagavatula@marvell.com
Cc: jerinj@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/event/meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/event/meson.build b/drivers/event/meson.build
index 836ecbb74b..d364871d15 100644
--- a/drivers/event/meson.build
+++ b/drivers/event/meson.build
@@ -1,7 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-drivers = ['dpaa', 'dpaa2', 'octeontx', 'opdl', 'skeleton', 'sw', 'dsw']
+drivers = ['dpaa', 'dpaa2', 'opdl', 'skeleton', 'sw', 'dsw']
+if (toolchain == 'gcc' and cc.version().version_compare('>=4.8.6') and
+ dpdk_conf.has('RTE_ARCH_ARM64'))
+ drivers += 'octeontx'
+endif
std_deps = ['eventdev', 'kvargs']
config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
driver_name_fmt = 'rte_pmd_@0@_event'
--
2.21.0.196.g041f5ea
^ permalink raw reply [flat|nested] 20+ messages in thread
* [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
[not found] <20190412232451.30197-1-yskoh@mellanox.com>
2019-04-12 23:24 ` [dpdk-stable] [PATCH 1/6] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
@ 2019-04-12 23:24 ` Yongseok Koh
2019-04-15 9:19 ` Bruce Richardson
2019-04-15 10:12 ` Luca Boccassi
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
2019-04-18 11:49 ` [dpdk-stable] [PATCH v3 1/4] drivers/event: " Yongseok Koh
3 siblings, 2 replies; 20+ messages in thread
From: Yongseok Koh @ 2019-04-12 23:24 UTC (permalink / raw)
To: bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, bluca, stable
If MLNX_OFED is installed, there's no .pc file installed for libraries and
dependency() can't find libraries by pkg-config. By adding fallback of
using cc.find_library(), libraries are properly located.
Fixes: e30b4e566f47 ("build: improve dependency handling")
Cc: bluca@debian.org
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx4/meson.build | 19 +++++++++++--------
drivers/net/mlx5/meson.build | 19 +++++++++++--------
2 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index de020701d1..9082f69f25 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -13,21 +13,24 @@ if pmd_dlopen
'-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libs = [
- dependency('libmnl', required:false),
- dependency('libmlx4', required:false),
- dependency('libibverbs', required:false),
-]
+libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
+lib_deps = []
build = true
foreach lib:libs
- if not lib.found()
+ lib_dep = dependency(lib, required:false)
+ if not lib_dep.found()
+ lib_dep = cc.find_library(lib, required:false)
+ endif
+ if lib_dep.found()
+ lib_deps += [ lib_dep ]
+ else
build = false
endif
endforeach
# Compile PMD
if build
allow_experimental_apis = true
- ext_deps += libs
+ ext_deps += lib_deps
sources = files(
'mlx4.c',
'mlx4_ethdev.c',
@@ -103,7 +106,7 @@ if pmd_dlopen and build
dlopen_sources,
include_directories: global_inc,
c_args: cflags,
- dependencies: libs,
+ dependencies: libs_deps,
link_args: [
'-Wl,-export-dynamic',
'-Wl,-h,@0@'.format(LIB_GLUE),
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index a4c684e1b5..42701c51de 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -13,20 +13,23 @@ if pmd_dlopen
'-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libs = [
- dependency('libmnl', required:false),
- dependency('libmlx5', required:false),
- dependency('libibverbs', required:false),
-]
+libs = [ 'libmnl', 'libmlx5', 'libibverbs' ]
+lib_deps = []
build = true
foreach lib:libs
- if not lib.found()
+ lib_dep = dependency(lib, required:false)
+ if not lib_dep.found()
+ lib_dep = cc.find_library(lib, required:false)
+ endif
+ if lib_dep.found()
+ lib_deps += [ lib_dep ]
+ else
build = false
endif
endforeach
if build
allow_experimental_apis = true
- ext_deps += libs
+ ext_deps += lib_deps
sources = files(
'mlx5.c',
'mlx5_ethdev.c',
@@ -299,7 +302,7 @@ if pmd_dlopen and build
dlopen_sources,
include_directories: global_inc,
c_args: cflags,
- dependencies: libs,
+ dependencies: lib_deps,
link_args: [
'-Wl,-export-dynamic',
'-Wl,-h,@0@'.format(LIB_GLUE),
--
2.21.0.196.g041f5ea
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [EXT] [PATCH 1/6] meson: disable octeontx for buggy compilers on arm64
2019-04-12 23:24 ` [dpdk-stable] [PATCH 1/6] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
@ 2019-04-13 5:52 ` Pavan Nikhilesh Bhagavatula
2019-04-15 18:16 ` Yongseok Koh
0 siblings, 1 reply; 20+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2019-04-13 5:52 UTC (permalink / raw)
To: Yongseok Koh, bruce.richardson, Jerin Jacob Kollanukkaran, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, stable
Hi Yongseok,
>----------------------------------------------------------------------
>Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler error"
>for aarch64
>
>Fixes: bd77f2d64c44 ("event/octeontx: build with meson")
>Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
>Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on
>arm64")
>Cc: pbhagavatula@marvell.com
>Cc: jerinj@marvell.com
>Cc: stable@dpdk.org
>
>Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
>---
> drivers/event/meson.build | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/event/meson.build b/drivers/event/meson.build index
>836ecbb74b..d364871d15 100644
>--- a/drivers/event/meson.build
>+++ b/drivers/event/meson.build
>@@ -1,7 +1,11 @@
> # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation
>
>-drivers = ['dpaa', 'dpaa2', 'octeontx', 'opdl', 'skeleton', 'sw', 'dsw']
>+drivers = ['dpaa', 'dpaa2', 'opdl', 'skeleton', 'sw', 'dsw'] if
>+(toolchain == 'gcc' and cc.version().version_compare('>=4.8.6') and
>+ dpdk_conf.has('RTE_ARCH_ARM64'))
Can we make this similar to MAKEFILE[1] case where octeontx is enabled for everycase except when
We are compiling for ARCH_ARM64 is set and compiler is less than < 4.8.6?.
The reason being we want x86 CI to run (compilation part) to find any errors.
[1]
'
ifeq ($(CONFIG_RTE_ARCH), arm64)
ifeq ($(shell test $(GCC_VERSION)$(GCC_PATCHLEVEL) -lt 486 && echo 1), 1)
CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=d
CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=d
CONFIG_RTE_LIBRTE_OCTEONTX_PMD=d
endif
endif
'
>+ drivers += 'octeontx'
>+endif
> std_deps = ['eventdev', 'kvargs']
> config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
> driver_name_fmt = 'rte_pmd_@0@_event'
>--
>2.21.0.196.g041f5ea
Regards,
Pavan.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
2019-04-12 23:24 ` [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build Yongseok Koh
@ 2019-04-15 9:19 ` Bruce Richardson
2019-04-15 19:48 ` Yongseok Koh
2019-04-15 10:12 ` Luca Boccassi
1 sibling, 1 reply; 20+ messages in thread
From: Bruce Richardson @ 2019-04-15 9:19 UTC (permalink / raw)
To: Yongseok Koh
Cc: jerinj, pbhagavatula, shahafs, dev, thomas, gavin.hu,
Honnappa.Nagarahalli, bluca, stable
On Fri, Apr 12, 2019 at 04:24:48PM -0700, Yongseok Koh wrote:
> If MLNX_OFED is installed, there's no .pc file installed for libraries and
> dependency() can't find libraries by pkg-config. By adding fallback of
> using cc.find_library(), libraries are properly located.
>
> Fixes: e30b4e566f47 ("build: improve dependency handling")
> Cc: bluca@debian.org
> Cc: stable@dpdk.org
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
> drivers/net/mlx4/meson.build | 19 +++++++++++--------
> drivers/net/mlx5/meson.build | 19 +++++++++++--------
> 2 files changed, 22 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
> index de020701d1..9082f69f25 100644
> --- a/drivers/net/mlx4/meson.build
> +++ b/drivers/net/mlx4/meson.build
> @@ -13,21 +13,24 @@ if pmd_dlopen
> '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
> ]
> endif
> -libs = [
> - dependency('libmnl', required:false),
> - dependency('libmlx4', required:false),
> - dependency('libibverbs', required:false),
> -]
> +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
> +lib_deps = []
Minor suggestion - you can reduce the size of the diff in this patch by
defining the first array as "libnames" and keeping the actual dependency
objects as "libs".
/Bruce
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
2019-04-12 23:24 ` [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build Yongseok Koh
2019-04-15 9:19 ` Bruce Richardson
@ 2019-04-15 10:12 ` Luca Boccassi
2019-04-15 19:48 ` Yongseok Koh
1 sibling, 1 reply; 20+ messages in thread
From: Luca Boccassi @ 2019-04-15 10:12 UTC (permalink / raw)
To: Yongseok Koh, bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, stable
On Fri, 2019-04-12 at 16:24 -0700, Yongseok Koh wrote:
> If MLNX_OFED is installed, there's no .pc file installed for
> libraries and
> dependency() can't find libraries by pkg-config. By adding fallback
> of
> using cc.find_library(), libraries are properly located.
>
> Fixes: e30b4e566f47 ("build: improve dependency handling")
> Cc:
> bluca@debian.org
>
> Cc:
> stable@dpdk.org
>
>
> Signed-off-by: Yongseok Koh <
> yskoh@mellanox.com
> >
> ---
> drivers/net/mlx4/meson.build | 19 +++++++++++--------
> drivers/net/mlx5/meson.build | 19 +++++++++++--------
> 2 files changed, 22 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/mlx4/meson.build
> b/drivers/net/mlx4/meson.build
> index de020701d1..9082f69f25 100644
> --- a/drivers/net/mlx4/meson.build
> +++ b/drivers/net/mlx4/meson.build
> @@ -13,21 +13,24 @@ if pmd_dlopen
> '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
> ]
> endif
> -libs = [
> - dependency('libmnl', required:false),
> - dependency('libmlx4', required:false),
> - dependency('libibverbs', required:false),
> -]
> +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
> +lib_deps = []
> build = true
> foreach lib:libs
> - if not lib.found()
> + lib_dep = dependency(lib, required:false)
> + if not lib_dep.found()
> + lib_dep = cc.find_library(lib, required:false)
Doesn't this end up trying to link the test program to -llibmnl and
thus failing?
> + endif
> + if lib_dep.found()
> + lib_deps += [ lib_dep ]
> + else
> build = false
> endif
> endforeach
> # Compile PMD
> if build
> allow_experimental_apis = true
> - ext_deps += libs
> + ext_deps += lib_deps
> sources = files(
> 'mlx4.c',
> 'mlx4_ethdev.c',
> @@ -103,7 +106,7 @@ if pmd_dlopen and build
> dlopen_sources,
> include_directories: global_inc,
> c_args: cflags,
> - dependencies: libs,
> + dependencies: libs_deps,
> link_args: [
> '-Wl,-export-dynamic',
> '-Wl,-h,@0@'.format(LIB_GLUE),
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [EXT] [PATCH 1/6] meson: disable octeontx for buggy compilers on arm64
2019-04-13 5:52 ` [dpdk-stable] [EXT] " Pavan Nikhilesh Bhagavatula
@ 2019-04-15 18:16 ` Yongseok Koh
0 siblings, 0 replies; 20+ messages in thread
From: Yongseok Koh @ 2019-04-15 18:16 UTC (permalink / raw)
To: Pavan Nikhilesh Bhagavatula
Cc: bruce.richardson, Jerin Jacob Kollanukkaran, Shahaf Shuler, dev,
Thomas Monjalon, gavin.hu, Honnappa.Nagarahalli, stable
> On Apr 12, 2019, at 10:52 PM, Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com> wrote:
>
> Hi Yongseok,
>
>> ----------------------------------------------------------------------
>> Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler error"
>> for aarch64
>>
>> Fixes: bd77f2d64c44 ("event/octeontx: build with meson")
>> Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
>> Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on
>> arm64")
>> Cc: pbhagavatula@marvell.com
>> Cc: jerinj@marvell.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
>> ---
>> drivers/event/meson.build | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/event/meson.build b/drivers/event/meson.build index
>> 836ecbb74b..d364871d15 100644
>> --- a/drivers/event/meson.build
>> +++ b/drivers/event/meson.build
>> @@ -1,7 +1,11 @@
>> # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation
>>
>> -drivers = ['dpaa', 'dpaa2', 'octeontx', 'opdl', 'skeleton', 'sw', 'dsw']
>> +drivers = ['dpaa', 'dpaa2', 'opdl', 'skeleton', 'sw', 'dsw'] if
>> +(toolchain == 'gcc' and cc.version().version_compare('>=4.8.6') and
>> + dpdk_conf.has('RTE_ARCH_ARM64'))
>
> Can we make this similar to MAKEFILE[1] case where octeontx is enabled for everycase except when
> We are compiling for ARCH_ARM64 is set and compiler is less than < 4.8.6?.
> The reason being we want x86 CI to run (compilation part) to find any errors.
>
> [1]
> '
> ifeq ($(CONFIG_RTE_ARCH), arm64)
> ifeq ($(shell test $(GCC_VERSION)$(GCC_PATCHLEVEL) -lt 486 && echo 1), 1)
> CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=d
> CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=d
> CONFIG_RTE_LIBRTE_OCTEONTX_PMD=d
> endif
> endif
> '
OMG, I was very wrong about the patch. That was Friday and I was moving fast. :-)
Will fix it in v2.
thanks,
Yongseok
>
>> + drivers += 'octeontx'
>> +endif
>> std_deps = ['eventdev', 'kvargs']
>> config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
>> driver_name_fmt = 'rte_pmd_@0@_event'
>> --
>> 2.21.0.196.g041f5ea
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
2019-04-15 10:12 ` Luca Boccassi
@ 2019-04-15 19:48 ` Yongseok Koh
2019-04-18 9:25 ` Luca Boccassi
0 siblings, 1 reply; 20+ messages in thread
From: Yongseok Koh @ 2019-04-15 19:48 UTC (permalink / raw)
To: Luca Boccassi
Cc: Bruce Richardson, Jerin Jacob Kollanukkaran,
Pavan Nikhilesh Bhagavatula, Shahaf Shuler, dev, Thomas Monjalon,
Gavin Hu (Arm Technology China),
Honnappa Nagarahalli, stable
Hi,
Thanks,
Yongseok
> On Apr 15, 2019, at 3:12 AM, Luca Boccassi <bluca@debian.org> wrote:
>
> On Fri, 2019-04-12 at 16:24 -0700, Yongseok Koh wrote:
>> If MLNX_OFED is installed, there's no .pc file installed for
>> libraries and
>> dependency() can't find libraries by pkg-config. By adding fallback
>> of
>> using cc.find_library(), libraries are properly located.
>>
>> Fixes: e30b4e566f47 ("build: improve dependency handling")
>> Cc:
>> bluca@debian.org
>>
>> Cc:
>> stable@dpdk.org
>>
>>
>> Signed-off-by: Yongseok Koh <
>> yskoh@mellanox.com
>>>
>> ---
>> drivers/net/mlx4/meson.build | 19 +++++++++++--------
>> drivers/net/mlx5/meson.build | 19 +++++++++++--------
>> 2 files changed, 22 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/net/mlx4/meson.build
>> b/drivers/net/mlx4/meson.build
>> index de020701d1..9082f69f25 100644
>> --- a/drivers/net/mlx4/meson.build
>> +++ b/drivers/net/mlx4/meson.build
>> @@ -13,21 +13,24 @@ if pmd_dlopen
>> '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
>> ]
>> endif
>> -libs = [
>> - dependency('libmnl', required:false),
>> - dependency('libmlx4', required:false),
>> - dependency('libibverbs', required:false),
>> -]
>> +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
>> +lib_deps = []
>> build = true
>> foreach lib:libs
>> - if not lib.found()
>> + lib_dep = dependency(lib, required:false)
>> + if not lib_dep.found()
>> + lib_dep = cc.find_library(lib, required:false)
>
> Doesn't this end up trying to link the test program to -llibmnl and
> thus failing?
I also worried about that. But it works fine.
Looks meson is smart enough. :-)
>> + endif
>> + if lib_dep.found()
>> + lib_deps += [ lib_dep ]
>> + else
>> build = false
>> endif
>> endforeach
>> # Compile PMD
>> if build
>> allow_experimental_apis = true
>> - ext_deps += libs
>> + ext_deps += lib_deps
>> sources = files(
>> 'mlx4.c',
>> 'mlx4_ethdev.c',
>> @@ -103,7 +106,7 @@ if pmd_dlopen and build
>> dlopen_sources,
>> include_directories: global_inc,
>> c_args: cflags,
>> - dependencies: libs,
>> + dependencies: libs_deps,
>> link_args: [
>> '-Wl,-export-dynamic',
>> '-Wl,-h,@0@'.format(LIB_GLUE),
>
> --
> Kind regards,
> Luca Boccassi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
2019-04-15 9:19 ` Bruce Richardson
@ 2019-04-15 19:48 ` Yongseok Koh
0 siblings, 0 replies; 20+ messages in thread
From: Yongseok Koh @ 2019-04-15 19:48 UTC (permalink / raw)
To: Bruce Richardson
Cc: jerinj, pbhagavatula, Shahaf Shuler, dev, Thomas Monjalon,
gavin.hu, Honnappa.Nagarahalli, bluca, stable
> On Apr 15, 2019, at 2:19 AM, Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> On Fri, Apr 12, 2019 at 04:24:48PM -0700, Yongseok Koh wrote:
>> If MLNX_OFED is installed, there's no .pc file installed for libraries and
>> dependency() can't find libraries by pkg-config. By adding fallback of
>> using cc.find_library(), libraries are properly located.
>>
>> Fixes: e30b4e566f47 ("build: improve dependency handling")
>> Cc: bluca@debian.org
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
>> ---
>> drivers/net/mlx4/meson.build | 19 +++++++++++--------
>> drivers/net/mlx5/meson.build | 19 +++++++++++--------
>> 2 files changed, 22 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
>> index de020701d1..9082f69f25 100644
>> --- a/drivers/net/mlx4/meson.build
>> +++ b/drivers/net/mlx4/meson.build
>> @@ -13,21 +13,24 @@ if pmd_dlopen
>> '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
>> ]
>> endif
>> -libs = [
>> - dependency('libmnl', required:false),
>> - dependency('libmlx4', required:false),
>> - dependency('libibverbs', required:false),
>> -]
>> +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
>> +lib_deps = []
>
> Minor suggestion - you can reduce the size of the diff in this patch by
> defining the first array as "libnames" and keeping the actual dependency
> objects as "libs".
Sounds good to me.
Will take the suggestion in my v2.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [dpdk-stable] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64
[not found] <20190412232451.30197-1-yskoh@mellanox.com>
2019-04-12 23:24 ` [dpdk-stable] [PATCH 1/6] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
2019-04-12 23:24 ` [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build Yongseok Koh
@ 2019-04-18 1:47 ` Yongseok Koh
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 3/4] net/mlx: fix library search in meson build Yongseok Koh
2019-04-18 7:21 ` [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Jerin Jacob Kollanukkaran
2019-04-18 11:49 ` [dpdk-stable] [PATCH v3 1/4] drivers/event: " Yongseok Koh
3 siblings, 2 replies; 20+ messages in thread
From: Yongseok Koh @ 2019-04-18 1:47 UTC (permalink / raw)
To: bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, stable
Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler
error" for aarch64
Fixes: bd77f2d64c44 ("event/octeontx: build with meson")
Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on arm64")
Cc: pbhagavatula@marvell.com
Cc: jerinj@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
v2:
* fix bug - enable octeontx unless the buggy compiler is used
drivers/event/meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/event/meson.build b/drivers/event/meson.build
index 836ecbb74b..fb723f727b 100644
--- a/drivers/event/meson.build
+++ b/drivers/event/meson.build
@@ -1,7 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-drivers = ['dpaa', 'dpaa2', 'octeontx', 'opdl', 'skeleton', 'sw', 'dsw']
+drivers = ['dpaa', 'dpaa2', 'opdl', 'skeleton', 'sw', 'dsw']
+if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and
+ dpdk_conf.has('RTE_ARCH_ARM64'))
+ drivers += 'octeontx'
+endif
std_deps = ['eventdev', 'kvargs']
config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
driver_name_fmt = 'rte_pmd_@0@_event'
--
2.11.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [dpdk-stable] [PATCH v2 3/4] net/mlx: fix library search in meson build
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
@ 2019-04-18 1:47 ` Yongseok Koh
2019-04-18 7:21 ` [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Jerin Jacob Kollanukkaran
1 sibling, 0 replies; 20+ messages in thread
From: Yongseok Koh @ 2019-04-18 1:47 UTC (permalink / raw)
To: bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, bluca, stable
If MLNX_OFED is installed, there's no .pc file installed for libraries and
dependency() can't find libraries by pkg-config. By adding fallback of
using cc.find_library(), libraries are properly located.
Fixes: e30b4e566f47 ("build: improve dependency handling")
Cc: bluca@debian.org
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
v2:
* change variable names to minimize code change
drivers/net/mlx4/meson.build | 15 +++++++++------
drivers/net/mlx5/meson.build | 15 +++++++++------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index de020701d1..9d04dd930d 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -13,14 +13,17 @@ if pmd_dlopen
'-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libs = [
- dependency('libmnl', required:false),
- dependency('libmlx4', required:false),
- dependency('libibverbs', required:false),
-]
+libnames = [ 'libmnl', 'libmlx4', 'libibverbs' ]
+libs = []
build = true
-foreach lib:libs
+foreach libname:libnames
+ lib = dependency(libname, required:false)
if not lib.found()
+ lib = cc.find_library(libname, required:false)
+ endif
+ if lib.found()
+ libs += [ lib ]
+ else
build = false
endif
endforeach
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index a4c684e1b5..ee8399af27 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -13,14 +13,17 @@ if pmd_dlopen
'-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libs = [
- dependency('libmnl', required:false),
- dependency('libmlx5', required:false),
- dependency('libibverbs', required:false),
-]
+libnames = [ 'libmnl', 'libmlx5', 'libibverbs' ]
+libs = []
build = true
-foreach lib:libs
+foreach libname:libnames
+ lib = dependency(libname, required:false)
if not lib.found()
+ lib = cc.find_library(libname, required:false)
+ endif
+ if lib.found()
+ libs += [ lib ]
+ else
build = false
endif
endforeach
--
2.11.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 3/4] net/mlx: fix library search in meson build Yongseok Koh
@ 2019-04-18 7:21 ` Jerin Jacob Kollanukkaran
2019-04-18 10:41 ` Yongseok Koh
1 sibling, 1 reply; 20+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-04-18 7:21 UTC (permalink / raw)
To: Yongseok Koh, bruce.richardson, Pavan Nikhilesh Bhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, stable
> -----Original Message-----
> From: Yongseok Koh <yskoh@mellanox.com>
> Sent: Thursday, April 18, 2019 7:17 AM
> To: bruce.richardson@intel.com; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>; shahafs@mellanox.com
> Cc: dev@dpdk.org; thomas@monjalon.net; gavin.hu@arm.com;
> Honnappa.Nagarahalli@arm.com; stable@dpdk.org
> Subject: [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on
> arm64
> ----------------------------------------------------------------------
> Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler error"
> for aarch64
>
> Fixes: bd77f2d64c44 ("event/octeontx: build with meson")
> Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
> Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on
> arm64")
> Cc: pbhagavatula@marvell.com
> Cc: jerinj@marvell.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Nit:
[master] [dpdk.org] $ ./devtools/check-git-log.sh
Wrong headline prefix:
meson: disable octeontx for buggy compilers on arm64
With above fix:
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
2019-04-15 19:48 ` Yongseok Koh
@ 2019-04-18 9:25 ` Luca Boccassi
2019-04-18 10:14 ` Bruce Richardson
0 siblings, 1 reply; 20+ messages in thread
From: Luca Boccassi @ 2019-04-18 9:25 UTC (permalink / raw)
To: Yongseok Koh
Cc: Bruce Richardson, Jerin Jacob Kollanukkaran,
Pavan Nikhilesh Bhagavatula, Shahaf Shuler, dev, Thomas Monjalon,
Gavin Hu (Arm Technology China),
Honnappa Nagarahalli, stable
On Mon, 2019-04-15 at 19:48 +0000, Yongseok Koh wrote:
> Hi,
>
>
>
> Thanks,
> Yongseok
>
> > On Apr 15, 2019, at 3:12 AM, Luca Boccassi <
> > bluca@debian.org
> > > wrote:
> >
> > On Fri, 2019-04-12 at 16:24 -0700, Yongseok Koh wrote:
> > > If MLNX_OFED is installed, there's no .pc file installed for
> > > libraries and
> > > dependency() can't find libraries by pkg-config. By adding
> > > fallback
> > > of
> > > using cc.find_library(), libraries are properly located.
> > >
> > > Fixes: e30b4e566f47 ("build: improve dependency handling")
> > > Cc:
> > > bluca@debian.org
> > >
> > >
> > > Cc:
> > > stable@dpdk.org
> > >
> > >
> > >
> > > Signed-off-by: Yongseok Koh <
> > > yskoh@mellanox.com
> > >
> > >
> > > ---
> > > drivers/net/mlx4/meson.build | 19 +++++++++++--------
> > > drivers/net/mlx5/meson.build | 19 +++++++++++--------
> > > 2 files changed, 22 insertions(+), 16 deletions(-)
> > >
> > > diff --git a/drivers/net/mlx4/meson.build
> > > b/drivers/net/mlx4/meson.build
> > > index de020701d1..9082f69f25 100644
> > > --- a/drivers/net/mlx4/meson.build
> > > +++ b/drivers/net/mlx4/meson.build
> > > @@ -13,21 +13,24 @@ if pmd_dlopen
> > > '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
> > > ]
> > > endif
> > > -libs = [
> > > - dependency('libmnl', required:false),
> > > - dependency('libmlx4', required:false),
> > > - dependency('libibverbs', required:false),
> > > -]
> > > +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
> > > +lib_deps = []
> > > build = true
> > > foreach lib:libs
> > > - if not lib.found()
> > > + lib_dep = dependency(lib, required:false)
> > > + if not lib_dep.found()
> > > + lib_dep = cc.find_library(lib, required:false)
> >
> > Doesn't this end up trying to link the test program to -llibmnl and
> > thus failing?
>
> I also worried about that. But it works fine.
> Looks meson is smart enough. :-)
Sorry, not to be skeptical, but at least with the meson version I was
using when doing something similar I'm sure this didn't work -
find_library just takes the parameter, adds "-l" in front of it and
uses it to compile.
In the meson configure log, do you see:
Dependency libmlx4 found: NO
Library libmlx4 found: YES
?
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
2019-04-18 9:25 ` Luca Boccassi
@ 2019-04-18 10:14 ` Bruce Richardson
2019-04-18 11:25 ` Yongseok Koh
0 siblings, 1 reply; 20+ messages in thread
From: Bruce Richardson @ 2019-04-18 10:14 UTC (permalink / raw)
To: Luca Boccassi
Cc: Yongseok Koh, Jerin Jacob Kollanukkaran,
Pavan Nikhilesh Bhagavatula, Shahaf Shuler, dev, Thomas Monjalon,
Gavin Hu (Arm Technology China),
Honnappa Nagarahalli, stable
On Thu, Apr 18, 2019 at 10:25:19AM +0100, Luca Boccassi wrote:
> On Mon, 2019-04-15 at 19:48 +0000, Yongseok Koh wrote:
> > Hi,
> >
> >
> >
> > Thanks,
> > Yongseok
> >
> > > On Apr 15, 2019, at 3:12 AM, Luca Boccassi <
> > > bluca@debian.org
> > > > wrote:
> > >
> > > On Fri, 2019-04-12 at 16:24 -0700, Yongseok Koh wrote:
> > > > If MLNX_OFED is installed, there's no .pc file installed for
> > > > libraries and
> > > > dependency() can't find libraries by pkg-config. By adding
> > > > fallback
> > > > of
> > > > using cc.find_library(), libraries are properly located.
> > > >
> > > > Fixes: e30b4e566f47 ("build: improve dependency handling")
> > > > Cc:
> > > > bluca@debian.org
> > > >
> > > >
> > > > Cc:
> > > > stable@dpdk.org
> > > >
> > > >
> > > >
> > > > Signed-off-by: Yongseok Koh <
> > > > yskoh@mellanox.com
> > > >
> > > >
> > > > ---
> > > > drivers/net/mlx4/meson.build | 19 +++++++++++--------
> > > > drivers/net/mlx5/meson.build | 19 +++++++++++--------
> > > > 2 files changed, 22 insertions(+), 16 deletions(-)
> > > >
> > > > diff --git a/drivers/net/mlx4/meson.build
> > > > b/drivers/net/mlx4/meson.build
> > > > index de020701d1..9082f69f25 100644
> > > > --- a/drivers/net/mlx4/meson.build
> > > > +++ b/drivers/net/mlx4/meson.build
> > > > @@ -13,21 +13,24 @@ if pmd_dlopen
> > > > '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
> > > > ]
> > > > endif
> > > > -libs = [
> > > > - dependency('libmnl', required:false),
> > > > - dependency('libmlx4', required:false),
> > > > - dependency('libibverbs', required:false),
> > > > -]
> > > > +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
> > > > +lib_deps = []
> > > > build = true
> > > > foreach lib:libs
> > > > - if not lib.found()
> > > > + lib_dep = dependency(lib, required:false)
> > > > + if not lib_dep.found()
> > > > + lib_dep = cc.find_library(lib, required:false)
> > >
> > > Doesn't this end up trying to link the test program to -llibmnl and
> > > thus failing?
> >
> > I also worried about that. But it works fine.
> > Looks meson is smart enough. :-)
>
> Sorry, not to be skeptical, but at least with the meson version I was
> using when doing something similar I'm sure this didn't work -
> find_library just takes the parameter, adds "-l" in front of it and
> uses it to compile.
>
> In the meson configure log, do you see:
>
> Dependency libmlx4 found: NO
> Library libmlx4 found: YES
>
My understanding was the same as yours, Luca, and I'm pretty sure older
versions used to have that restriction. I think we should - out of an
abundance of caution - remove the "lib" prefix from all library/dependency
requests.
/Bruce
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64
2019-04-18 7:21 ` [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Jerin Jacob Kollanukkaran
@ 2019-04-18 10:41 ` Yongseok Koh
2019-04-18 11:04 ` Thomas Monjalon
0 siblings, 1 reply; 20+ messages in thread
From: Yongseok Koh @ 2019-04-18 10:41 UTC (permalink / raw)
To: Jerin Jacob Kollanukkaran
Cc: bruce.richardson, Pavan Nikhilesh Bhagavatula, Shahaf Shuler,
dev, Thomas Monjalon, gavin.hu, Honnappa.Nagarahalli, stable
> On Apr 18, 2019, at 12:21 AM, Jerin Jacob Kollanukkaran <jerinj@marvell.com> wrote:
>
>
>> -----Original Message-----
>> From: Yongseok Koh <yskoh@mellanox.com>
>> Sent: Thursday, April 18, 2019 7:17 AM
>> To: bruce.richardson@intel.com; Jerin Jacob Kollanukkaran
>> <jerinj@marvell.com>; Pavan Nikhilesh Bhagavatula
>> <pbhagavatula@marvell.com>; shahafs@mellanox.com
>> Cc: dev@dpdk.org; thomas@monjalon.net; gavin.hu@arm.com;
>> Honnappa.Nagarahalli@arm.com; stable@dpdk.org
>> Subject: [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on
>> arm64
>> ----------------------------------------------------------------------
>> Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler error"
>> for aarch64
>>
>> Fixes: bd77f2d64c44 ("event/octeontx: build with meson")
>> Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
>> Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on
>> arm64")
>> Cc: pbhagavatula@marvell.com
>> Cc: jerinj@marvell.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
>
> Nit:
> [master] [dpdk.org] $ ./devtools/check-git-log.sh
> Wrong headline prefix:
> meson: disable octeontx for buggy compilers on arm64
I was aware but I thought that should be accepted. That seems to be drawback of
the script. The only way to make it silent is :
"event/meson.build: disable octeontx for ..."
I don't think you want this, do you?
I'll keep it as is but let me know if you have better way to fix it.
thanks,
Yongseok
>
> With above fix:
> Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64
2019-04-18 10:41 ` Yongseok Koh
@ 2019-04-18 11:04 ` Thomas Monjalon
2019-04-18 11:10 ` Yongseok Koh
0 siblings, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-18 11:04 UTC (permalink / raw)
To: Yongseok Koh
Cc: Jerin Jacob Kollanukkaran, bruce.richardson,
Pavan Nikhilesh Bhagavatula, Shahaf Shuler, dev, gavin.hu,
Honnappa.Nagarahalli, stable
18/04/2019 12:41, Yongseok Koh:
> > On Apr 18, 2019, at 12:21 AM, Jerin Jacob Kollanukkaran <jerinj@marvell.com> wrote:
> > From: Yongseok Koh <yskoh@mellanox.com>
> > Nit:
> > [master] [dpdk.org] $ ./devtools/check-git-log.sh
> > Wrong headline prefix:
> > meson: disable octeontx for buggy compilers on arm64
>
> I was aware but I thought that should be accepted. That seems to be drawback of
> the script. The only way to make it silent is :
> "event/meson.build: disable octeontx for ..."
> I don't think you want this, do you?
>
> I'll keep it as is but let me know if you have better way to fix it.
drivers/event is the right prefix here.
I can fix it on apply.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64
2019-04-18 11:04 ` Thomas Monjalon
@ 2019-04-18 11:10 ` Yongseok Koh
0 siblings, 0 replies; 20+ messages in thread
From: Yongseok Koh @ 2019-04-18 11:10 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Jerin Jacob Kollanukkaran, bruce.richardson,
Pavan Nikhilesh Bhagavatula, Shahaf Shuler, dev, gavin.hu,
Honnappa.Nagarahalli, stable
> On Apr 18, 2019, at 4:04 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 18/04/2019 12:41, Yongseok Koh:
>>> On Apr 18, 2019, at 12:21 AM, Jerin Jacob Kollanukkaran <jerinj@marvell.com> wrote:
>>> From: Yongseok Koh <yskoh@mellanox.com>
>>> Nit:
>>> [master] [dpdk.org] $ ./devtools/check-git-log.sh
>>> Wrong headline prefix:
>>> meson: disable octeontx for buggy compilers on arm64
>>
>> I was aware but I thought that should be accepted. That seems to be drawback of
>> the script. The only way to make it silent is :
>> "event/meson.build: disable octeontx for ..."
>> I don't think you want this, do you?
>>
>> I'll keep it as is but let me know if you have better way to fix it.
>
> drivers/event is the right prefix here.
I've tested that already but that failed the script either.
I guess you're saying that it should be 'drivers/event:' regardless of the prefix error?
> I can fix it on apply.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build
2019-04-18 10:14 ` Bruce Richardson
@ 2019-04-18 11:25 ` Yongseok Koh
0 siblings, 0 replies; 20+ messages in thread
From: Yongseok Koh @ 2019-04-18 11:25 UTC (permalink / raw)
To: Bruce Richardson, Luca Boccassi
Cc: Jerin Jacob Kollanukkaran, Pavan Nikhilesh Bhagavatula,
Shahaf Shuler, dev, Thomas Monjalon,
Gavin Hu (Arm Technology China),
Honnappa Nagarahalli, stable
> On Apr 18, 2019, at 3:14 AM, Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> On Thu, Apr 18, 2019 at 10:25:19AM +0100, Luca Boccassi wrote:
>> On Mon, 2019-04-15 at 19:48 +0000, Yongseok Koh wrote:
>>> Hi,
>>>
>>>
>>>
>>> Thanks,
>>> Yongseok
>>>
>>>> On Apr 15, 2019, at 3:12 AM, Luca Boccassi <
>>>> bluca@debian.org
>>>>> wrote:
>>>>
>>>> On Fri, 2019-04-12 at 16:24 -0700, Yongseok Koh wrote:
>>>>> If MLNX_OFED is installed, there's no .pc file installed for
>>>>> libraries and
>>>>> dependency() can't find libraries by pkg-config. By adding
>>>>> fallback
>>>>> of
>>>>> using cc.find_library(), libraries are properly located.
>>>>>
>>>>> Fixes: e30b4e566f47 ("build: improve dependency handling")
>>>>> Cc:
>>>>> bluca@debian.org
>>>>>
>>>>>
>>>>> Cc:
>>>>> stable@dpdk.org
>>>>>
>>>>>
>>>>>
>>>>> Signed-off-by: Yongseok Koh <
>>>>> yskoh@mellanox.com
>>>>>
>>>>>
>>>>> ---
>>>>> drivers/net/mlx4/meson.build | 19 +++++++++++--------
>>>>> drivers/net/mlx5/meson.build | 19 +++++++++++--------
>>>>> 2 files changed, 22 insertions(+), 16 deletions(-)
>>>>>
>>>>> diff --git a/drivers/net/mlx4/meson.build
>>>>> b/drivers/net/mlx4/meson.build
>>>>> index de020701d1..9082f69f25 100644
>>>>> --- a/drivers/net/mlx4/meson.build
>>>>> +++ b/drivers/net/mlx4/meson.build
>>>>> @@ -13,21 +13,24 @@ if pmd_dlopen
>>>>> '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
>>>>> ]
>>>>> endif
>>>>> -libs = [
>>>>> - dependency('libmnl', required:false),
>>>>> - dependency('libmlx4', required:false),
>>>>> - dependency('libibverbs', required:false),
>>>>> -]
>>>>> +libs = [ 'libmnl', 'libmlx4', 'libibverbs' ]
>>>>> +lib_deps = []
>>>>> build = true
>>>>> foreach lib:libs
>>>>> - if not lib.found()
>>>>> + lib_dep = dependency(lib, required:false)
>>>>> + if not lib_dep.found()
>>>>> + lib_dep = cc.find_library(lib, required:false)
>>>>
>>>> Doesn't this end up trying to link the test program to -llibmnl and
>>>> thus failing?
>>>
>>> I also worried about that. But it works fine.
>>> Looks meson is smart enough. :-)
>>
>> Sorry, not to be skeptical, but at least with the meson version I was
>> using when doing something similar I'm sure this didn't work -
>> find_library just takes the parameter, adds "-l" in front of it and
>> uses it to compile.
>>
>> In the meson configure log, do you see:
>>
>> Dependency libmlx4 found: NO
>> Library libmlx4 found: YES
Thanks for the note, Luca.
It worked regardless. Compilation's done successfully and the final testpmd
binary was good to run. Don't know how it worked but will change it anyway. Not
a hard task. Here's the diff.
$ git diff
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 9d04dd930d..2540489bb7 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -13,11 +13,11 @@ if pmd_dlopen
'-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libnames = [ 'libmnl', 'libmlx4', 'libibverbs' ]
+libnames = [ 'mnl', 'mlx4', 'ibverbs' ]
libs = []
build = true
foreach libname:libnames
- lib = dependency(libname, required:false)
+ lib = dependency('lib' + libname, required:false)
if not lib.found()
lib = cc.find_library(libname, required:false)
endif
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index ee8399af27..1a65c3a989 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -13,11 +13,11 @@ if pmd_dlopen
'-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libnames = [ 'libmnl', 'libmlx5', 'libibverbs' ]
+libnames = [ 'mnl', 'mlx5', 'ibverbs' ]
libs = []
build = true
foreach libname:libnames
- lib = dependency(libname, required:false)
+ lib = dependency('lib' + libname, required:false)
if not lib.found()
lib = cc.find_library(libname, required:false)
endif
Then, it will give us:
Dependency libmnl found: NO
Library mnl found: YES
Dependency libmlx5 found: NO
Library mlx5 found: YES
Dependency libibverbs found: NO
Library ibverbs found: YES
Thanks,
Yongseok
^ permalink raw reply [flat|nested] 20+ messages in thread
* [dpdk-stable] [PATCH v3 1/4] drivers/event: disable octeontx for buggy compilers on arm64
[not found] <20190412232451.30197-1-yskoh@mellanox.com>
` (2 preceding siblings ...)
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
@ 2019-04-18 11:49 ` Yongseok Koh
2019-04-18 11:49 ` [dpdk-stable] [PATCH v3 3/4] net/mlx: fix library search in meson build Yongseok Koh
3 siblings, 1 reply; 20+ messages in thread
From: Yongseok Koh @ 2019-04-18 11:49 UTC (permalink / raw)
To: bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, stable
Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler
error" for aarch64
Fixes: bd77f2d64c44 ("event/octeontx: build with meson")
Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on arm64")
Cc: pbhagavatula@marvell.com
Cc: jerinj@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
v3:
* fix prefix of the title
v2:
* fix bug - enable octeontx unless the buggy compiler is used
drivers/event/meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/event/meson.build b/drivers/event/meson.build
index 836ecbb74b..fb723f727b 100644
--- a/drivers/event/meson.build
+++ b/drivers/event/meson.build
@@ -1,7 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-drivers = ['dpaa', 'dpaa2', 'octeontx', 'opdl', 'skeleton', 'sw', 'dsw']
+drivers = ['dpaa', 'dpaa2', 'opdl', 'skeleton', 'sw', 'dsw']
+if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and
+ dpdk_conf.has('RTE_ARCH_ARM64'))
+ drivers += 'octeontx'
+endif
std_deps = ['eventdev', 'kvargs']
config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
driver_name_fmt = 'rte_pmd_@0@_event'
--
2.11.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [dpdk-stable] [PATCH v3 3/4] net/mlx: fix library search in meson build
2019-04-18 11:49 ` [dpdk-stable] [PATCH v3 1/4] drivers/event: " Yongseok Koh
@ 2019-04-18 11:49 ` Yongseok Koh
2019-04-18 12:02 ` Luca Boccassi
0 siblings, 1 reply; 20+ messages in thread
From: Yongseok Koh @ 2019-04-18 11:49 UTC (permalink / raw)
To: bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, bluca, stable
If MLNX_OFED is installed, there's no .pc file installed for libraries and
dependency() can't find libraries by pkg-config. By adding fallback of
using cc.find_library(), libraries are properly located.
Fixes: e30b4e566f47 ("build: improve dependency handling")
Cc: bluca@debian.org
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
v3:
* use lib name without 'lib' prefix for cc.find_library()
v2:
* change variable names to minimize code change
drivers/net/mlx4/meson.build | 15 +++++++++------
drivers/net/mlx5/meson.build | 15 +++++++++------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index de020701d1..2540489bb7 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -13,14 +13,17 @@ if pmd_dlopen
'-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libs = [
- dependency('libmnl', required:false),
- dependency('libmlx4', required:false),
- dependency('libibverbs', required:false),
-]
+libnames = [ 'mnl', 'mlx4', 'ibverbs' ]
+libs = []
build = true
-foreach lib:libs
+foreach libname:libnames
+ lib = dependency('lib' + libname, required:false)
if not lib.found()
+ lib = cc.find_library(libname, required:false)
+ endif
+ if lib.found()
+ libs += [ lib ]
+ else
build = false
endif
endforeach
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index a4c684e1b5..1a65c3a989 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -13,14 +13,17 @@ if pmd_dlopen
'-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
]
endif
-libs = [
- dependency('libmnl', required:false),
- dependency('libmlx5', required:false),
- dependency('libibverbs', required:false),
-]
+libnames = [ 'mnl', 'mlx5', 'ibverbs' ]
+libs = []
build = true
-foreach lib:libs
+foreach libname:libnames
+ lib = dependency('lib' + libname, required:false)
if not lib.found()
+ lib = cc.find_library(libname, required:false)
+ endif
+ if lib.found()
+ libs += [ lib ]
+ else
build = false
endif
endforeach
--
2.11.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [dpdk-stable] [PATCH v3 3/4] net/mlx: fix library search in meson build
2019-04-18 11:49 ` [dpdk-stable] [PATCH v3 3/4] net/mlx: fix library search in meson build Yongseok Koh
@ 2019-04-18 12:02 ` Luca Boccassi
0 siblings, 0 replies; 20+ messages in thread
From: Luca Boccassi @ 2019-04-18 12:02 UTC (permalink / raw)
To: Yongseok Koh, bruce.richardson, jerinj, pbhagavatula, shahafs
Cc: dev, thomas, gavin.hu, Honnappa.Nagarahalli, stable
On Thu, 2019-04-18 at 04:49 -0700, Yongseok Koh wrote:
> If MLNX_OFED is installed, there's no .pc file installed for
> libraries and
> dependency() can't find libraries by pkg-config. By adding fallback
> of
> using cc.find_library(), libraries are properly located.
>
> Fixes: e30b4e566f47 ("build: improve dependency handling")
> Cc:
> bluca@debian.org
>
> Cc:
> stable@dpdk.org
>
>
> Signed-off-by: Yongseok Koh <
> yskoh@mellanox.com
> >
> ---
>
> v3:
> * use lib name without 'lib' prefix for cc.find_library()
>
> v2:
> * change variable names to minimize code change
>
> drivers/net/mlx4/meson.build | 15 +++++++++------
> drivers/net/mlx5/meson.build | 15 +++++++++------
> 2 files changed, 18 insertions(+), 12 deletions(-)
Acked-by: Luca Boccassi <bluca@debian.org>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2019-04-18 12:02 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190412232451.30197-1-yskoh@mellanox.com>
2019-04-12 23:24 ` [dpdk-stable] [PATCH 1/6] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
2019-04-13 5:52 ` [dpdk-stable] [EXT] " Pavan Nikhilesh Bhagavatula
2019-04-15 18:16 ` Yongseok Koh
2019-04-12 23:24 ` [dpdk-stable] [PATCH 3/6] net/mlx: fix library search in meson build Yongseok Koh
2019-04-15 9:19 ` Bruce Richardson
2019-04-15 19:48 ` Yongseok Koh
2019-04-15 10:12 ` Luca Boccassi
2019-04-15 19:48 ` Yongseok Koh
2019-04-18 9:25 ` Luca Boccassi
2019-04-18 10:14 ` Bruce Richardson
2019-04-18 11:25 ` Yongseok Koh
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Yongseok Koh
2019-04-18 1:47 ` [dpdk-stable] [PATCH v2 3/4] net/mlx: fix library search in meson build Yongseok Koh
2019-04-18 7:21 ` [dpdk-stable] [EXT] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 Jerin Jacob Kollanukkaran
2019-04-18 10:41 ` Yongseok Koh
2019-04-18 11:04 ` Thomas Monjalon
2019-04-18 11:10 ` Yongseok Koh
2019-04-18 11:49 ` [dpdk-stable] [PATCH v3 1/4] drivers/event: " Yongseok Koh
2019-04-18 11:49 ` [dpdk-stable] [PATCH v3 3/4] net/mlx: fix library search in meson build Yongseok Koh
2019-04-18 12:02 ` Luca Boccassi
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).