lib/env_dpdk: Make sure linker finds $DPDK_LIB_DIR
In case SPDK is build with shared libraries and there's no LD_LIBRARY_PATH around, linker will complain about missing .sos similar to: /usr/bin/ld.bfd: warning: librte_meter.so.23, needed by /root/spdk/dpdk/build/lib/librte_ethdev.so, not found (try using -rpath or -rpath-link) We can't see that under CI since autotest_common.sh always makes sure the LD_LIBRARY_PATH is properly set. Add the -rpath to make the build less spammy. Change-Id: I1d9d1775b2aa24e65cc4b776c2549457b0d7aac3 Signed-off-by: Michal Berger <michal.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17492 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
2994a06067
commit
3a060b6cd5
@ -123,7 +123,7 @@ DPDK_LIB_LIST_SORTED = $(sort $(DPDK_LIB_LIST))
|
|||||||
|
|
||||||
DPDK_SHARED_LIB = $(DPDK_LIB_LIST_SORTED:%=$(DPDK_LIB_DIR)/lib%.so)
|
DPDK_SHARED_LIB = $(DPDK_LIB_LIST_SORTED:%=$(DPDK_LIB_DIR)/lib%.so)
|
||||||
DPDK_STATIC_LIB = $(DPDK_LIB_LIST_SORTED:%=$(DPDK_LIB_DIR)/lib%.a)
|
DPDK_STATIC_LIB = $(DPDK_LIB_LIST_SORTED:%=$(DPDK_LIB_DIR)/lib%.a)
|
||||||
DPDK_SHARED_LIB_LINKER_ARGS = $(call add_no_as_needed,$(DPDK_SHARED_LIB))
|
DPDK_SHARED_LIB_LINKER_ARGS = $(call add_no_as_needed,$(DPDK_SHARED_LIB)) -Wl,-rpath=$(DPDK_LIB_DIR)
|
||||||
DPDK_STATIC_LIB_LINKER_ARGS = $(call add_whole_archive,$(DPDK_STATIC_LIB))
|
DPDK_STATIC_LIB_LINKER_ARGS = $(call add_whole_archive,$(DPDK_STATIC_LIB))
|
||||||
|
|
||||||
ENV_CFLAGS = $(DPDK_INC) -DALLOW_EXPERIMENTAL_API
|
ENV_CFLAGS = $(DPDK_INC) -DALLOW_EXPERIMENTAL_API
|
||||||
|
Loading…
Reference in New Issue
Block a user