patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, bruce.richardson@intel.com, bluca@debian.org,
	olivier.matz@6wind.com, thierry.herbelot@6wind.com,
	Gabriel Ganne <gabriel.ganne@6wind.com>,
	stable@dpdk.org, Harry van Haaren <harry.van.haaren@intel.com>,
	Luca Boccassi <luca.boccassi@gmail.com>,
	Keith Wiles <keith.wiles@intel.com>,
	david.marchand@redhat.com
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v5] build: remove redundant libpcap link
Date: Thu, 15 Apr 2021 00:02:45 +0300
Message-ID: <20210415000245.0b1d45c1@sovereign> (raw)
In-Reply-To: <3119483.LeJDoi8FaI@thomas>

2021-04-14 11:41 (UTC+0200), Thomas Monjalon:
> 09/04/2021 14:25, Thomas Monjalon:
> > From: Gabriel Ganne <gabriel.ganne@6wind.com>
> > 
> > The pcap PMD and the librte_port both declare their dependency to libpcap
> > with a line "ext_deps += pcap_dep".
> > Then meson automatically adds this dependency to the pkg-config file
> > in the "Requires.private" section for static builds.
> > 
> > The additional update of dpdk_extra_ldflags was adding the dependency
> > in the "Libs.private" section of the pkg-config, that is unnecessary.
> > 
> > Fixes: efd5d1a8d8dd ("drivers/net: build some vdev PMDs with meson")
> > Fixes: 268fa581b1ff ("port: fix pcap support with meson")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> > I have a doubt whether this option is really always useless.
> > In the case of an old pcap (<1.9) without pkg-config support,
> > and with the minimum meson supported (0.47.1),
> > are we sure the generated pkg-config file will include -lpcap?  
> 
> Any volunteer to test please?

Ubuntu 16.04, Meson 0.47.1, libpcap 1.7.4-2ubuntu0.1, after the patch
libdpdk.pc contains:

	Libs.private: -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap
	-lpcap -lpcap [...DPDK libraries...]

Note that -lpcap comes _before_ DPDK libraries that require it.
As a consequence, this doesn't link with unresolved libpcap symbols:

	gcc test.c `pkg-config --static --cflags --libs libdpdk`

Before the patch -lpcap was _after_ DPDK libraries,
link succeeded (there was also _one_ -lpcap before DPDK libraries).

Meson 0.55.1 places -lpcap _after_ DPDK libraries,
link succeeds both before and after the patch.

Conclusion: this patch really breaks .pc file for older meson.
If it can't be merged, dependent patches for net/pcap on Windows
can be easily adjusted to work without it.

  reply	other threads:[~2021-04-14 21:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210409083927.8345-1-gabriel.ganne@6wind.com>
2021-04-09 12:25 ` [dpdk-stable] " Thomas Monjalon
2021-04-14  9:41   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2021-04-14 21:02     ` Dmitry Kozlyuk [this message]
2021-04-14 21:10       ` 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=20210415000245.0b1d45c1@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=bluca@debian.org \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gabriel.ganne@6wind.com \
    --cc=harry.van.haaren@intel.com \
    --cc=keith.wiles@intel.com \
    --cc=luca.boccassi@gmail.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    --cc=thierry.herbelot@6wind.com \
    --cc=thomas@monjalon.net \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git