mlx5: use pkg-config to handle SUSE libmnl
PATCH v2 1/1 mlx5: use pkg-config to handle SUSE libmnl
SUSE decided to install the libmnl include file in a non-standard
place: /usr/include/libmnl/libmnl/libmnl.h
This was probably a mistake by the SUSE package maintainer, but hard to get fixed. Workaround the problem by pkg-config to find the necessary include directive for libmnl.
---
v2 - need --cflags not -cflags
drivers/net/mlx5/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/Makefile +2 -1
@@ -51,6 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCE CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) CFLAGS += -Wno-strict-prototypes +CFLAGS += $(pkg-config --cflags libmnl) ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y) CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"' CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"'
@@ -59,7 +60,7 @@ LDLIBS += -ldl else LDLIBS += -libverbs -lmlx5 endif -LDLIBS += -lmnl +LDLIBS += $(pkg-config --libs libmnl) LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs LDLIBS += -lrte_bus_pci
Signature · 1 line
2.19.1
Quoted 33 lines · Stephen Hemminger
SUSE decided to install the libmnl include file in a non-standard
place:/usr/include/libmnl/libmnl/libmnl.hThis was probably a mistake by the SUSE package maintainer, but hard to get fixed. Workaround the problem by pkg-config to find the necessary include directive for libmnl.
Fixes 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads")Signed-off-by Stephen Hemminger <[email protected]>---
v2 - need --cflags not -cflagsdrivers/net/mlx5/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/mlx5/Makefile +0
-0@@ -51,6 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCECFLAGS += -D_XOPEN_SOURCE=600
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -Wno-strict-prototypes
+CFLAGS += $(pkg-config --cflags libmnl)
ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y) CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"'drivers/net/mlx5/Makefile +0
-0@@ -59,7 +60,7 @@ LDLIBS += -ldlelse
LDLIBS += -libverbs -lmlx5
endifdrivers/net/mlx5/Makefile +1
-1-LDLIBS += -lmnl +LDLIBS += $(pkg-config --libs libmnl)
Quoted 3 lines
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs LDLIBS += -lrte_bus_pci
Here's the fix for the SUSE package (CC'ing Marco to make sure I got the process right):
https://build.opensuse.org/request/show/644720
Signature · 2 lines
Kind regards, Luca Boccassi