* [dpdk-dev] [PATCH 1/4] mk: fix build of shared library with libbsd
2019-02-12 23:05 [dpdk-dev] [PATCH 0/4] fix test of some build options Thomas Monjalon
@ 2019-02-12 23:05 ` Thomas Monjalon
2019-02-12 23:05 ` [dpdk-dev] [PATCH 2/4] devtools: add libelf dependency to build test Thomas Monjalon
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2019-02-12 23:05 UTC (permalink / raw)
Cc: dev, bruce.richardson, stable
When building DPDK with "make" and options
CONFIG_RTE_USE_LIBBSD=y
and
CONFIG_RTE_BUILD_SHARED_LIB=y
libbsd was not linked, resulting in compilation errors:
undefined reference to `strlcpy'
The link option -lbsd is added in a common place for both
Linux apps and libs.
It is used in app linkage via EXECENV_LDLIBS,
and in lib linkage via the added variable EXECENV_LDLIBS-y.
Fixes: 5364de644a4b ("eal: support strlcpy function")
Cc: bruce.richardson@intel.com
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
mk/exec-env/linuxapp/rte.vars.mk | 6 ++++++
mk/rte.app.mk | 3 ---
mk/rte.lib.mk | 2 ++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/mk/exec-env/linuxapp/rte.vars.mk b/mk/exec-env/linuxapp/rte.vars.mk
index 3129edc8c..57ee82150 100644
--- a/mk/exec-env/linuxapp/rte.vars.mk
+++ b/mk/exec-env/linuxapp/rte.vars.mk
@@ -24,6 +24,8 @@ ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
EXECENV_LDLIBS += -lgcc_s
endif
+EXECENV_LDLIBS-$(CONFIG_RTE_USE_LIBBSD) += -lbsd
+
# force applications to link with gcc/icc instead of using ld
LINK_USING_CC := 1
@@ -32,4 +34,8 @@ EXECENV_LDFLAGS += -export-dynamic
# Add library to the group to resolve symbols
EXECENV_LDLIBS += -ldl
+# EXECENV_LDLIBS-y applies to lib.so and app linking
+# while EXECENV_LDLIBS applies only to app linking.
+EXECENV_LDLIBS += $(EXECENV_LDLIBS-y)
+
export EXECENV_CFLAGS EXECENV_LDFLAGS EXECENV_ASFLAGS EXECENV_LDLIBS
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 8a4f0f4e5..d0ab942d5 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -309,9 +309,6 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrt
ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES),yy)
_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lnuma
endif
-ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_USE_LIBBSD),yy)
-_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lbsd
-endif
_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm
_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt
_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMBER) += -lm
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index c696a2174..4df8849a0 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -35,6 +35,8 @@ PREINSTALL = $(SYMLINK-FILES-y)
_INSTALL = $(INSTALL-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
_CLEAN = doclean
+LDLIBS += $(EXECENV_LDLIBS-y)
+
.PHONY: all
all: install
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 2/4] devtools: add libelf dependency to build test
2019-02-12 23:05 [dpdk-dev] [PATCH 0/4] fix test of some build options Thomas Monjalon
2019-02-12 23:05 ` [dpdk-dev] [PATCH 1/4] mk: fix build of shared library with libbsd Thomas Monjalon
@ 2019-02-12 23:05 ` Thomas Monjalon
2019-02-12 23:05 ` [dpdk-dev] [PATCH 3/4] devtools: test build of zlib PMD Thomas Monjalon
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2019-02-12 23:05 UTC (permalink / raw)
Cc: dev, konstantin.ananyev, stable
The option CONFIG_RTE_LIBRTE_BPF_ELF was never enabled
with test-build.sh.
It is fixed with the environment variable DPDK_DEP_ELF.
Fixes: 5dba93ae5f2d ("bpf: add ability to load eBPF program from ELF object file")
Cc: konstantin.ananyev@intel.com
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/test-build.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 42f4ad003..ace52a776 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -9,6 +9,7 @@ default_path=$PATH
# - DPDK_BUILD_TEST_CONFIGS (defconfig1+option1+option2 defconfig2)
# - DPDK_DEP_ARCHIVE
# - DPDK_DEP_CFLAGS
+# - DPDK_DEP_ELF (y/[n])
# - DPDK_DEP_ISAL (y/[n])
# - DPDK_DEP_JSON (y/[n])
# - DPDK_DEP_LDFLAGS
@@ -96,6 +97,7 @@ reset_env ()
unset CROSS
unset DPDK_DEP_ARCHIVE
unset DPDK_DEP_CFLAGS
+ unset DPDK_DEP_ELF
unset DPDK_DEP_ISAL
unset DPDK_DEP_JSON
unset DPDK_DEP_LDFLAGS
@@ -186,6 +188,8 @@ config () # <directory> <target> <options>
sed -ri 's,(MVPP2_PMD=)n,\1y,' $1/.config
test -z "$LIBMUSDK_PATH" || \
sed -ri 's,(MVNETA_PMD=)n,\1y,' $1/.config
+ test "$DPDK_DEP_ELF" != y || \
+ sed -ri 's,(BPF_ELF=)n,\1y,' $1/.config
test -z "$DPDK_DEP_JSON" || \
sed -ri 's,(TELEMETRY=)n,\1y,' $1/.config
build_config_hook $1 $2 $3
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 3/4] devtools: test build of zlib PMD
2019-02-12 23:05 [dpdk-dev] [PATCH 0/4] fix test of some build options Thomas Monjalon
2019-02-12 23:05 ` [dpdk-dev] [PATCH 1/4] mk: fix build of shared library with libbsd Thomas Monjalon
2019-02-12 23:05 ` [dpdk-dev] [PATCH 2/4] devtools: add libelf dependency to build test Thomas Monjalon
@ 2019-02-12 23:05 ` Thomas Monjalon
2019-02-12 23:05 ` [dpdk-dev] [PATCH 4/4] devtools: fix test of some build options Thomas Monjalon
2019-02-24 22:24 ` [dpdk-dev] [PATCH 0/4] " Thomas Monjalon
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2019-02-12 23:05 UTC (permalink / raw)
Cc: dev, ashish.gupta, stable
The PMD zlib was not enabled in devtools/test-build.sh.
It is fixed by using the environment variable DPDK_DEP_ZLIB.
Fixes: 0c4e4c16b004 ("compress/zlib: introduce zlib PMD")
Cc: ashish.gupta@caviumnetworks.com
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/test-build.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index ace52a776..0511ae6d0 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -158,6 +158,8 @@ config () # <directory> <target> <options>
test "$DPDK_DEP_ZLIB" != y || \
sed -ri 's,(BNX2X_PMD=)n,\1y,' $1/.config
test "$DPDK_DEP_ZLIB" != y || \
+ sed -ri 's,(PMD_ZLIB=)n,\1y,' $1/.config
+ test "$DPDK_DEP_ZLIB" != y || \
sed -ri 's,(COMPRESSDEV_TEST=)n,\1y,' $1/.config
test "$DPDK_DEP_PCAP" != y || \
sed -ri 's,(PCAP=)n,\1y,' $1/.config
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 4/4] devtools: fix test of some build options
2019-02-12 23:05 [dpdk-dev] [PATCH 0/4] fix test of some build options Thomas Monjalon
` (2 preceding siblings ...)
2019-02-12 23:05 ` [dpdk-dev] [PATCH 3/4] devtools: test build of zlib PMD Thomas Monjalon
@ 2019-02-12 23:05 ` Thomas Monjalon
2019-02-13 18:22 ` Trahe, Fiona
2019-02-24 22:24 ` [dpdk-dev] [PATCH 0/4] " Thomas Monjalon
4 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2019-02-12 23:05 UTC (permalink / raw)
Cc: dev, lee.daly, fiona.trahe, stable
CONFIG_RTE_LIBRTE_PMD_ISAL was not tested because of a typo.
CONFIG_RTE_LIBRTE_PMD_QAT_SYM was not tested since it has been
introduced and made CONFIG_RTE_LIBRTE_PMD_QAT enabled by default.
While at it, DPDK_DEP_JSON is now checked for "y",
as other DPDK_DEP_* variables, instead of non-empty.
Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")
Cc: lee.daly@intel.com
Fixes: 7a34c2155716 ("compress/qat: add empty driver")
Cc: fiona.trahe@intel.com
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/test-build.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 0511ae6d0..d37b121ca 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -150,7 +150,7 @@ config () # <directory> <target> <options>
test "$DPDK_DEP_ARCHIVE" != y || \
sed -ri 's,(RESOURCE_TAR=)n,\1y,' $1/.config
test "$DPDK_DEP_ISAL" != y || \
- sed -ri 's,(ISAL_PMD=)n,\1y,' $1/.config
+ sed -ri 's,(PMD_ISAL=)n,\1y,' $1/.config
test "$DPDK_DEP_MLX" != y || \
sed -ri 's,(MLX._PMD=)n,\1y,' $1/.config
test "$DPDK_DEP_SZE" != y || \
@@ -180,7 +180,7 @@ config () # <directory> <target> <options>
test "$DPDK_DEP_SSL" != y || \
sed -ri 's,(PMD_OPENSSL=)n,\1y,' $1/.config
test "$DPDK_DEP_SSL" != y || \
- sed -ri 's,(PMD_QAT=)n,\1y,' $1/.config
+ sed -ri 's,(QAT_SYM=)n,\1y,' $1/.config
test -z "$FLEXRAN_SDK" || \
sed -ri 's,(BBDEV_TURBO_SW=)n,\1y,' $1/.config
sed -ri 's,(SCHED_.*=)n,\1y,' $1/.config
@@ -192,7 +192,7 @@ config () # <directory> <target> <options>
sed -ri 's,(MVNETA_PMD=)n,\1y,' $1/.config
test "$DPDK_DEP_ELF" != y || \
sed -ri 's,(BPF_ELF=)n,\1y,' $1/.config
- test -z "$DPDK_DEP_JSON" || \
+ test "$DPDK_DEP_JSON" != y || \
sed -ri 's,(TELEMETRY=)n,\1y,' $1/.config
build_config_hook $1 $2 $3
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 4/4] devtools: fix test of some build options
2019-02-12 23:05 ` [dpdk-dev] [PATCH 4/4] devtools: fix test of some build options Thomas Monjalon
@ 2019-02-13 18:22 ` Trahe, Fiona
0 siblings, 0 replies; 7+ messages in thread
From: Trahe, Fiona @ 2019-02-13 18:22 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Daly, Lee, stable
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Tuesday, February 12, 2019 11:05 PM
> Cc: dev@dpdk.org; Daly, Lee <lee.daly@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> stable@dpdk.org
> Subject: [PATCH 4/4] devtools: fix test of some build options
>
> CONFIG_RTE_LIBRTE_PMD_ISAL was not tested because of a typo.
>
> CONFIG_RTE_LIBRTE_PMD_QAT_SYM was not tested since it has been
> introduced and made CONFIG_RTE_LIBRTE_PMD_QAT enabled by default.
>
> While at it, DPDK_DEP_JSON is now checked for "y",
> as other DPDK_DEP_* variables, instead of non-empty.
>
> Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")
> Cc: lee.daly@intel.com
> Fixes: 7a34c2155716 ("compress/qat: add empty driver")
> Cc: fiona.trahe@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] fix test of some build options
2019-02-12 23:05 [dpdk-dev] [PATCH 0/4] fix test of some build options Thomas Monjalon
` (3 preceding siblings ...)
2019-02-12 23:05 ` [dpdk-dev] [PATCH 4/4] devtools: fix test of some build options Thomas Monjalon
@ 2019-02-24 22:24 ` Thomas Monjalon
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2019-02-24 22:24 UTC (permalink / raw)
To: dev
13/02/2019 00:05, Thomas Monjalon:
> When using the "make" system which allows a huge number of
> build combinations, some options were not tested with
> the script test-build.sh.
>
>
> Thomas Monjalon (4):
> mk: fix build of shared library with libbsd
> devtools: add libelf dependency to build test
> devtools: test build of zlib PMD
> devtools: fix test of some build options
Applied
^ permalink raw reply [flat|nested] 7+ messages in thread