From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6DB90A0350; Wed, 1 Jul 2020 10:59:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B56021C2E8; Wed, 1 Jul 2020 10:59:02 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 81B871C221 for ; Wed, 1 Jul 2020 10:59:01 +0200 (CEST) IronPort-SDR: IrJQIte4sRwG9vB95AYd1oWIGNFFeCcNRUHZeuB6kWi9tN4XInuykBV2NYM45x8ntMBU+gvVqB nP6zfayIQc+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="231381021" X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="231381021" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 01:59:00 -0700 IronPort-SDR: kMNw7JGX11Un+agx4G9xwxSIyz3TIT7Uv/WWEGlRM/5OVUM2p3IpZW2ElmEED9JcGZnG4HUPyV /VqtRVsC+aCw== X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="455026463" Received: from mcarroll-mobl.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.251.80.77]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 01 Jul 2020 01:58:56 -0700 Date: Wed, 1 Jul 2020 09:58:53 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com, ktraynor@redhat.com, bluca@debian.org, sunil.pai.g@intel.com Message-ID: <20200701085853.GB595@bricha3-MOBL.ger.corp.intel.com> References: <20200429100831.398-1-bruce.richardson@intel.com> <20200630141433.818517-1-bruce.richardson@intel.com> <20200630141433.818517-8-bruce.richardson@intel.com> <4910125.YRS67Szt0T@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4910125.YRS67Szt0T@thomas> Subject: Re: [dpdk-dev] [PATCH v3 7/7] build/pkg-config: prevent overlinking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jul 01, 2020 at 09:56:13AM +0200, Thomas Monjalon wrote: > 30/06/2020 16:14, Bruce Richardson: > > Add the --as-needed linker flag to the DPDK library list in the pkg-config > > file so as to prevent overlinking. Without this flag, when linking > > statically using flags from $(pkg-config --static --libs libdpdk), all DPDK > > drivers and libs were statically linked in, but the binary was also > > requiring all the shared versions be present to run. > > > > The real root-cause of this issue is that the DPDK libraries need to be > > duplicated in the linker command when doing static linking, due to the > > behaviour of pkg-config, but since that behaviour cannot be easily changed, > > this is a simple workaround to avoid problems. > > It deserves to give a more detailed explanation here. > It's already explained in commit log for patch 5 and in the code comments added in patch 5 also, so I didn't think it was necessary again. However can add in a V4, if needed. /Bruce