[Pkg-dpdk-devel] Bug#917984: Bug#917984: Bug#917984: Bug#917984: Bug#917984: Can not link ODP with newer DPDK

Luca Boccassi bluca at debian.org
Sat Jan 26 14:44:25 GMT 2019


On Thu, 2019-01-03 at 13:26 +0100, Luca Boccassi wrote:
> On Thu, 2019-01-03 at 02:29 +0300, Dmitry Eremin-Solenikov wrote:
> > Hello,
> > 
> > чт, 3 янв. 2019 г. в 02:09, Luca Boccassi <bluca at debian.org>:
> > > On Wed, 2019-01-02 at 14:55 +0300, Dmitry Eremin-Solenikov wrote:
> > > > ср, 2 янв. 2019 г. в 14:49, Luca Boccassi <bluca at debian.org>:
> > > > > On Wed, 2019-01-02 at 01:43 +0300, Dmitry Eremin-Solenikov
> > > > > wrote:
> > > > > Strange that libtool is messing things up, I've used the same
> > > > > pkgconfig
> > > > > file in a few different projects that use autoconf/automake
> > > > > and
> > > > > I
> > > > > haven't seen this issue.
> > > > 
> > > > libtool rearranges/squashes linking flags in an attempt to find
> > > > 'better'
> > > > linking flags. Unfortunately this fail for DPDK. We have worked
> > > > around
> > > > this by squashing all PMDs into a single gcc argument:
> > > > -Wl,--whole-archive,-lrte_pmd_af_packet,-
> > > > lrte_pmd_ark,........,-
> > > > lrte_pmd_vmxnet3_uio,--no-whole-archive
> > > > -ldpdk
> > > > 
> > > > Thus libtool won't move PMDs from --whole-archive/--no-whole-
> > > > archive
> > > > brackets.
> > > > 
> > > > > I had a look on github, and it does not seem that odp is
> > > > > currently
> > > > > using pkg-config, but rather doing some manual check - is
> > > > > there
> > > > > a
> > > > > branch in a fork or a patch you could point me to so that I
> > > > > can
> > > > > try
> > > > > to
> > > > > reproduce?
> > > > 
> > > > No, I have not pushed my code to github yet. The easies way to
> > > > reproduce
> > > > is to statically link a sample program with libtool and check
> > > > that
> > > > generated
> > > > ELF contains all PMDs.
> > > 
> > > That looks like a very very old libtool bug:
> > > 
> > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650
> > > 
> > > Have you tried patching config/ltmain.sh as it's suggested on
> > > that
> > > bug?
> > 
> > I can try doing that as a test, but I wouldn't like to have patched
> > ltmain.sh
> > in the source tree.
> 
> Another workaround has been suggested and I've verified that it
> works:
> parse the output of pkg-config --libs --static libdpdk and change the
> string "-Wl,--whole-archive -lrte_pmdfoo -lrte_pmdbar ... -Wl,--no-
> whole-archive" intoto "-Wl,--whole-archive,-lrte_pmdfoo,-
> lrte_pmdbar,...,--no-whole-archive"
> 
> Basically, trick libtool into thinking that it's a single linker
> flag:
> 
> > > Something like:
> > 
> > [patch skipped]
> > 
> > > Note that the current version of Meson does not do a good job of
> > > generating the pkg-config file, but it's fixed in the version in
> > > development. I also found a couple of bugs in dpdk. So the
> > > following
> > > content for libdpdk.pc is more correct:
> > 
> > [libdpdk.pc skipped]
> > 
> > Do you plan to upload fixed dpdk packages?
> 
> Yes, I'll push the changes upstream and backport them sometimes
> within
> the next couple of days.

I've uploaded that in the past couple of days, the pkg-config file now
lists everything needed for static builds and uses Requires.private for
recursive dependencies.

Note that on amd64 libdpdk-dev is missing a dependency on libipsec-mb-
dev, this will be fixed in the next upload.

-- 
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-dpdk-devel/attachments/20190126/18332ec6/attachment.sig>


More information about the Pkg-dpdk-devel mailing list