From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH v3] mlx5: use pkg-config to handle SUSE libmnl Date: Fri, 26 Oct 2018 21:49:00 +0000 Message-ID: <20181026214852.GB13615@mtidpdk.mti.labs.mlnx> References: <20181025202938.4747-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Adrien Mazarguil , "dev@dpdk.org" To: Stephen Hemminger Return-path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20073.outbound.protection.outlook.com [40.107.2.73]) by dpdk.org (Postfix) with ESMTP id 8902B2C52 for ; Fri, 26 Oct 2018 23:49:04 +0200 (CEST) In-Reply-To: <20181025202938.4747-1-stephen@networkplumber.org> Content-Language: en-US Content-ID: <7218EE8AE4D28F468AE5DC7E416C7655@eurprd05.prod.outlook.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Oct 25, 2018 at 01:29:38PM -0700, Stephen Hemminger wrote: > SUSE decided to install the libmnl include file in a non-standard > place: /usr/include/libmnl/libmnl/libmnl.h >=20 > 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. >=20 > Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads") > Signed-off-by: Stephen Hemminger > --- Acked-by: Yongseok Koh Thanks > v3 - Tested on SLES 15, needs $(shell pkg-config ...)=20 >=20 > drivers/net/mlx5/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile > index 1e9c0b42ac16..8497c98ef86e 100644 > --- a/drivers/net/mlx5/Makefile > +++ b/drivers/net/mlx5/Makefile > @@ -51,6 +51,7 @@ CFLAGS +=3D -D_DEFAULT_SOURCE > CFLAGS +=3D -D_XOPEN_SOURCE=3D600 > CFLAGS +=3D $(WERROR_FLAGS) > CFLAGS +=3D -Wno-strict-prototypes > +CFLAGS +=3D $(shell pkg-config --cflags libmnl) > ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y) > CFLAGS +=3D -DMLX5_GLUE=3D'"$(LIB_GLUE)"' > CFLAGS +=3D -DMLX5_GLUE_VERSION=3D'"$(LIB_GLUE_VERSION)"' > @@ -59,7 +60,7 @@ LDLIBS +=3D -ldl > else > LDLIBS +=3D -libverbs -lmlx5 > endif > -LDLIBS +=3D -lmnl > +LDLIBS +=3D $(shell pkg-config --libs libmnl) > LDLIBS +=3D -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring > LDLIBS +=3D -lrte_ethdev -lrte_net -lrte_kvargs > LDLIBS +=3D -lrte_bus_pci > --=20 > 2.19.1 >=20