* [dpdk-stable] [PATCH v5] build: remove redundant libpcap link
[not found] <20210409083927.8345-1-gabriel.ganne@6wind.com>
@ 2021-04-09 12:25 ` Thomas Monjalon
2021-04-14 9:41 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2021-04-09 12:25 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, bluca, dmitry.kozliuk, olivier.matz,
thierry.herbelot, Gabriel Ganne, stable, Harry van Haaren,
Luca Boccassi, Keith Wiles
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?
---
config/meson.build | 1 -
1 file changed, 1 deletion(-)
diff --git a/config/meson.build b/config/meson.build
index 66a2edcc47..95777cf331 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -183,7 +183,6 @@ if not pcap_dep.found()
endif
if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
dpdk_conf.set('RTE_PORT_PCAP', 1)
- dpdk_extra_ldflags += '-lpcap'
endif
# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
--
2.31.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v5] build: remove redundant libpcap link
2021-04-09 12:25 ` [dpdk-stable] [PATCH v5] build: remove redundant libpcap link Thomas Monjalon
@ 2021-04-14 9:41 ` Thomas Monjalon
2021-04-14 21:02 ` Dmitry Kozlyuk
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2021-04-14 9:41 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, bluca, dmitry.kozliuk, olivier.matz,
thierry.herbelot, Gabriel Ganne, stable, Harry van Haaren,
Luca Boccassi, Keith Wiles, david.marchand
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v5] build: remove redundant libpcap link
2021-04-14 9:41 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
@ 2021-04-14 21:02 ` Dmitry Kozlyuk
2021-04-14 21:10 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Kozlyuk @ 2021-04-14 21:02 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, bruce.richardson, bluca, olivier.matz, thierry.herbelot,
Gabriel Ganne, stable, Harry van Haaren, Luca Boccassi,
Keith Wiles, david.marchand
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v5] build: remove redundant libpcap link
2021-04-14 21:02 ` Dmitry Kozlyuk
@ 2021-04-14 21:10 ` Thomas Monjalon
2023-07-16 17:19 ` Stephen Hemminger
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2021-04-14 21:10 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, bruce.richardson, bluca, olivier.matz, thierry.herbelot,
Gabriel Ganne, stable, Harry van Haaren, Luca Boccassi,
Keith Wiles, david.marchand
14/04/2021 23:02, Dmitry Kozlyuk:
> 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.
Thanks for the test.
I propose to defer this patch.
It could be merged when we upgrade meson requirement.
In the meantime, we could document why this line is required.
> If it can't be merged, dependent patches for net/pcap on Windows
> can be easily adjusted to work without it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v5] build: remove redundant libpcap link
2021-04-14 21:10 ` Thomas Monjalon
@ 2023-07-16 17:19 ` Stephen Hemminger
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2023-07-16 17:19 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Dmitry Kozlyuk, dev, bruce.richardson, bluca, olivier.matz,
thierry.herbelot, Gabriel Ganne, stable, Harry van Haaren,
Luca Boccassi, Keith Wiles, david.marchand
On Wed, 14 Apr 2021 23:10:46 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> 14/04/2021 23:02, Dmitry Kozlyuk:
> > 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.
>
> Thanks for the test.
> I propose to defer this patch.
> It could be merged when we upgrade meson requirement.
Current documented meson requirement is:
Version 0.53.2 or later of meson is required
So this patch should be considered.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-16 17:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210409083927.8345-1-gabriel.ganne@6wind.com>
2021-04-09 12:25 ` [dpdk-stable] [PATCH v5] build: remove redundant libpcap link Thomas Monjalon
2021-04-14 9:41 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2021-04-14 21:02 ` Dmitry Kozlyuk
2021-04-14 21:10 ` Thomas Monjalon
2023-07-16 17:19 ` Stephen Hemminger
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).