[dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file

Thomas Monjalon thomas at monjalon.net
Thu May 2 15:11:10 CEST 2019


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=|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/.
> > > > 
> > > > 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.
[...]
> > 
> > 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.

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.





More information about the dev mailing list