From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47423A04D7; Thu, 3 Sep 2020 11:00:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B0E0F1C0AE; Thu, 3 Sep 2020 11:00:41 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id D4236DE0 for ; Thu, 3 Sep 2020 11:00:39 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id e17so2057647wme.0 for ; Thu, 03 Sep 2020 02:00:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=3OkzL+Gvo8/m3OWxCx6RpBh7QPf58LOsNW9ab42LObQ=; b=fCtglVlAtZM7C7tMQtjcDZMP++lYIw+xBaMWX0JZYcEWL0b9Vtb1hv67JJg5323SWV uRT2LSNJdIU8hLRqEpuwahhiK7Ts9p15qWqIFjc1+l5cV3wN4EEM4PoG6TRxx0zJrXmK c/2S/cuiWbki3Iweo+XYYFadOl13kBFqcp9jumPvX5aJnp+Av/AZhpvlnZQ39WkOyH3o awrvdWqFhveC9HKjl0KofEJCnnszWFTyVMMnMSRYtUfNTGap39Mai52ve2rDpdMmCBv3 FtZxrPeDSan2BYuHNXWj1a13q6suTin113MCoLB2lPZM1ukz4OqzPw8F0z7A+zCmRVMZ Y6rw== X-Gm-Message-State: AOAM532FwYoMU8EvecTLE3UtVaeAN1sE0GUCZ+8ddX01+ZJu29wLn3wc acVuGuvt8V6RPd4xKC1oiiM= X-Google-Smtp-Source: ABdhPJw1+UANgm3i3c6StWFD8p4JYaGf92nQH6xbBCdoI+zD7D2FZaPjJ2Ta8xd6MWGeKSU5AWsMQA== X-Received: by 2002:a7b:cd06:: with SMTP id f6mr1473999wmj.66.1599123639492; Thu, 03 Sep 2020 02:00:39 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3]) by smtp.gmail.com with ESMTPSA id h2sm3317933wrp.69.2020.09.03.02.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 02:00:38 -0700 (PDT) Message-ID: <2df615541715b7009d07c3c1f1929ee02aa7e160.camel@debian.org> From: Luca Boccassi To: David Marchand , Christian Ehrhardt Cc: dev , Bruce Richardson , Thomas Monjalon Date: Thu, 03 Sep 2020 10:00:37 +0100 In-Reply-To: References: <20200902123903.803110-1-christian.ehrhardt@canonical.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] avoid libfdt checks adding full paths to pkg-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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 Wed, 2020-09-02 at 17:05 +0200, David Marchand wrote: > On Wed, Sep 2, 2020 at 2:39 PM Christian Ehrhardt > wrote: > > The checks for libfdt try dependency() first which would only work if > > a pkg-config would be present but libfdt has none. > > Then it probes for the lib path itself via cc.find_library. > >=20 > > But later it adds the result of either probe to ext_deps which ends up > > in build and also the resulting pkg-config to contain toolchain version= ed > > paths in Libs.private like: > > /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfdt.so > > which obviously breaks on toolchain updates. > >=20 > > In general libs used multiple times - ipn3ke + ifpga in this case - are > > checked centrally in config/meson.build so move it there and fix the > > adding of dependencies to not use the full file path. > >=20 > > The result is libfdt in pkg-config now showing up as: > > Libs.private: -pthread -lm -ldl -lnuma -lfdt -lpcap > >=20 > > Signed-off-by: Christian Ehrhardt > > Reviewed-by: Luca Boccassi > > Reviewed-by: Bruce Richardson > > --- > > config/meson.build | 9 +++++++++ > > drivers/net/ipn3ke/meson.build | 6 +----- > > drivers/raw/ifpga/meson.build | 7 +------ > > 3 files changed, 11 insertions(+), 11 deletions(-) > >=20 > > diff --git a/config/meson.build b/config/meson.build > > index cff8b33dd2..1c8317e750 100644 > > --- a/config/meson.build > > +++ b/config/meson.build > > @@ -150,6 +150,15 @@ if numa_dep.found() and cc.has_header('numaif.h') > > dpdk_extra_ldflags +=3D '-lnuma' > > endif > >=20 > > +has_libfdt =3D 0 > > +fdt_dep =3D cc.find_library('libfdt', required: false) > > +if fdt_dep.found() and cc.has_header('fdt.h') > > + dpdk_conf.set10('RTE_HAS_LIBFDT', true) > > + has_libfdt =3D 1 > > + add_project_link_arguments('-lfdt', language: 'c') > > + dpdk_extra_ldflags +=3D '-lfdt' > > +endif > > + > > # check for libbsd > > libbsd =3D dependency('libbsd', required: false) > > if libbsd.found() > > diff --git a/drivers/net/ipn3ke/meson.build b/drivers/net/ipn3ke/meson.= build > > index ec9cb7daf0..83611cfead 100644 > > --- a/drivers/net/ipn3ke/meson.build > > +++ b/drivers/net/ipn3ke/meson.build > > @@ -9,11 +9,7 @@ > > # rte_eth_switch_domain_free() > > # > >=20 > > -dep =3D dependency('libfdt', required: false) > > -if not dep.found() > > - dep =3D cc.find_library('libfdt', required: false) > > -endif > > -if not dep.found() > > +if not has_libfdt >=20 > "not" expects a boolean, this can be seen in Travis and OBS builds for > Debian (at least 10 and Next). >=20 > OVS robot travis: > https://travis-ci.com/github/ovsrobot/dpdk/jobs/380310104#L721 >=20 > My OBS: > [ 143s] Compiler for C supports arguments -mavx2: YES (cached) > [ 143s] Message: drivers/net/ice: Defining dependency "pmd_ice" > [ 143s] Message: drivers/net/igc: Defining dependency "pmd_igc" > [ 143s] > [ 143s] ../drivers/net/ipn3ke/meson.build:12:7: ERROR: Argument to > "not" is not a boolean. > [ 143s] dh_auto_configure: error: cd obj-x86_64-linux-gnu && > LC_ALL=3DC.UTF-8 meson .. --wrap-mode=3Dnodownload --buildtype=3Dplain > --prefix=3D/usr --sysconfdir=3D/etc --localstatedir=3D/var > --libdir=3Dlib/x86_64-linux-gnu --libexecdir=3Dlib/x86_64-linux-gnu > --includedir=3Dinclude/dpdk -Dper_library_versions=3Dfalse > -Dinclude_subdir_arch=3D../x86_64-linux-gnu/dpdk -Dmachine=3Ddefault > -Dkernel_dir=3D/lib/modules/5.7.0-3-amd64 -Denable_kmods=3Dtrue returned > exit code 1 > [ 143s] make[2]: *** [debian/rules:114: override_dh_auto_configure] Erro= r 25 > [ 143s] make[2]: Leaving directory '/usr/src/packages/BUILD' > [ 143s] make[1]: *** [debian/rules:92: build] Error 2 > [ 143s] make[1]: Leaving directory '/usr/src/packages/BUILD' > [ 143s] make: *** [debian/rules:96: binary] Error 2 Yep found the same issue - we should take v1 then --=20 Kind regards, Luca Boccassi