From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 292F4A0613
	for <public@inbox.dpdk.org>; Thu, 29 Aug 2019 18:02:21 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 4E8411DFED;
	Thu, 29 Aug 2019 18:02:20 +0200 (CEST)
Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com
 [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 96E0E1DFEB
 for <dev@dpdk.org>; Thu, 29 Aug 2019 18:02:18 +0200 (CEST)
Received: by mail-wm1-f68.google.com with SMTP id t17so4304065wmi.2
 for <dev@dpdk.org>; Thu, 29 Aug 2019 09:02:18 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:content-transfer-encoding:user-agent:mime-version;
 bh=hiWRIz0DlUiOr40RlYIxnNUwdH26bJIjv2CFAFXMMWY=;
 b=LsTbMsSOfCXfLLo2PDjYczRF9CGA+Ns41MYG4yf4i2ajpZMK5UVrIYBenI4v6JTlso
 kJPuZGyaeOt64IYpEV5zDWadVmFY/bur7N0D18Bmj4wVYcxzkyFQz4O8q7NIfzYmBZWT
 uPfFra8HXQfLIE7PntnTv0XHLBuUkjsiObIQH3eC7zKxHOcBpejwyTTHrxliaj/NSr4F
 pcKmJt3c5nfftTRaj61hK0hIT+RbQ2PCPLpa9AlLM+tplZY8XbUrdRcKhzylsdjhxBno
 Qso64mG6fEYrf17tpnjjej7QIJBNShFnJqafXJhU5HElBboSBS0xS9PY6rHbDTOwjlcR
 jnRQ==
X-Gm-Message-State: APjAAAXpysdvyL7MBnBpQV1vprfoZBGpxjB2fWb5jvuKC6z3FuvZorgv
 NnwuHMBsWevrZDIq7D1yTwQ=
X-Google-Smtp-Source: APXvYqwzP1ahRhNMXWCJ78Vd9+9g6sY14pmwVJuOpSjt9oLqpH51p6WUXIAuBJrIf5UEZkG48eUq8w==
X-Received: by 2002:a7b:c929:: with SMTP id h9mr13312463wml.1.1567094538063;
 Thu, 29 Aug 2019 09:02:18 -0700 (PDT)
Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3])
 by smtp.gmail.com with ESMTPSA id p7sm4224448wmh.38.2019.08.29.09.02.16
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 29 Aug 2019 09:02:16 -0700 (PDT)
Message-ID: <dfa09a89e1a2cb61295659b00c315de2d77762b9.camel@debian.org>
From: Luca Boccassi <bluca@debian.org>
To: Bruce Richardson <bruce.richardson@intel.com>, Christian Ehrhardt
 <christian.ehrhardt@canonical.com>
Cc: dev <dev@dpdk.org>, Kevin Laatz <kevin.laatz@intel.com>, Thomas Monjalon
 <thomas@monjalon.net>
Date: Thu, 29 Aug 2019 17:02:16 +0100
In-Reply-To: <20190829153431.GA624@bricha3-MOBL.ger.corp.intel.com>
References: <CAATJJ0KUN93UctTPeP_eH-k+UmtZSjqK-NJ9RWQGrtEswq5V2A@mail.gmail.com>
 <20190829153003.7974-1-christian.ehrhardt@canonical.com>
 <20190829153431.GA624@bricha3-MOBL.ger.corp.intel.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.30.5-1.1 
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v2] build: avoid --as-needed as it causes
 overlinking
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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.
> >=20
> > 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.
> >=20
> > Fixes:=20
> > https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
> >=20
> >=20
> > 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(-)
> >=20
> > 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 *') =3D=3D 8)
> > =20
> >  add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > -dpdk_extra_ldflags +=3D '-Wl,--no-as-needed'
> > =20
>=20
> 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

--=20
Kind regards,
Luca Boccassi