From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH v2] mlx5: use pkg-config to handle SUSE libmnl Date: Thu, 25 Oct 2018 11:04:03 -0700 Message-ID: <20181025180403.11073-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org, Stephen Hemminger To: adrien.mazarguil@6wind.com Return-path: Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id EE520B62 for ; Thu, 25 Oct 2018 20:04:17 +0200 (CEST) Received: by mail-pl1-f194.google.com with SMTP id y11-v6so4225701plt.3 for ; Thu, 25 Oct 2018 11:04:17 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads") Signed-off-by: Stephen Hemminger --- v2 - need --cflags not -cflags drivers/net/mlx5/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 1e9c0b42ac16..5b0be08ebb81 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -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 -- 2.19.1