DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Igor Russkikh <irusskikh@marvell.com>,
	Aaron Conole <aconole@redhat.com>,
	Michael Santana <maicolgabriel@hotmail.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Heinrich Kuhn <heinrich.kuhn@netronome.com>,
	Devendra Singh Rawat <dsinghrawat@marvell.com>,
	Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>,
	Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
	Dmitry Malloy <dmitrym@microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] eal: handle compressed firmwares
Date: Sat, 5 Jun 2021 00:40:24 +0300	[thread overview]
Message-ID: <20210605004024.660267a1@sovereign> (raw)
In-Reply-To: <CAJFAV8yYFOXM6aeYpdFpvP0+JRRsK2VjAWAxfkFWG5t=nEqA0Q@mail.gmail.com>

2021-06-04 09:27 (UTC+0200), David Marchand:
> On Fri, Jun 4, 2021 at 12:29 AM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
> >
> > 2021-06-03 18:55 (UTC+0200), David Marchand:
> > [...]  
> > > diff --git a/config/meson.build b/config/meson.build
> > > index 017bb2efbb..c6985139b4 100644
> > > --- a/config/meson.build
> > > +++ b/config/meson.build
> > > @@ -172,6 +172,13 @@ if libexecinfo.found() and cc.has_header('execinfo.h')
> > >      dpdk_extra_ldflags += '-lexecinfo'
> > >  endif
> > >
> > > +libarchive = dependency('libarchive', required: false, method: 'pkg-config')
> > > +if libarchive.found()
> > > +    dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1)
> > > +    add_project_link_arguments('-larchive', language: 'c')
> > > +    dpdk_extra_ldflags += '-larchive'
> > > +endif
> > > +  
> >
> > Suggestion:
> >
> > diff --git a/config/meson.build b/config/meson.build
> > index c6985139b4..c3668798c1 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -175,7 +175,6 @@ endif
> >  libarchive = dependency('libarchive', required: false, method: 'pkg-config')
> >  if libarchive.found()
> >      dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1)
> > -    add_project_link_arguments('-larchive', language: 'c')
> >      dpdk_extra_ldflags += '-larchive'
> >  endif
> >
> > diff --git a/lib/eal/meson.build b/lib/eal/meson.build
> > index 1722924f67..5a018d97d6 100644
> > --- a/lib/eal/meson.build
> > +++ b/lib/eal/meson.build
> > @@ -16,6 +16,7 @@ subdir(exec_env)
> >  subdir(arch_subdir)
> >
> >  deps += ['kvargs']
> > +ext_deps += libarchive
> >  if not is_windows
> >      deps += ['telemetry']
> >  endif
> >  
> 
> I had tried something close when preparing v2 (only keeping
> RTE_HAS_LIBARCHIVE in config/meson.build and putting extra_ldflags and
> ext_deps in lib/eal/unix/meson.build) but both my try and your
> suggestion break static compilation for the helloworld example.
> 
> 
> $ ./devtools/test-meson-builds.sh -vv
> ...
> ## Building helloworld
[snip]

Thanks for details.
Indeed, libarchive.pc lists all libraries present at libarchive build time
in Libs.private, despite that libarchive static linkage doesn't require them.
We'll have to go your way, sorry for misdirection.
Maybe it's worth a comment.

