[spp] [PATCH] spp_pcap: fix inappropriate linking of liblz4

ogawa.yasufumi at lab.ntt.co.jp ogawa.yasufumi at lab.ntt.co.jp
Tue Mar 12 10:11:20 CET 2019


From: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>

In Makefile of spp_pcap, `liblz4.a` is linked directly as other source
codes. However, file path might be different on other distros, such as
CentOS or Fedora.

    SRCS-y += /usr/lib/x86_64-linux-gnu/liblz4.a

This update is to correct to link this library with `-l` option as
practical manner.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
---
 src/pcap/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/pcap/Makefile b/src/pcap/Makefile
index 298e2b7..199a8ff 100644
--- a/src/pcap/Makefile
+++ b/src/pcap/Makefile
@@ -18,7 +18,6 @@ SRCS-y += command_proc.c command_dec.c
 SRCS-y += ../shared/common.c
 SRCS-y += ../vf/common/command_conn.c ../vf/common/spp_port.c
 SRCS-y += ../vf/common/ringlatencystats.c ../vf/common/string_buffer.c
-SRCS-y += /usr/lib/x86_64-linux-gnu/liblz4.a
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS) -O3 -MMD
@@ -28,6 +27,8 @@ CFLAGS += -I$(SRCDIR)/../shared
 #CFLAGS += -DSPP_DEMONIZE
 #CFLAGS += -DSPP_RINGLATENCYSTATS_ENABLE
 
+LDLIBS += -llz4
+
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
 LDLIBS += -lrte_pmd_ring
 LDLIBS += -lrte_pmd_vhost
-- 
2.7.4



More information about the spp mailing list