DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Luca Boccassi <bluca@debian.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file
Date: Fri, 26 Apr 2019 15:56:07 +0100	[thread overview]
Message-ID: <20190426144838.GA26084@bsd12> (raw)
Message-ID: <20190426145607.T_H0sr2x5dgOTOMT71KURpZiiZjg-JN0-eU1SjULQFE@z> (raw)
In-Reply-To: <181e25f512b11f6c691f58c2cfdf47a9322a5091.camel@debian.org>

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:
> > > > > > 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.
> > > > > > 
> > > > > > Signed-off-by: Bruce Richardson < 
> > > > > > bruce.richardson@intel.com
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > --- devtools/test-meson-builds.sh | 17 +++++++++++++++++ 1
> > > > > > file
> > > > > > changed, 17 insertions(+)
> > > > > > 
> > > > > > 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=build-x86-default
> > > > > > +DESTDIR=`pwd`/$build_path/install-
> > > > > > root ;
> > > > > > export DESTDIR
> > > > > > +PKG_CONFIG_PATH=$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=|prefix=$DESTDIR|" $PKG_CONFIG_PATH/libdpdk.pc
> > > > > 
> > > > > What about just using meson's prefix option instead? Which is
> > > > > how
> > > > > it
> > > > > would be used in a real use case
> > > > > 
> > > > 
> > > > 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/.
> > > > 
> > > > /Bruce
> > > 
> > > What about doing a meson configure -Denable_kmods=false 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
> > > 
> > > I'm just worried that the test should be as "realistic" as
> > > possible, to
> > > avoid missing something
> > > 
> > 
> > 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.
> > 
> > In any case, I'll see about changing things as you suggest in V2 -
> > correctness is more important that speed here.
> > 
> > /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
> 
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.

Also, I've been looking at the option you suggest of disabling the kernel
modules for the install step - the problem that this brings is that it either:
* disables them permanently for the default build, meaning subsequent runs
  may fail to catch errors
* causes us to constantly reconfigure the build directory with/without
  the kmod setting, causing unnecessary work and slowdown in the script.

A third solution is to use a separate build folder for the pkg-config test
builds, but I think we have enough builds already in the setup without adding
another one.

All-in-all, I feel at this point that the original solution of making a small
change to the pkg-config file manually is the best solution for now. I don't
see it as being terribly fragile, and it should catch 95% of problems with
the pkg-config files. I suggest that any rework be looked at in a later set
to improve things.

Regards,
/Bruce

  parent reply	other threads:[~2019-04-26 14:56 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk " Bruce Richardson
2019-04-23 22:06 ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-24  9:22   ` Luca Boccassi
2019-04-24  9:22     ` Luca Boccassi
2019-04-24 10:41     ` Bruce Richardson
2019-04-24 10:41       ` Bruce Richardson
2019-04-24 11:02       ` Luca Boccassi
2019-04-24 11:02         ` Luca Boccassi
2019-04-24 12:31         ` Bruce Richardson
2019-04-24 12:31           ` Bruce Richardson
2019-04-24 13:37           ` Luca Boccassi
2019-04-24 13:37             ` Luca Boccassi
2019-04-26 14:56             ` Bruce Richardson [this message]
2019-04-26 14:56               ` Bruce Richardson
2019-04-26 16:10               ` Luca Boccassi
2019-04-26 16:10                 ` Luca Boccassi
2019-05-02 13:11               ` Thomas Monjalon
2019-05-02 13:11                 ` Thomas Monjalon
2019-05-02 13:17                 ` Bruce Richardson
2019-05-02 13:17                   ` Bruce Richardson
2019-05-02 14:08                   ` Luca Boccassi
2019-05-02 14:08                     ` Luca Boccassi
2019-05-02 15:11                     ` Thomas Monjalon
2019-05-02 15:11                       ` Thomas Monjalon
2019-05-02 15:30                       ` Bruce Richardson
2019-05-02 15:30                         ` Bruce Richardson
2019-05-02 15:38                         ` Thomas Monjalon
2019-05-02 15:38                           ` Thomas Monjalon
2019-05-02 15:41                           ` Bruce Richardson
2019-05-02 15:41                             ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 23:04 ` [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Stephen Hemminger
2019-04-23 23:04   ` Stephen Hemminger
2019-04-24  8:54   ` Bruce Richardson
2019-04-24  8:54     ` Bruce Richardson
2019-04-24  9:00     ` Bruce Richardson
2019-04-24  9:00       ` Bruce Richardson
2019-04-26 16:11 ` Luca Boccassi
2019-04-26 16:11   ` Luca Boccassi
2019-04-26 16:20   ` Bruce Richardson
2019-04-26 16:20     ` Bruce Richardson
2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
2019-04-26 16:50   ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-02 12:38     ` Thomas Monjalon
2019-05-02 12:38       ` Thomas Monjalon
2019-05-02 12:54       ` Luca Boccassi
2019-05-02 12:54         ` Luca Boccassi
2019-05-02 13:21       ` Bruce Richardson
2019-05-02 13:21         ` Bruce Richardson
2019-05-02 13:57         ` Thomas Monjalon
2019-05-02 13:57           ` Thomas Monjalon
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
2019-05-02 16:51     ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 21:09     ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Thomas Monjalon
2019-05-02 21:09       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190426144838.GA26084@bsd12 \
    --to=bruce.richardson@intel.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).