From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH v2] mlx5: use pkg-config to handle SUSE libmnl Date: Thu, 25 Oct 2018 19:14:21 +0100 Message-ID: <1540491261.20953.14.camel@debian.org> References: <20181025180403.11073-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, shahafs@mellanox.com, yskoh@mellanox.com, mvarlese@suse.de To: Stephen Hemminger , adrien.mazarguil@6wind.com Return-path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 9EE0E4C99 for ; Thu, 25 Oct 2018 20:14:24 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id l6-v6so10315449wrt.1 for ; Thu, 25 Oct 2018 11:14:24 -0700 (PDT) In-Reply-To: <20181025180403.11073-1-stephen@networkplumber.org> 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, 2018-10-25 at 11:04 -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 > --- > v2 - need --cflags not -cflags >=20 > =C2=A0drivers/net/mlx5/Makefile | 3 ++- > =C2=A01 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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 +=3D -D_DEFAULT_SOURCE > =C2=A0CFLAGS +=3D -D_XOPEN_SOURCE=3D600 > =C2=A0CFLAGS +=3D $(WERROR_FLAGS) > =C2=A0CFLAGS +=3D -Wno-strict-prototypes > +CFLAGS +=3D $(pkg-config --cflags libmnl) > =C2=A0ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y) > =C2=A0CFLAGS +=3D -DMLX5_GLUE=3D'"$(LIB_GLUE)"' > =C2=A0CFLAGS +=3D -DMLX5_GLUE_VERSION=3D'"$(LIB_GLUE_VERSION)"' > @@ -59,7 +60,7 @@ LDLIBS +=3D -ldl > =C2=A0else > =C2=A0LDLIBS +=3D -libverbs -lmlx5 > =C2=A0endif > -LDLIBS +=3D -lmnl > +LDLIBS +=3D $(pkg-config --libs libmnl) > =C2=A0LDLIBS +=3D -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring > =C2=A0LDLIBS +=3D -lrte_ethdev -lrte_net -lrte_kvargs > =C2=A0LDLIBS +=3D -lrte_bus_pci Acked-by: Luca Boccassi 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 --=20 Kind regards, Luca Boccassi