From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id E4CAC5F2C for ; Thu, 2 May 2019 16:08:07 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id p16so2825338wma.1 for ; Thu, 02 May 2019 07:08:07 -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=sSKqGo6ALuxOZInh+CffZDsvX1hrLZETvAHsvtFczrs=; b=WMe/wAmJgZMy+LnxMDM+kvjTzcmvgcxg67csWZRIblDApsOM/CAT67W9UQLYSo3dqi HQksi4n0MasJTo4gmIvG3d2cWLt0TOF5K8hZrvIUB264UmLpSyCV18K7n+zKWE1IY9gD 9+VOvUkfcIg9qAIQGvMtz28zQWwkkacW18YLWQl4KtGg4E9O3etn9rzMybbyFlZSu0U/ +XOUz9n+O9ngxEZWIbe3XkCP9AirDTAKcFBngqomPQteXTowkHYTXJXc2gvO3EqEh8pd MLglObsvyEt56AD/CocYh/GJUxEpcf6o7rYU8d01a8pPFNx9YJVX3F3V+pd7OQFCcETS I1Rw== X-Gm-Message-State: APjAAAWLt5ai4jI+PCJFVsbqFAiFKpQ+vjrGUJ8SXHo0p9y2XhHVydo3 YcixQyiRA0C8cSyEvT3nbtNRuqcJCPQ= X-Google-Smtp-Source: APXvYqwCGfncCfw2JxwdLZCLiQH7qRiJYXJjdIWJ4b6NqF0AB8UuaCtwT/aGDhy46UTRGXRuGmzFsw== X-Received: by 2002:a1c:9ad8:: with SMTP id c207mr2545344wme.109.1556806087493; Thu, 02 May 2019 07:08:07 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 130sm157624wmd.15.2019.05.02.07.08.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 07:08:06 -0700 (PDT) Message-ID: <33cd0a15409b4af2d93bcfba804566ea09e7c0cb.camel@debian.org> From: Luca Boccassi To: Bruce Richardson , Thomas Monjalon Cc: dev@dpdk.org Date: Thu, 02 May 2019 15:08:05 +0100 In-Reply-To: <20190502131738.GA1980@bricha3-MOBL.ger.corp.intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <181e25f512b11f6c691f58c2cfdf47a9322a5091.camel@debian.org> <20190426144838.GA26084@bsd12> <2551645.ic9nZLS4EI@xps> <20190502131738.GA1980@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file 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: , X-List-Received-Date: Thu, 02 May 2019 14:08:08 -0000 On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote: > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote: > > 26/04/2019 16:56, Bruce Richardson: > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote: > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote: > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi > > > > > wrote: > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote: > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi > > > > > > > wrote: > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson > > > > > > > > wrote: > > > > > > > > > +# > > > > > > > > > rather > > > > > > > > > than hacking our environment, just edit the .pc file > > > > > > > > > prefix > > > > > > > > > value > > > > > > > > > +sed > > > > > > > > > -i "s|prefix=3D|prefix=3D$DESTDIR|" > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc > > > > > > > >=20 > > > > > > > > What about just using meson's prefix option instead? > > > > > > > > Which is > > > > > > > > how > > > > > > > > it > > > > > > > > would be used in a real use case > > > > > > >=20 > > > > > > > I don't think that would fully work, as my understanding > > > > > > > is that > > > > > > > the > > > > > > > prefix > > > > > > > option would apply only to the /usr/local parts, but not > > > > > > > to the > > > > > > > kernel > > > > > > > modules which would still try and install in /lib/. > > > > > >=20 > > > > > > What about doing a meson configure -Denable_kmods=3Dfalse > > > > > > before the > > > > > > ninja install? The modules are not needed for that test > > > > > > anyway, > > > > > > right? > > > > > > Alternatively, the kernel src dir could be symlinked in the > > > > > > build > > > > > > path, > > > > > > and the kernel_dir option could be used > > > > > >=20 > > > > > > I'm just worried that the test should be as "realistic" as > > > > > > possible, to > > > > > > avoid missing something > > > > >=20 > > > > > Yes, I did think of that too, but it does mean doing another > > > > > configuration > > > > > run in meson, and possibly a rebuild too if the > > > > > rte_build_config.h > > > > > file > > > > > changes. Therefore I decided to use DESTDIR for the sake of > > > > > speed > > > > > here. I > > > > > assumed there would be a pkg-config variable to adjust the > > > > > output > > > > > paths > > > > > based on a sysroot, but couldn't find a suitable one. > >=20 > > [...] > > > > There actually is a pkg-config binary option, I just tried and > > > > it works > > > > (it seems to be disabled by default on Debian and derivatives): > > > > -- > > > > define-prefix > > > >=20 > > >=20 > > > Any cmdline options to pkg-config don't solve the problem here as > > > it means > > > that the makefiles for any app need to be modified to use all > > > those. > >=20 > > It looks to be a good solution. > > Being able to update the DPDK install directory when building > > an application should be a mandatory requirement. > > I suggest to wrap the call to pkg-config so we can have this > > ability. > >=20 >=20 > I would have expected that this issue has already been solved for > packagers. I was surprised that I couldn't find an easy way to do so. Packagers use standard paths - so it never becomes a problem. If editing the file on the fly is not acceptable for the test script, then I'd suggest to fall back to the pkg-config option, and just document the need to use it in the docs for this scenarios. --=20 Kind regards, Luca Boccassi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 5D8B0A0AC5 for ; Thu, 2 May 2019 16:08:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 00A6A5F32; Thu, 2 May 2019 16:08:10 +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 E4CAC5F2C for ; Thu, 2 May 2019 16:08:07 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id p16so2825338wma.1 for ; Thu, 02 May 2019 07:08:07 -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=sSKqGo6ALuxOZInh+CffZDsvX1hrLZETvAHsvtFczrs=; b=WMe/wAmJgZMy+LnxMDM+kvjTzcmvgcxg67csWZRIblDApsOM/CAT67W9UQLYSo3dqi HQksi4n0MasJTo4gmIvG3d2cWLt0TOF5K8hZrvIUB264UmLpSyCV18K7n+zKWE1IY9gD 9+VOvUkfcIg9qAIQGvMtz28zQWwkkacW18YLWQl4KtGg4E9O3etn9rzMybbyFlZSu0U/ +XOUz9n+O9ngxEZWIbe3XkCP9AirDTAKcFBngqomPQteXTowkHYTXJXc2gvO3EqEh8pd MLglObsvyEt56AD/CocYh/GJUxEpcf6o7rYU8d01a8pPFNx9YJVX3F3V+pd7OQFCcETS I1Rw== X-Gm-Message-State: APjAAAWLt5ai4jI+PCJFVsbqFAiFKpQ+vjrGUJ8SXHo0p9y2XhHVydo3 YcixQyiRA0C8cSyEvT3nbtNRuqcJCPQ= X-Google-Smtp-Source: APXvYqwCGfncCfw2JxwdLZCLiQH7qRiJYXJjdIWJ4b6NqF0AB8UuaCtwT/aGDhy46UTRGXRuGmzFsw== X-Received: by 2002:a1c:9ad8:: with SMTP id c207mr2545344wme.109.1556806087493; Thu, 02 May 2019 07:08:07 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 130sm157624wmd.15.2019.05.02.07.08.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 07:08:06 -0700 (PDT) Message-ID: <33cd0a15409b4af2d93bcfba804566ea09e7c0cb.camel@debian.org> From: Luca Boccassi To: Bruce Richardson , Thomas Monjalon Cc: dev@dpdk.org Date: Thu, 02 May 2019 15:08:05 +0100 In-Reply-To: <20190502131738.GA1980@bricha3-MOBL.ger.corp.intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <181e25f512b11f6c691f58c2cfdf47a9322a5091.camel@debian.org> <20190426144838.GA26084@bsd12> <2551645.ic9nZLS4EI@xps> <20190502131738.GA1980@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file 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" Message-ID: <20190502140805.C1SGGt5yx5smHXUz_Rcbj8yHuxYKqed4WSvEGug_jcA@z> On Thu, 2019-05-02 at 14:17 +0100, Bruce Richardson wrote: > On Thu, May 02, 2019 at 03:11:10PM +0200, Thomas Monjalon wrote: > > 26/04/2019 16:56, Bruce Richardson: > > > On Wed, Apr 24, 2019 at 02:37:58PM +0100, Luca Boccassi wrote: > > > > On Wed, 2019-04-24 at 13:31 +0100, Bruce Richardson wrote: > > > > > On Wed, Apr 24, 2019 at 12:02:24PM +0100, Luca Boccassi > > > > > wrote: > > > > > > On Wed, 2019-04-24 at 11:41 +0100, Bruce Richardson wrote: > > > > > > > On Wed, Apr 24, 2019 at 10:22:04AM +0100, Luca Boccassi > > > > > > > wrote: > > > > > > > > On Tue, 2019-04-23 at 23:06 +0100, Bruce Richardson > > > > > > > > wrote: > > > > > > > > > +# > > > > > > > > > rather > > > > > > > > > than hacking our environment, just edit the .pc file > > > > > > > > > prefix > > > > > > > > > value > > > > > > > > > +sed > > > > > > > > > -i "s|prefix=3D|prefix=3D$DESTDIR|" > > > > > > > > > $PKG_CONFIG_PATH/libdpdk.pc > > > > > > > >=20 > > > > > > > > What about just using meson's prefix option instead? > > > > > > > > Which is > > > > > > > > how > > > > > > > > it > > > > > > > > would be used in a real use case > > > > > > >=20 > > > > > > > I don't think that would fully work, as my understanding > > > > > > > is that > > > > > > > the > > > > > > > prefix > > > > > > > option would apply only to the /usr/local parts, but not > > > > > > > to the > > > > > > > kernel > > > > > > > modules which would still try and install in /lib/. > > > > > >=20 > > > > > > What about doing a meson configure -Denable_kmods=3Dfalse > > > > > > before the > > > > > > ninja install? The modules are not needed for that test > > > > > > anyway, > > > > > > right? > > > > > > Alternatively, the kernel src dir could be symlinked in the > > > > > > build > > > > > > path, > > > > > > and the kernel_dir option could be used > > > > > >=20 > > > > > > I'm just worried that the test should be as "realistic" as > > > > > > possible, to > > > > > > avoid missing something > > > > >=20 > > > > > Yes, I did think of that too, but it does mean doing another > > > > > configuration > > > > > run in meson, and possibly a rebuild too if the > > > > > rte_build_config.h > > > > > file > > > > > changes. Therefore I decided to use DESTDIR for the sake of > > > > > speed > > > > > here. I > > > > > assumed there would be a pkg-config variable to adjust the > > > > > output > > > > > paths > > > > > based on a sysroot, but couldn't find a suitable one. > >=20 > > [...] > > > > There actually is a pkg-config binary option, I just tried and > > > > it works > > > > (it seems to be disabled by default on Debian and derivatives): > > > > -- > > > > define-prefix > > > >=20 > > >=20 > > > Any cmdline options to pkg-config don't solve the problem here as > > > it means > > > that the makefiles for any app need to be modified to use all > > > those. > >=20 > > It looks to be a good solution. > > Being able to update the DPDK install directory when building > > an application should be a mandatory requirement. > > I suggest to wrap the call to pkg-config so we can have this > > ability. > >=20 >=20 > I would have expected that this issue has already been solved for > packagers. I was surprised that I couldn't find an easy way to do so. Packagers use standard paths - so it never becomes a problem. If editing the file on the fly is not acceptable for the test script, then I'd suggest to fall back to the pkg-config option, and just document the need to use it in the docs for this scenarios. --=20 Kind regards, Luca Boccassi