[v2] build: avoid --as-needed as it causes overlinking

Message ID 20190829153003.7974-1-christian.ehrhardt@canonical.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] build: avoid --as-needed as it causes overlinking |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Christian Ehrhardt Aug. 29, 2019, 3:30 p.m. UTC
  A while ago telemetry was added in 57ae0ec6 and it also added as-needed
to config/meson.build. This seems no more needed these days as due to other
build changes the ordering in buildlogs is:
  [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
Which means telemetry no more benefits from --no-as-needed anyway.

Overlinking problems get triggered by the meson generated pkgconfig which
will have:
   [...] -Wl,--no-as-needed <somelibsusedbydpdk>
This will overlink <somelibs> and in addition anything that follows
as it also doesn't wrap back to --as-needed. So if a projects includes
dpdk libs + <other> it will also consider <other> with --no-as-needed.

Fixes: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/meson.build | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Bruce Richardson Aug. 29, 2019, 3:34 p.m. UTC | #1
On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> A while ago telemetry was added in 57ae0ec6 and it also added as-needed
> to config/meson.build. This seems no more needed these days as due to other
> build changes the ordering in buildlogs is:
>   [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
> Which means telemetry no more benefits from --no-as-needed anyway.
> 
> Overlinking problems get triggered by the meson generated pkgconfig which
> will have:
>    [...] -Wl,--no-as-needed <somelibsusedbydpdk>
> This will overlink <somelibs> and in addition anything that follows
> as it also doesn't wrap back to --as-needed. So if a projects includes
> dpdk libs + <other> it will also consider <other> with --no-as-needed.
> 
> Fixes: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> 
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Acked-by: Luca Boccassi <bluca@debian.org>
> ---
>  config/meson.build | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/config/meson.build b/config/meson.build
> index 2bafea530..a27f731f8 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -94,7 +94,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
>  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
>  
>  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> -dpdk_extra_ldflags += '-Wl,--no-as-needed'
>  

This seems strange to me. What is it about linking the dpdk apps that
require the argument, but makes it safe for non-builtin apps to avoid
having the arg?
  
Luca Boccassi Aug. 29, 2019, 4:02 p.m. UTC | #2
On Thu, 2019-08-29 at 16:34 +0100, Bruce Richardson wrote:
> On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> > A while ago telemetry was added in 57ae0ec6 and it also added as-
> > needed
> > to config/meson.build. This seems no more needed these days as due
> > to other
> > build changes the ordering in buildlogs is:
> >   [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
> > Which means telemetry no more benefits from --no-as-needed anyway.
> > 
> > Overlinking problems get triggered by the meson generated pkgconfig
> > which
> > will have:
> >    [...] -Wl,--no-as-needed <somelibsusedbydpdk>
> > This will overlink <somelibs> and in addition anything that follows
> > as it also doesn't wrap back to --as-needed. So if a projects
> > includes
> > dpdk libs + <other> it will also consider <other> with --no-as-
> > needed.
> > 
> > Fixes: 
> > https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> > 
> > 
> > Signed-off-by: Christian Ehrhardt <
> > christian.ehrhardt@canonical.com
> > >
> > Acked-by: Luca Boccassi <
> > bluca@debian.org
> > >
> > ---
> >  config/meson.build | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/config/meson.build b/config/meson.build
> > index 2bafea530..a27f731f8 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -94,7 +94,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' +
> > toolchain.to_upper(), 1)
> >  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
> >  
> >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > -dpdk_extra_ldflags += '-Wl,--no-as-needed'
> >  
> 
> This seems strange to me. What is it about linking the dpdk apps that
> require the argument, but makes it safe for non-builtin apps to avoid
> having the arg?

We've been wondering about that for a while :-) It also seems to be not
reproducible on Ubuntu 18.04/gcc 7.4.

Can the verbose linking log be shared here, so that we can have a look
at where no-as-needed lands? Might provide some clue
  
Christian Ehrhardt Sept. 2, 2019, 7:09 a.m. UTC | #3
On Thu, Aug 29, 2019 at 6:02 PM Luca Boccassi <bluca@debian.org> wrote:
>
> On Thu, 2019-08-29 at 16:34 +0100, Bruce Richardson wrote:
> > On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> > > A while ago telemetry was added in 57ae0ec6 and it also added as-
> > > needed
> > > to config/meson.build. This seems no more needed these days as due
> > > to other
> > > build changes the ordering in buildlogs is:
> > >   [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
> > > Which means telemetry no more benefits from --no-as-needed anyway.
> > >
> > > Overlinking problems get triggered by the meson generated pkgconfig
> > > which
> > > will have:
> > >    [...] -Wl,--no-as-needed <somelibsusedbydpdk>
> > > This will overlink <somelibs> and in addition anything that follows
> > > as it also doesn't wrap back to --as-needed. So if a projects
> > > includes
> > > dpdk libs + <other> it will also consider <other> with --no-as-
> > > needed.
> > >
> > > Fixes:
> > > https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> > >
> > >
> > > Signed-off-by: Christian Ehrhardt <
> > > christian.ehrhardt@canonical.com
> > > >
> > > Acked-by: Luca Boccassi <
> > > bluca@debian.org
> > > >
> > > ---
> > >  config/meson.build | 1 -
> > >  1 file changed, 1 deletion(-)
> > >
> > > diff --git a/config/meson.build b/config/meson.build
> > > index 2bafea530..a27f731f8 100644
> > > --- a/config/meson.build
> > > +++ b/config/meson.build
> > > @@ -94,7 +94,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' +
> > > toolchain.to_upper(), 1)
> > >  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
> > >
> > >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > > -dpdk_extra_ldflags += '-Wl,--no-as-needed'
> > >
> >
> > This seems strange to me. What is it about linking the dpdk apps that
> > require the argument, but makes it safe for non-builtin apps to avoid
> > having the arg?
>
> We've been wondering about that for a while :-) It also seems to be not
> reproducible on Ubuntu 18.04/gcc 7.4.
>
> Can the verbose linking log be shared here, so that we can have a look
> at where no-as-needed lands? Might provide some clue

That would be the verbose linking log of the Travis CI run right?
I currently have no idea which knob to turn to get this :-/

Having it accepted in upstream would make it more easy to fix this in
the soon to be released Ubuntu 19.10.
Is there a path to consider taking this fix as-is and continue the
debug/discussion how the removal of the second line can even cause the
symptoms that we have seen later?
Or is everyone afraid that we then will not continue on it at all?


> --
> Kind regards,
> Luca Boccassi
  
Christian Ehrhardt Sept. 4, 2019, 9:13 a.m. UTC | #4
On Mon, Sep 2, 2019 at 9:09 AM Christian Ehrhardt
<christian.ehrhardt@canonical.com> wrote:
>
> On Thu, Aug 29, 2019 at 6:02 PM Luca Boccassi <bluca@debian.org> wrote:
> >
> > On Thu, 2019-08-29 at 16:34 +0100, Bruce Richardson wrote:
> > > On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> > > > A while ago telemetry was added in 57ae0ec6 and it also added as-
> > > > needed
> > > > to config/meson.build. This seems no more needed these days as due
> > > > to other
> > > > build changes the ordering in buildlogs is:
> > > >   [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
> > > > Which means telemetry no more benefits from --no-as-needed anyway.
> > > >
> > > > Overlinking problems get triggered by the meson generated pkgconfig
> > > > which
> > > > will have:
> > > >    [...] -Wl,--no-as-needed <somelibsusedbydpdk>
> > > > This will overlink <somelibs> and in addition anything that follows
> > > > as it also doesn't wrap back to --as-needed. So if a projects
> > > > includes
> > > > dpdk libs + <other> it will also consider <other> with --no-as-
> > > > needed.
> > > >
> > > > Fixes:
> > > > https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> > > >
> > > >
> > > > Signed-off-by: Christian Ehrhardt <
> > > > christian.ehrhardt@canonical.com
> > > > >
> > > > Acked-by: Luca Boccassi <
> > > > bluca@debian.org
> > > > >
> > > > ---
> > > >  config/meson.build | 1 -
> > > >  1 file changed, 1 deletion(-)
> > > >
> > > > diff --git a/config/meson.build b/config/meson.build
> > > > index 2bafea530..a27f731f8 100644
> > > > --- a/config/meson.build
> > > > +++ b/config/meson.build
> > > > @@ -94,7 +94,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' +
> > > > toolchain.to_upper(), 1)
> > > >  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
> > > >
> > > >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > > > -dpdk_extra_ldflags += '-Wl,--no-as-needed'
> > > >
> > >
> > > This seems strange to me. What is it about linking the dpdk apps that
> > > require the argument, but makes it safe for non-builtin apps to avoid
> > > having the arg?
> >
> > We've been wondering about that for a while :-) It also seems to be not
> > reproducible on Ubuntu 18.04/gcc 7.4.
> >
> > Can the verbose linking log be shared here, so that we can have a look
> > at where no-as-needed lands? Might provide some clue
>
> That would be the verbose linking log of the Travis CI run right?
> I currently have no idea which knob to turn to get this :-/
>
> Having it accepted in upstream would make it more easy to fix this in
> the soon to be released Ubuntu 19.10.
> Is there a path to consider taking this fix as-is and continue the
> debug/discussion how the removal of the second line can even cause the
> symptoms that we have seen later?

re-ping for the above ^^

> Or is everyone afraid that we then will not continue on it at all?
>
>
> > --
> > Kind regards,
> > Luca Boccassi
>
>
>
> --
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
  
Bruce Richardson Sept. 4, 2019, 9:18 a.m. UTC | #5
On Wed, Sep 04, 2019 at 11:13:34AM +0200, Christian Ehrhardt wrote:
> On Mon, Sep 2, 2019 at 9:09 AM Christian Ehrhardt
> <christian.ehrhardt@canonical.com> wrote:
> >
> > On Thu, Aug 29, 2019 at 6:02 PM Luca Boccassi <bluca@debian.org> wrote:
> > >
> > > On Thu, 2019-08-29 at 16:34 +0100, Bruce Richardson wrote:
> > > > On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> > > > > A while ago telemetry was added in 57ae0ec6 and it also added as-
> > > > > needed
> > > > > to config/meson.build. This seems no more needed these days as due
> > > > > to other
> > > > > build changes the ordering in buildlogs is:
> > > > >   [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
> > > > > Which means telemetry no more benefits from --no-as-needed anyway.
> > > > >
> > > > > Overlinking problems get triggered by the meson generated pkgconfig
> > > > > which
> > > > > will have:
> > > > >    [...] -Wl,--no-as-needed <somelibsusedbydpdk>
> > > > > This will overlink <somelibs> and in addition anything that follows
> > > > > as it also doesn't wrap back to --as-needed. So if a projects
> > > > > includes
> > > > > dpdk libs + <other> it will also consider <other> with --no-as-
> > > > > needed.
> > > > >
> > > > > Fixes:
> > > > > https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> > > > >
> > > > >
> > > > > Signed-off-by: Christian Ehrhardt <
> > > > > christian.ehrhardt@canonical.com
> > > > > >
> > > > > Acked-by: Luca Boccassi <
> > > > > bluca@debian.org
> > > > > >
> > > > > ---
> > > > >  config/meson.build | 1 -
> > > > >  1 file changed, 1 deletion(-)
> > > > >
> > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > index 2bafea530..a27f731f8 100644
> > > > > --- a/config/meson.build
> > > > > +++ b/config/meson.build
> > > > > @@ -94,7 +94,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' +
> > > > > toolchain.to_upper(), 1)
> > > > >  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
> > > > >
> > > > >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > > > > -dpdk_extra_ldflags += '-Wl,--no-as-needed'
> > > > >
> > > >
> > > > This seems strange to me. What is it about linking the dpdk apps that
> > > > require the argument, but makes it safe for non-builtin apps to avoid
> > > > having the arg?
> > >
> > > We've been wondering about that for a while :-) It also seems to be not
> > > reproducible on Ubuntu 18.04/gcc 7.4.
> > >
> > > Can the verbose linking log be shared here, so that we can have a look
> > > at where no-as-needed lands? Might provide some clue
> >
> > That would be the verbose linking log of the Travis CI run right?
> > I currently have no idea which knob to turn to get this :-/
> >
> > Having it accepted in upstream would make it more easy to fix this in
> > the soon to be released Ubuntu 19.10.
> > Is there a path to consider taking this fix as-is and continue the
> > debug/discussion how the removal of the second line can even cause the
> > symptoms that we have seen later?
> 
> re-ping for the above ^^
> 

I'm ok with what you propose above.
  
Christian Ehrhardt Sept. 10, 2019, 6:48 a.m. UTC | #6
On Wed, Sep 4, 2019 at 11:18 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Wed, Sep 04, 2019 at 11:13:34AM +0200, Christian Ehrhardt wrote:
> > On Mon, Sep 2, 2019 at 9:09 AM Christian Ehrhardt
> > <christian.ehrhardt@canonical.com> wrote:
> > >
> > > On Thu, Aug 29, 2019 at 6:02 PM Luca Boccassi <bluca@debian.org> wrote:
> > > >
> > > > On Thu, 2019-08-29 at 16:34 +0100, Bruce Richardson wrote:
> > > > > On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> > > > > > A while ago telemetry was added in 57ae0ec6 and it also added as-
> > > > > > needed
> > > > > > to config/meson.build. This seems no more needed these days as due
> > > > > > to other
> > > > > > build changes the ordering in buildlogs is:
> > > > > >   [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
> > > > > > Which means telemetry no more benefits from --no-as-needed anyway.
> > > > > >
> > > > > > Overlinking problems get triggered by the meson generated pkgconfig
> > > > > > which
> > > > > > will have:
> > > > > >    [...] -Wl,--no-as-needed <somelibsusedbydpdk>
> > > > > > This will overlink <somelibs> and in addition anything that follows
> > > > > > as it also doesn't wrap back to --as-needed. So if a projects
> > > > > > includes
> > > > > > dpdk libs + <other> it will also consider <other> with --no-as-
> > > > > > needed.
> > > > > >
> > > > > > Fixes:
> > > > > > https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> > > > > >
> > > > > >
> > > > > > Signed-off-by: Christian Ehrhardt <
> > > > > > christian.ehrhardt@canonical.com
> > > > > > >
> > > > > > Acked-by: Luca Boccassi <
> > > > > > bluca@debian.org
> > > > > > >
> > > > > > ---
> > > > > >  config/meson.build | 1 -
> > > > > >  1 file changed, 1 deletion(-)
> > > > > >
> > > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > > index 2bafea530..a27f731f8 100644
> > > > > > --- a/config/meson.build
> > > > > > +++ b/config/meson.build
> > > > > > @@ -94,7 +94,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' +
> > > > > > toolchain.to_upper(), 1)
> > > > > >  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
> > > > > >
> > > > > >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > > > > > -dpdk_extra_ldflags += '-Wl,--no-as-needed'
> > > > > >
> > > > >
> > > > > This seems strange to me. What is it about linking the dpdk apps that
> > > > > require the argument, but makes it safe for non-builtin apps to avoid
> > > > > having the arg?
> > > >
> > > > We've been wondering about that for a while :-) It also seems to be not
> > > > reproducible on Ubuntu 18.04/gcc 7.4.
> > > >
> > > > Can the verbose linking log be shared here, so that we can have a look
> > > > at where no-as-needed lands? Might provide some clue
> > >
> > > That would be the verbose linking log of the Travis CI run right?
> > > I currently have no idea which knob to turn to get this :-/
> > >
> > > Having it accepted in upstream would make it more easy to fix this in
> > > the soon to be released Ubuntu 19.10.
> > > Is there a path to consider taking this fix as-is and continue the
> > > debug/discussion how the removal of the second line can even cause the
> > > symptoms that we have seen later?
> >
> > re-ping for the above ^^
> >
>
> I'm ok with what you propose above.

Thanks Bruce!

Is there anything else we'd need to do to get this committed?
  
Christian Ehrhardt Sept. 12, 2019, 1:43 p.m. UTC | #7
On Tue, Sep 10, 2019 at 8:48 AM Christian Ehrhardt
<christian.ehrhardt@canonical.com> wrote:
>
> On Wed, Sep 4, 2019 at 11:18 AM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Wed, Sep 04, 2019 at 11:13:34AM +0200, Christian Ehrhardt wrote:
> > > On Mon, Sep 2, 2019 at 9:09 AM Christian Ehrhardt
> > > <christian.ehrhardt@canonical.com> wrote:
> > > >
> > > > On Thu, Aug 29, 2019 at 6:02 PM Luca Boccassi <bluca@debian.org> wrote:
> > > > >
> > > > > On Thu, 2019-08-29 at 16:34 +0100, Bruce Richardson wrote:
> > > > > > On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> > > > > > > A while ago telemetry was added in 57ae0ec6 and it also added as-
> > > > > > > needed
> > > > > > > to config/meson.build. This seems no more needed these days as due
> > > > > > > to other
> > > > > > > build changes the ordering in buildlogs is:
> > > > > > >   [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
> > > > > > > Which means telemetry no more benefits from --no-as-needed anyway.
> > > > > > >
> > > > > > > Overlinking problems get triggered by the meson generated pkgconfig
> > > > > > > which
> > > > > > > will have:
> > > > > > >    [...] -Wl,--no-as-needed <somelibsusedbydpdk>
> > > > > > > This will overlink <somelibs> and in addition anything that follows
> > > > > > > as it also doesn't wrap back to --as-needed. So if a projects
> > > > > > > includes
> > > > > > > dpdk libs + <other> it will also consider <other> with --no-as-
> > > > > > > needed.
> > > > > > >
> > > > > > > Fixes:
> > > > > > > https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> > > > > > >
> > > > > > >
> > > > > > > Signed-off-by: Christian Ehrhardt <
> > > > > > > christian.ehrhardt@canonical.com
> > > > > > > >
> > > > > > > Acked-by: Luca Boccassi <
> > > > > > > bluca@debian.org
> > > > > > > >
> > > > > > > ---
> > > > > > >  config/meson.build | 1 -
> > > > > > >  1 file changed, 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > > > index 2bafea530..a27f731f8 100644
> > > > > > > --- a/config/meson.build
> > > > > > > +++ b/config/meson.build
> > > > > > > @@ -94,7 +94,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' +
> > > > > > > toolchain.to_upper(), 1)
> > > > > > >  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
> > > > > > >
> > > > > > >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > > > > > > -dpdk_extra_ldflags += '-Wl,--no-as-needed'
> > > > > > >
> > > > > >
> > > > > > This seems strange to me. What is it about linking the dpdk apps that
> > > > > > require the argument, but makes it safe for non-builtin apps to avoid
> > > > > > having the arg?
> > > > >
> > > > > We've been wondering about that for a while :-) It also seems to be not
> > > > > reproducible on Ubuntu 18.04/gcc 7.4.
> > > > >
> > > > > Can the verbose linking log be shared here, so that we can have a look
> > > > > at where no-as-needed lands? Might provide some clue
> > > >
> > > > That would be the verbose linking log of the Travis CI run right?
> > > > I currently have no idea which knob to turn to get this :-/
> > > >
> > > > Having it accepted in upstream would make it more easy to fix this in
> > > > the soon to be released Ubuntu 19.10.
> > > > Is there a path to consider taking this fix as-is and continue the
> > > > debug/discussion how the removal of the second line can even cause the
> > > > symptoms that we have seen later?
> > >
> > > re-ping for the above ^^
> > >
> >
> > I'm ok with what you propose above.
>
> Thanks Bruce!
>
> Is there anything else we'd need to do to get this committed?

And actually 18.11 stable would make sense as well IMHO.
Could one who commits could add that as:
Fixes: 57ae0ec62620 ("build: add dependency on telemetry to apps with meson")

> --
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
  
Thomas Monjalon Oct. 12, 2019, 1:02 p.m. UTC | #8
12/09/2019 15:43, Christian Ehrhardt:
> > On Wed, Sep 4, 2019 at 11:18 AM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > > > On Mon, Sep 2, 2019 at 9:09 AM Christian Ehrhardt
> > > > <christian.ehrhardt@canonical.com> wrote:
> > > > > > On Thu, 2019-08-29 at 16:34 +0100, Bruce Richardson wrote:
> > > > > > > On Thu, Aug 29, 2019 at 05:30:03PM +0200, Christian Ehrhardt wrote:
> > > > > > > > --- a/config/meson.build
> > > > > > > > +++ b/config/meson.build
> > > > > > > >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > > > > > > > -dpdk_extra_ldflags += '-Wl,--no-as-needed'
> > > > > > > >
> > > > > > >
> > > > > > > This seems strange to me. What is it about linking the dpdk apps that
> > > > > > > require the argument, but makes it safe for non-builtin apps to avoid
> > > > > > > having the arg?
[...]
> > > > > Having it accepted in upstream would make it more easy to fix this in
> > > > > the soon to be released Ubuntu 19.10.
> > > > > Is there a path to consider taking this fix as-is and continue the
> > > > > debug/discussion how the removal of the second line can even cause the
> > > > > symptoms that we have seen later?
> > >
> > > I'm ok with what you propose above.
[...]
> And actually 18.11 stable would make sense as well IMHO.
> Could one who commits could add that as:
> Fixes: 57ae0ec62620 ("build: add dependency on telemetry to apps with meson")

+Cc stable@dpdk.org in the commit log

Applied, thanks
Title reduced to "avoid overlinking" because --as-needed mention looks wrong.

Please continue the investigation to remove
the other line "add_project_link_arguments()".
  

Patch

diff --git a/config/meson.build b/config/meson.build
index 2bafea530..a27f731f8 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -94,7 +94,6 @@  dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
 dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
 
 add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
-dpdk_extra_ldflags += '-Wl,--no-as-needed'
 
 # use pthreads
 add_project_link_arguments('-pthread', language: 'c')