From libarchive README:

	I've attempted to minimize static link pollution. If you don't
	explicitly invoke a particular feature (such as support for a
	particular compression or format), it won't get pulled in to
	statically-linked programs. In particular, if you don't explicitly
	enable a particular compression or decompression support, you won't
	need to link against the corresponding compression or decompression
	libraries. This also reduces the size of statically-linked binaries
	in environments where that matters.


  reply	other threads:[~2021-06-04 21:40 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  9:58 [dpdk-dev] [PATCH 0/2] Support " David Marchand
2021-06-02  9:58 ` [dpdk-dev] [PATCH 1/2] net/ice: factorize firmware loading David Marchand
2021-06-02  9:58 ` [dpdk-dev] [PATCH 2/2] eal: handle compressed firmwares David Marchand
2021-06-02 11:13   ` Jerin Jacob
2021-06-02 15:46     ` David Marchand
2021-06-02 11:30   ` [dpdk-dev] [EXT] " Igor Russkikh
2021-06-02 21:19   ` [dpdk-dev] " Dmitry Kozlyuk
2021-06-03  7:23     ` David Marchand
2021-06-03  7:53       ` David Marchand
2021-06-03  8:14         ` Bruce Richardson
2021-06-02 10:35 ` [dpdk-dev] [EXT] [PATCH 0/2] Support " Igor Russkikh
2021-06-02 11:05   ` David Marchand
2021-06-02 11:23     ` Igor Russkikh
2021-06-03 16:55 ` [dpdk-dev] [PATCH v2 " David Marchand
2021-06-03 16:55   ` [dpdk-dev] [PATCH v2 1/2] net/ice: factorize firmware loading David Marchand
2021-06-28  7:58     ` David Marchand
2021-06-03 16:55   ` [dpdk-dev] [PATCH v2 2/2] eal: handle compressed firmwares David Marchand
2021-06-03 22:29     ` Dmitry Kozlyuk
2021-06-04  7:27       ` David Marchand
2021-06-04 21:40         ` Dmitry Kozlyuk [this message]
2021-06-07  9:28           ` David Marchand
2021-06-14 13:17   ` [dpdk-dev] [PATCH v2 0/2] Support " David Marchand
2021-06-29  8:06 ` [dpdk-dev] [PATCH v3 " David Marchand
2021-06-29  8:06   ` [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading David Marchand
2021-07-05  1:43     ` Wang, Haiyue
2021-07-05  3:33       ` Wang, Haiyue
2021-07-05  7:08       ` David Marchand
2021-07-05  8:02         ` Wang, Haiyue
2021-07-05  8:33           ` David Marchand
2021-07-05  9:59             ` Zhang, Qi Z
2021-07-05 11:46               ` Wang, Haiyue
2021-07-05 11:44             ` Wang, Haiyue
2021-07-05 13:18     ` Wang, Haiyue
2021-07-05 13:34       ` David Marchand
2021-06-29  8:06   ` [dpdk-dev] [PATCH v3 2/2] eal: handle compressed firmwares David Marchand
2021-06-29 12:45     ` Aaron Conole
2021-07-05  6:35     ` Wang, Haiyue
2021-07-05  6:54       ` David Marchand
2021-07-05 13:19     ` Wang, Haiyue
2021-07-06 14:29 ` [dpdk-dev] [PATCH v4 0/2] Support " David Marchand
2021-07-06 14:29   ` [dpdk-dev] [PATCH v4 1/2] net/ice: factorize firmware loading David Marchand
2021-07-06 14:29   ` [dpdk-dev] [PATCH v4 2/2] eal: handle compressed firmwares David Marchand
2021-07-07 12:08 ` [dpdk-dev] [PATCH v5 0/2] Support " David Marchand
2021-07-07 12:08   ` [dpdk-dev] [PATCH v5 1/2] net/ice: factorize firmware loading David Marchand
2021-07-07 12:08   ` [dpdk-dev] [PATCH v5 2/2] eal: handle compressed firmware David Marchand
2021-07-07 15:03   ` [dpdk-dev] [PATCH v5 0/2] Support compressed firmwares David Marchand

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=20210605004024.660267a1@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=aconole@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitrym@microsoft.com \
    --cc=dsinghrawat@marvell.com \
    --cc=heinrich.kuhn@netronome.com \
    --cc=irusskikh@marvell.com \
    --cc=maicolgabriel@hotmail.com \
    --cc=mdr@ashroe.eu \
    --cc=navasile@linux.microsoft.com \
    --cc=nhorman@tuxdriver.com \
    --cc=pallavi.kadam@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rmody@marvell.com \
    --cc=shshaikh@marvell.com \
    /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).