From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 4485B1B4FB for ; Wed, 24 Apr 2019 15:38:01 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id f7so2619069wrs.2 for ; Wed, 24 Apr 2019 06:38:01 -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=w2AtaKDDlYWjZYTar8GAXpC5w5CtsHeiUFC7PjD01Zs=; b=K7JRKM9WUZqV8qo02J0D5qY7PLA20Ngl08WEaqXECW5mE7xE9yPwjMeNyS3zS4V4pi JfO6VAbDjC65UuTVi7RhuQb8IGws4IwufnALrNypHtdXoF6q++XXBT9HtU1oO15gakI1 s8YtO/CGCSX5rHdbE7RqcMRBDZILmv5XbHKLoH8MAELvVWEbb8r23M/2q65mVm6ywR29 HTjYTKzAXs6o0hD/Wsu/0YupdHmormfFDW3dKZ1/evIeHwGooIq9VF3EXITxe98MOXY/ yoD078KnxFoMumb96qKBT7bvBGCM/ueC378N92WjCVKjC/5CoNcQHLJjm47A5e7Ifmwh I9Fw== X-Gm-Message-State: APjAAAXxbjqfulLYXAq2IyzMvh0qEo4d/n7B6VBWTLkP7pnfe9N8gihp HsZxHnSf0wujGgcXWB6A29I= X-Google-Smtp-Source: APXvYqx6V4EKwymF3nOWoepb+e7cdbkmkdMeyQ5FjBu1W60d7/uq+qLpjpPePTeCdH1Zm8f3VraPUw== X-Received: by 2002:a5d:45cc:: with SMTP id b12mr7367739wrs.142.1556113080659; Wed, 24 Apr 2019 06:38:00 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i17sm17775410wrs.44.2019.04.24.06.37.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 06:37:59 -0700 (PDT) Message-ID: <181e25f512b11f6c691f58c2cfdf47a9322a5091.camel@debian.org> From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org Date: Wed, 24 Apr 2019 14:37:58 +0100 In-Reply-To: <20190424123105.GA1892@bricha3-MOBL.ger.corp.intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190423220644.54589-4-bruce.richardson@intel.com> <8e3b35cd842729263299466a5cfb34f37d6dd729.camel@debian.org> <20190424104119.GB1885@bricha3-MOBL.ger.corp.intel.com> <20190424123105.GA1892@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: Wed, 24 Apr 2019 13:38:01 -0000 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: > > > > > The pkg-config file generated as part of the build of DPDK > > > > > should > > > > > allow > > > > > applications to be built with an installed DPDK. We can test > > > > > this > > > > > as > > > > > part of the build by doing an install of DPDK to a temporary > > > > > directory > > > > > within the build folder, and by then compiling up a few > > > > > sample > > > > > apps > > > > > using make working off that directory. > > > > >=20 > > > > > Signed-off-by: Bruce Richardson <=20 > > > > > bruce.richardson@intel.com > > > > >=20 > > > > >=20 > > > > >=20 > > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 > > > > > file > > > > > changed, 17 insertions(+) > > > > >=20 > > > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test- > > > > > meson- > > > > > builds.sh index 630a1a6fe..dfba2a782 100755 --- > > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson- > > > > > builds.sh @@ > > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then > > > > > $use_shared > > > > > --cross-file $f done fi + +############## +# Test > > > > > installation of > > > > > the > > > > > x86-default target, to be used for checking +# the sample > > > > > apps > > > > > build > > > > > using the pkg-config file for cflags and libs > > > > > +############### > > > > > +build_path=3Dbuild-x86-default > > > > > +DESTDIR=3D`pwd`/$build_path/install- > > > > > root ; > > > > > export DESTDIR > > > > > +PKG_CONFIG_PATH=3D$DESTDIR/usr/local/lib64/pkgconfig ; > > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + > > > > > +# > > > > > 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 > > >=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 > > > /Bruce > >=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 >=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 > In any case, I'll see about changing things as you suggest in V2 - > correctness is more important that speed here. >=20 > /Bruce 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 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 4B772A05D3 for ; Wed, 24 Apr 2019 15:38:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 10D6D1B4FC; Wed, 24 Apr 2019 15:38:02 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 4485B1B4FB for ; Wed, 24 Apr 2019 15:38:01 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id f7so2619069wrs.2 for ; Wed, 24 Apr 2019 06:38:01 -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=w2AtaKDDlYWjZYTar8GAXpC5w5CtsHeiUFC7PjD01Zs=; b=K7JRKM9WUZqV8qo02J0D5qY7PLA20Ngl08WEaqXECW5mE7xE9yPwjMeNyS3zS4V4pi JfO6VAbDjC65UuTVi7RhuQb8IGws4IwufnALrNypHtdXoF6q++XXBT9HtU1oO15gakI1 s8YtO/CGCSX5rHdbE7RqcMRBDZILmv5XbHKLoH8MAELvVWEbb8r23M/2q65mVm6ywR29 HTjYTKzAXs6o0hD/Wsu/0YupdHmormfFDW3dKZ1/evIeHwGooIq9VF3EXITxe98MOXY/ yoD078KnxFoMumb96qKBT7bvBGCM/ueC378N92WjCVKjC/5CoNcQHLJjm47A5e7Ifmwh I9Fw== X-Gm-Message-State: APjAAAXxbjqfulLYXAq2IyzMvh0qEo4d/n7B6VBWTLkP7pnfe9N8gihp HsZxHnSf0wujGgcXWB6A29I= X-Google-Smtp-Source: APXvYqx6V4EKwymF3nOWoepb+e7cdbkmkdMeyQ5FjBu1W60d7/uq+qLpjpPePTeCdH1Zm8f3VraPUw== X-Received: by 2002:a5d:45cc:: with SMTP id b12mr7367739wrs.142.1556113080659; Wed, 24 Apr 2019 06:38:00 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i17sm17775410wrs.44.2019.04.24.06.37.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 06:37:59 -0700 (PDT) Message-ID: <181e25f512b11f6c691f58c2cfdf47a9322a5091.camel@debian.org> From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org Date: Wed, 24 Apr 2019 14:37:58 +0100 In-Reply-To: <20190424123105.GA1892@bricha3-MOBL.ger.corp.intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> <20190423220644.54589-4-bruce.richardson@intel.com> <8e3b35cd842729263299466a5cfb34f37d6dd729.camel@debian.org> <20190424104119.GB1885@bricha3-MOBL.ger.corp.intel.com> <20190424123105.GA1892@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: <20190424133758.wQ8iAFRSTXaqEuyrSJt-Jtsi5dM3q0kA89yGHFMJcVk@z> 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: > > > > > The pkg-config file generated as part of the build of DPDK > > > > > should > > > > > allow > > > > > applications to be built with an installed DPDK. We can test > > > > > this > > > > > as > > > > > part of the build by doing an install of DPDK to a temporary > > > > > directory > > > > > within the build folder, and by then compiling up a few > > > > > sample > > > > > apps > > > > > using make working off that directory. > > > > >=20 > > > > > Signed-off-by: Bruce Richardson <=20 > > > > > bruce.richardson@intel.com > > > > >=20 > > > > >=20 > > > > >=20 > > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1 > > > > > file > > > > > changed, 17 insertions(+) > > > > >=20 > > > > > diff --git a/devtools/test-meson-builds.sh b/devtools/test- > > > > > meson- > > > > > builds.sh index 630a1a6fe..dfba2a782 100755 --- > > > > > a/devtools/test-meson-builds.sh +++ b/devtools/test-meson- > > > > > builds.sh @@ > > > > > -90,3 +90,20 @@ if command -v $c >/dev/null 2>&1 ; then > > > > > $use_shared > > > > > --cross-file $f done fi + +############## +# Test > > > > > installation of > > > > > the > > > > > x86-default target, to be used for checking +# the sample > > > > > apps > > > > > build > > > > > using the pkg-config file for cflags and libs > > > > > +############### > > > > > +build_path=3Dbuild-x86-default > > > > > +DESTDIR=3D`pwd`/$build_path/install- > > > > > root ; > > > > > export DESTDIR > > > > > +PKG_CONFIG_PATH=3D$DESTDIR/usr/local/lib64/pkgconfig ; > > > > > export PKG_CONFIG_PATH +$ninja_cmd -C $build_path install + > > > > > +# > > > > > 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 > > >=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 > > > /Bruce > >=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 >=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 > In any case, I'll see about changing things as you suggest in V2 - > correctness is more important that speed here. >=20 > /Bruce 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 Kind regards, Luca Boccassi